1.336 total contributions since 2017

E-mails with feedback/questions about FEX submissions are welcomed. In general I will post e-mails about Answers on the related page, unless there is good cause not to do so.

Answered

how to have matlab give feedback if value in a table is outside of a given range

You mean with something like this? x = gallery('integerdata',10,[5,1],2); y = gallery('integerdata',10,[5,1],8); A = table(x,...

how to have matlab give feedback if value in a table is outside of a given range

You mean with something like this? x = gallery('integerdata',10,[5,1],2); y = gallery('integerdata',10,[5,1],8); A = table(x,...

1 giorno ago | 0

Answered

How to fix a program that does not end?

You are increasing your loop variable inside the loop: l=l+1; Is that intentional? What are you trying to achieve there? That ...

How to fix a program that does not end?

You are increasing your loop variable inside the loop: l=l+1; Is that intentional? What are you trying to achieve there? That ...

1 giorno ago | 0

Answered

If else problem for year

You can do this two ways: Option 1 is to do the actual work. Is the input correct? Does the month entered actually have at leas...

If else problem for year

You can do this two ways: Option 1 is to do the actual work. Is the input correct? Does the month entered actually have at leas...

6 giorni ago | 0

Answered

Select 100 points either side from mouse click cooradinates

Use the x-coordinate returned by getpts to select the data. x=linspace(0,10,1000); %generate a smooth random curve y=sin(x)+p...

Select 100 points either side from mouse click cooradinates

Use the x-coordinate returned by getpts to select the data. x=linspace(0,10,1000); %generate a smooth random curve y=sin(x)+p...

7 giorni ago | 0

Answered

Problem in coordinate conversion

This behavior is as documented. The result is in the [-pi pi] radians range. If you want to have your angles in the range [0 360...

Problem in coordinate conversion

This behavior is as documented. The result is in the [-pi pi] radians range. If you want to have your angles in the range [0 360...

7 giorni ago | 0

Answered

There is a mistake with such expressions as mod(23^12,24). MATLAB gives an answer of 0 which, given that 23 and 24 are relative primes,

The number you're trying to process is larger than flintmax(), so you can rely on single digit precision operations.

There is a mistake with such expressions as mod(23^12,24). MATLAB gives an answer of 0 which, given that 23 and 24 are relative primes,

The number you're trying to process is larger than flintmax(), so you can rely on single digit precision operations.

7 giorni ago | 0

Answered

Is there an equivalent function in Matlab 2019 to the earlier version's isunicode function?

The isunicode function may look promissing, but doesn't actually work on my test files (generated with Notepad++). The same prob...

Is there an equivalent function in Matlab 2019 to the earlier version's isunicode function?

The isunicode function may look promissing, but doesn't actually work on my test files (generated with Notepad++). The same prob...

7 giorni ago | 0

Answered

How replace matching string

Because your second and third condition can be merged, you can use ismember: data={'Pass','Pass{overflow :1,unbound:5,warning:9...

How replace matching string

Because your second and third condition can be merged, you can use ismember: data={'Pass','Pass{overflow :1,unbound:5,warning:9...

7 giorni ago | 0

Answered

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...

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...

8 giorni ago | 0

| accepted

Answered

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...

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...

8 giorni ago | 0

| accepted

Answered

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 ...

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 ...

9 giorni ago | 0

Answered

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 ...

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 ...

12 giorni ago | 0

Answered

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 ...

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 ...

14 giorni ago | 0

| accepted

Answered

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.

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.

14 giorni ago | 0

| accepted

Answered

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...

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...

14 giorni ago | 0

| accepted

Answered

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). ...

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). ...

16 giorni ago | 0

| accepted

Answered

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...

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...

16 giorni ago | 0

Answered

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...

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...

17 giorni ago | 1

Answered

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...

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...

17 giorni ago | 0

| accepted

Answered

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...

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...

19 giorni ago | 1

| accepted

Answered

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...

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...

20 giorni ago | 0

Answered

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 ...

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 ...

23 giorni ago | 0

| accepted

Answered

extracting data from hex

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

extracting data from hex

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

23 giorni ago | 0

Answered

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...

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...

23 giorni ago | 0

| accepted

Answered

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...

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...

23 giorni ago | 1

| accepted

Answered

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...

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...

23 giorni ago | 1

Answered

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...

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...

23 giorni ago | 0

| accepted

Answered

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...

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...

23 giorni ago | 0

Answered

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 ...

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 ...

23 giorni ago | 0

Answered

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(...

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(...

24 giorni ago | 0