Risposto
Convolution of absolute magnitude =/= absolute magnitude of convolution?
Let's consider a minimal example: data=[-3 0 3]; kernel=[1 1 1]/3; Now it is easy to see that convolving first and then takin...

circa 7 anni fa | 0

| accettato

Risposto
Creating a for loop to see if date exists
If you insist or keeping it as a double, you can use ismember three times, but it makes more sense to make use of the datetime c...

circa 7 anni fa | 0

| accettato

Risposto
Variable is in a function file, how do I use a loop to change the value of this variable?
According to the doc you can pass extra parameters by setting an anonymous function. I see no indication in the R2014a doc that ...

circa 7 anni fa | 0

Risposto
Title for a figure containing many pictures
You can also use the suptitle function. I remember it as being a native Matlab function, but I couldn't find it in the doc. You ...

circa 7 anni fa | 0

Risposto
hi every one , how can i do a for cycle with diffrent vector length , thank you
You can put them in a cell array and let cell2mat handle the removal of empty elements. I have no clue what you want to do with ...

circa 7 anni fa | 0

| accettato

Risposto
Name variables according to string
Why not store them in a struct array? If all mat files have the same fields that should work very well.

circa 7 anni fa | 0

| accettato

Risposto
could anyone help me to solve the issue
This removes elements until your matrix is no longer valid according to your rule. It is very slow for bigger matrices, but it i...

circa 7 anni fa | 0

| accettato

Risposto
How to take R-Square value as a variable
If you mean you want to access the value of the rsquare field, you can do that as with any struct (see the line of code below). ...

circa 7 anni fa | 0

| accettato

Risposto
matlab piece wise function
That is a good idea of solving your problem. There is one thing you're forgetting in your logic: to trim the parts you don't nee...

circa 7 anni fa | 0

Risposto
where can i download MATLAB for windows 7 32bits?
You'll have to choose R2015b or earlier. That is the latest version where there is a 32 bit version. If you need a newer version...

circa 7 anni fa | 1

Risposto
Remove rows based on length of column value
Instead of implicit expansion (which can take a lot of memory for bigger arrays), you can use histogram counts: S=load('practic...

circa 7 anni fa | 0

| accettato

Risposto
Can anyone help me with the error?
You aren't plotting a function, but a vector. Replace fplot by plot, or replace your input by a function. Actually, doing both w...

circa 7 anni fa | 1

| accettato

Risposto
How to calculate accuracy from confusion matrix?
Accuracy = (TP+TN)/(TP+TN+FP+FN) where: TP = True positive; FP = False positive; TN = True negative; FN = False negative A...

circa 7 anni fa | 0

Risposto
Could anyone help me how to solve the following issue.
I can't think of a better solution, but you could try brute-forcing it with a while loop: maxval=5;cols=10; if maxval>cols ...

circa 7 anni fa | 0

| accettato

Risposto
extracting data from hex
You should only remove the leading 0x as that indicates the data is hexadecimal. data_hex={{'0x0000D830'} {'0x000103EA'} ...

circa 7 anni fa | 0

Risposto
customised x data in matlab plot
The XTick property requires a vector with numeric data, but the XTickLabel property requires a cell array. labels = [0 2000 400...

circa 7 anni fa | 0

| accettato

Risposto
How to create a function which accepts a name of a mat-file and returns a structure array with fields’ Name and Size?
Lets go through your proposed code: function se=se(name)%don't give your ouput the same name to your output as your function f...

circa 7 anni fa | 1

| accettato

Risposto
How can I append same size matrix vertically?
Nothing here is happening automatically. With the comma you are telling Matlab that you want to concatenate horizontally. If you...

circa 7 anni fa | 1

Risposto
How to find the indices of a data column that aren't Nan, and how to use those indices to concatenate a vector?
The not function (or simply ~) doesn't have a second output. Luckily you don't need it. You can directly use its output to perfo...

circa 7 anni fa | 0

| accettato

Risposto
How to read images from one directory into variables using loop?
You don't want numbered variables. Try a cell array instead. That way you can much more easily loop through your images to do th...

circa 7 anni fa | 0

Risposto
Do I need to reference matlab in an academic paper?
That depends a bit on the context and the journal. You can ask your supervisor what they think. Personally I also do some parts ...

circa 7 anni fa | 1

Risposto
how to get image from specific folder and resize each image and save them is a new folder
This is how you can provide the full path to imread: for K = 1 : length(dinfo) thisimage = dinfo(K).name; Img = imread(...

circa 7 anni fa | 0

Risposto
How do I sort filenames base on the numbers right before file name in MATLAB?
This should to the trick. Note that this will return an error if there is no match. names={'example_1.mat','example_15.mat','ex...

circa 7 anni fa | 0

| accettato

Risposto
Using vectorization on a problem to reduce For loops, how to use conditional statement?
You can find an explanation of logical indexing on that page you linked. The most important thing if you want to vectorize an o...

circa 7 anni fa | 1

Risposto
Excluding date from date and time
You can probably also do this with the datetime class, but when you still have your time in the datenum format, you can simply s...

circa 7 anni fa | 1

| accettato

Risposto
Renaming folders with different names
You can use something like this %untested code list=dir('D:\ToM_3_LEVEL1_ONLY\ToM_00\*'); list=list([list.isdir]);%keep only ...

circa 7 anni fa | 0

Risposto
uicontrol issues on figure
It may take some getting used to how to build a GUI with Matlab, but once you get the hang of it you'll find it gets easy. To ke...

circa 7 anni fa | 1

| accettato

Risposto
creating a vector from a bin count
You could of course do this with a loop (or cellfun), but I think a more elegant solution is with cumsum instead. data=[0 5; 1 ...

circa 7 anni fa | 0

Risposto
how to make sure image resolution?
Some cameras store the orientation in the EXIF data, which Matlab generally ignores. In my PhotoAnnotation tool I used an extern...

circa 7 anni fa | 1

| accettato

Risposto
Joining every eight columns in a matrix
Although it might visually be joining characters, that is not necessarily what you need. The code below should be one of the fas...

circa 7 anni fa | 0

| accettato

Carica altro