Answered

Putting the result from eval into a cell array

please please please don't use eval to access varriable names eval is not built for that, however, for some reason the first th...

Putting the result from eval into a cell array

please please please don't use eval to access varriable names eval is not built for that, however, for some reason the first th...

etwa 6 Stunden ago | 0

Answered

how to replace the elements row by rows instead of column by column in matrix

find(A==3,1,'first') find(A==3,1,'last') These lines find linear indices not [row, col] subsets. Linear indices go alon...

how to replace the elements row by rows instead of column by column in matrix

find(A==3,1,'first') find(A==3,1,'last') These lines find linear indices not [row, col] subsets. Linear indices go alon...

2 Tage ago | 0

| accepted

Answered

MATLAB HELP ME PLS

The trapezoidal integration method is a numeric calculation which approximates the area trapped between the curve and the x axis...

MATLAB HELP ME PLS

The trapezoidal integration method is a numeric calculation which approximates the area trapped between the curve and the x axis...

3 Tage ago | 0

Answered

How to access a function under a given path?

A possible solution would be to make every git branch a package. You will have to make all subfolders packages as well, but that...

How to access a function under a given path?

A possible solution would be to make every git branch a package. You will have to make all subfolders packages as well, but that...

4 Tage ago | 0

| accepted

Answered

how to convert the fraction part into intger?

What about K = round(mod((abs (L)-floor (abs (L))) *10e8 , 256)) Or K = floor(mod((abs (L)-floor (abs (L))) *10e8 ...

how to convert the fraction part into intger?

What about K = round(mod((abs (L)-floor (abs (L))) *10e8 , 256)) Or K = floor(mod((abs (L)-floor (abs (L))) *10e8 ...

6 Tage ago | 0

Answered

For loop with subs

You are setting a 2x3 matrix into l2, which duplicates mat for all possible substitutions 2x3 times 2x3 = 4x9

For loop with subs

You are setting a 2x3 matrix into l2, which duplicates mat for all possible substitutions 2x3 times 2x3 = 4x9

7 Tage ago | 0

Submitted

zoomginput

Zoom in/out of plot with your mouse wheel while using ginput

8 Tage ago | 2 downloads |

Question

How to change property behavior for a mocked object

I'm trying to use the mocking framework for unit tests I'm trying to make the property of a mock object return another mock obj...

10 Tage ago | 0 answers | 0

Answered

How to know dimensions to give in trapz function

let's say you have a column vector x and you calculate y according to y = ax^2 now if a is a vector, you will get a matrix y: ...

How to know dimensions to give in trapz function

let's say you have a column vector x and you calculate y according to y = ax^2 now if a is a vector, you will get a matrix y: ...

10 Tage ago | 0

Answered

Adding dropdown option from GUI in App Designer

I would put the options in a text file. Then load it during startup

Adding dropdown option from GUI in App Designer

I would put the options in a text file. Then load it during startup

10 Tage ago | 0

| accepted

Answered

How to plot plot from differnet location in a single figure?

If i understand your question corectly, and you have several .mat files each one with a varriable T and a varriable output, you...

How to plot plot from differnet location in a single figure?

If i understand your question corectly, and you have several .mat files each one with a varriable T and a varriable output, you...

27 Tage ago | 0

Answered

Rearrange any matrix Randomly with a specific sequence

A=1:20; blockSize = 5; nOutputBlocks = 2; a=reshape(A,blockSize,[]); i=sort(reshape(randperm(size(a,2)),[],nOutput...

Rearrange any matrix Randomly with a specific sequence

A=1:20; blockSize = 5; nOutputBlocks = 2; a=reshape(A,blockSize,[]); i=sort(reshape(randperm(size(a,2)),[],nOutput...

29 Tage ago | 0

Answered

How to transfer data between apps using app designer

The simplest solution would be to couple the two apps. When you open app B send the object of app A to it. Then when app B upd...

How to transfer data between apps using app designer

The simplest solution would be to couple the two apps. When you open app B send the object of app A to it. Then when app B upd...

etwa ein Monat ago | 0

Answered

Moving NaN elements from the last columns to the first column, iteratively

The simplest way would be to loop through the rows: i = isnan(A); for j = 1:size(A,1) A(j,:) = [A(j,i(j,:)) A(j,~i...

Moving NaN elements from the last columns to the first column, iteratively

The simplest way would be to loop through the rows: i = isnan(A); for j = 1:size(A,1) A(j,:) = [A(j,i(j,:)) A(j,~i...

etwa ein Monat ago | 1

| accepted

Answered

Save char array from for loop into a matrix

Unless you can guarantee that all file names have the exact same length, you need to use something other than a char matrix. E...

Save char array from for loop into a matrix

Unless you can guarantee that all file names have the exact same length, you need to use something other than a char matrix. E...

etwa 2 Monate ago | 0

| accepted

Answered

What frustrates you about MATLAB?

The implementation of properties. They are class fields, and they are the accessor methods to these fields, (get/set). This dual...

What frustrates you about MATLAB?

The implementation of properties. They are class fields, and they are the accessor methods to these fields, (get/set). This dual...

etwa 2 Monate ago | 0

Answered

Could anyone help me how to randomly display the values in the selected places

if you meant to fetch values from a random index using above mentioned linear indices: a = magic(5); a = a(1:3,:); validInd...

Could anyone help me how to randomly display the values in the selected places

if you meant to fetch values from a random index using above mentioned linear indices: a = magic(5); a = a(1:3,:); validInd...

etwa 2 Monate ago | 0

Answered

How to convert a cell array containing various inline functions to a unique inline function?

You can generate a function handle which will execute all the handles in a cell array using closures: a = magic(3); myFunction...

How to convert a cell array containing various inline functions to a unique inline function?

You can generate a function handle which will execute all the handles in a cell array using closures: a = magic(3); myFunction...

etwa 2 Monate ago | 0

Answered

Could anyone help me to solve the following issue

a = [1 2 3 4 5; 6 7 8 9 10] a_rand = a(randperm(length(a))) a_rand = [a_rand; a(~ismember(a(:),a_rand(:)))']

Could anyone help me to solve the following issue

a = [1 2 3 4 5; 6 7 8 9 10] a_rand = a(randperm(length(a))) a_rand = [a_rand; a(~ismember(a(:),a_rand(:)))']

etwa 2 Monate ago | 0

Answered

can matlab find ilaplace

Try that: syms s; F = exp(-y*sqrt(s+a))/s; F1 = ilaplace(F); pretty(F1); I don't know what a and y are in your ...

can matlab find ilaplace

Try that: syms s; F = exp(-y*sqrt(s+a))/s; F1 = ilaplace(F); pretty(F1); I don't know what a and y are in your ...

3 Monate ago | 0

Answered

Select all Rows that Contain A Certain Number and Any NaN's That follow Them

I think in this case a simple loop will be better than a fancy vectorised solution. valid = false(size(A, 1),1); vali...

Select all Rows that Contain A Certain Number and Any NaN's That follow Them

I think in this case a simple loop will be better than a fancy vectorised solution. valid = false(size(A, 1),1); vali...

3 Monate ago | 0

| accepted

Answered

How to clear persistent variables?

You can clear the name of the .m file in which that function is declared it works for .m file functions, local functions, neste...

How to clear persistent variables?

You can clear the name of the .m file in which that function is declared it works for .m file functions, local functions, neste...

3 Monate ago | 0

Answered

Extract Previous Cell Value

The problem is you're indexing at index 0 which is invalid. % some specific handling of % the first cell should be % ...

Extract Previous Cell Value

The problem is you're indexing at index 0 which is invalid. % some specific handling of % the first cell should be % ...

3 Monate ago | 0

Answered

regexrep for the neophyte

match = regexp(recipients,'(?<name>[a-zA-Z]+(?:\s*[a-zA-Z]+)*)\s?\$?(?<sum>\d+(?:[\.,]\d+)*)[^\w,;]*(?<time>[a-zA-Z]+\d+)?','n...

regexrep for the neophyte

match = regexp(recipients,'(?<name>[a-zA-Z]+(?:\s*[a-zA-Z]+)*)\s?\$?(?<sum>\d+(?:[\.,]\d+)*)[^\w,;]*(?<time>[a-zA-Z]+\d+)?','n...

3 Monate ago | 1

| accepted

Question

multiple populations in a single pole

I have histograms that most likely represent multiple populations. If they distribute normally I know I can use curve fitting...

3 Monate ago | 0 answers | 0

Answered

what's the matter when i run a M.file?

textscan accepts a file id not a file path. Use <https://www.mathworks.com/help/matlab/ref/fopen.html fopen> first

what's the matter when i run a M.file?

textscan accepts a file id not a file path. Use <https://www.mathworks.com/help/matlab/ref/fopen.html fopen> first

3 Monate ago | 0

Answered

Please Help Me Simple Question

This is a simple linear equation: price = 10 + 4*floor(depth);

Please Help Me Simple Question

This is a simple linear equation: price = 10 + 4*floor(depth);

3 Monate ago | 0

Answered

Error in App Designer with Slider: 'Index Exceeds Array Bounds'

without the full code it's hard to say, and in general uploading screenshots of your code is not very helpful. Still, the probl...

Error in App Designer with Slider: 'Index Exceeds Array Bounds'

without the full code it's hard to say, and in general uploading screenshots of your code is not very helpful. Still, the probl...

3 Monate ago | 0

| accepted

Answered

Why I am getting error message when I try to define line specs of a plot?

You are using an overload of plot that accepts a cfit object https://www.mathworks.com/help/curvefit/cfit.plot.html this overl...

Why I am getting error message when I try to define line specs of a plot?

You are using an overload of plot that accepts a cfit object https://www.mathworks.com/help/curvefit/cfit.plot.html this overl...

3 Monate ago | 0