Réponse apportée

Parfor nested loop Table definition

>> can I at least parallelise the writing of the 4 xlsx tables to speed up the code I do not see how to do that easily without ...

Parfor nested loop Table definition

>> can I at least parallelise the writing of the 4 xlsx tables to speed up the code I do not see how to do that easily without ...

plus de 3 ans il y a | 1

| A accepté

Réponse apportée

How to obtain the first and second derivative of the "xt" function

You can use diff function as a crude way to take derivates. But, you should also know that diff introduces noise. Here is an art...

How to obtain the first and second derivative of the "xt" function

You can use diff function as a crude way to take derivates. But, you should also know that diff introduces noise. Here is an art...

plus de 3 ans il y a | 0

| A accepté

Réponse apportée

Computer to boost MATLAB operation

Where is your time being spent - in the nested loop, or in the last loop that is outside the nested loop? If, by "last loop", y...

Computer to boost MATLAB operation

Where is your time being spent - in the nested loop, or in the last loop that is outside the nested loop? If, by "last loop", y...

plus de 3 ans il y a | 0

Réponse apportée

Giving a moving point a chance to change path every step?

You should just run the script directly. You should not try to call selectPath from the command line.

Giving a moving point a chance to change path every step?

You should just run the script directly. You should not try to call selectPath from the command line.

plus de 3 ans il y a | 1

Réponse apportée

Giving a moving point a chance to change path every step?

Not sure exactly what you want, but possibly this is getting close. The refactoring should make it easier to modify. % set rand...

Giving a moving point a chance to change path every step?

Not sure exactly what you want, but possibly this is getting close. The refactoring should make it easier to modify. % set rand...

plus de 3 ans il y a | 1

| A accepté

Réponse apportée

Handling data cell array

Yes, regex is elegant. Here is a non-regex script. This algorithm allows the x,y,z to be in any order in each row of A. A = {'...

Handling data cell array

Yes, regex is elegant. Here is a non-regex script. This algorithm allows the x,y,z to be in any order in each row of A. A = {'...

plus de 3 ans il y a | 1

Réponse apportée

Matlab row subtraction of matrix

On the other hand, maybe you want to subtract row 2 from all the rows. In that case, you can do this. >> A A = 1 2 ...

Matlab row subtraction of matrix

On the other hand, maybe you want to subtract row 2 from all the rows. In that case, you can do this. >> A A = 1 2 ...

plus de 3 ans il y a | 0

| A accepté

Réponse apportée

Matlab row subtraction of matrix

I am taking a guess as to what you want. Would be nice if you gave a simple matrix, A, and showed the desired result. But here i...

Matlab row subtraction of matrix

I am taking a guess as to what you want. Would be nice if you gave a simple matrix, A, and showed the desired result. But here i...

plus de 3 ans il y a | 0

Réponse apportée

Relation of Elements of matrix

B = 3; [r, ~] = ind2sub( size(A), find(A==B) ); z = A(sort(r),:); zu = unique(z(:))'

Relation of Elements of matrix

B = 3; [r, ~] = ind2sub( size(A), find(A==B) ); z = A(sort(r),:); zu = unique(z(:))'

plus de 3 ans il y a | 0

Réponse apportée

Matrix dimensions must agree.

As Jon pointed out, you can subtract two matrices if they are "the same size (same number of rows and columns)" It is also poss...

Matrix dimensions must agree.

As Jon pointed out, you can subtract two matrices if they are "the same size (same number of rows and columns)" It is also poss...

plus de 3 ans il y a | 0

Réponse apportée

how do u make a new value that is the sum of two columns

A = [1 2 ;3 4; 5 6 ;7 8; 9 10; 11 12; 13 14; 15 16] A = 1 2 3 4 5 6 7 8 9 10 ...

how do u make a new value that is the sum of two columns

A = [1 2 ;3 4; 5 6 ;7 8; 9 10; 11 12; 13 14; 15 16] A = 1 2 3 4 5 6 7 8 9 10 ...

plus de 3 ans il y a | 0

Réponse apportée

Making an array using loop

Change ORIGINAL_POST to false to get slightly different result. clearvars; clc; % remove previous debug runs lenA = 60; % as...

Making an array using loop

Change ORIGINAL_POST to false to get slightly different result. clearvars; clc; % remove previous debug runs lenA = 60; % as...

presque 4 ans il y a | 0

Réponse apportée

Reading the matrix elements row wise

If you do not want to take the transpose of the A matrix, you can work with the subscripts instead. A = [1 2 3; 4 5 6]; sz = s...

Reading the matrix elements row wise

If you do not want to take the transpose of the A matrix, you can work with the subscripts instead. A = [1 2 3; 4 5 6]; sz = s...

presque 4 ans il y a | 1

| A accepté

Réponse apportée

Getting two outputs when using function with implemented if statement

In your acuteAngle function, there is a disp() line which gives you the first output. The calling routine disp(acuteAngle() give...

Getting two outputs when using function with implemented if statement

In your acuteAngle function, there is a disp() line which gives you the first output. The calling routine disp(acuteAngle() give...

presque 4 ans il y a | 1

| A accepté

Réponse apportée

how to mute the signal at a certain time

This will remove all the leading zeros of a Sig vector: Sig = Sig(find(Sig,1,'first'):end);

how to mute the signal at a certain time

This will remove all the leading zeros of a Sig vector: Sig = Sig(find(Sig,1,'first'):end);

presque 4 ans il y a | 1

Réponse apportée

Reading the matrix elements row wise

A = [1 2 3; 4 5 6]; Atr = transpose(A); Atr(1:6) ans = 1 2 3 4 5 6

Reading the matrix elements row wise

A = [1 2 3; 4 5 6]; Atr = transpose(A); Atr(1:6) ans = 1 2 3 4 5 6

presque 4 ans il y a | 1

Réponse apportée

Plotting and finding the intersection of 2 curves

If you have two vectors, x1, y1 that form the curve (x1, y1), and likewise, another curve (x2, y2), then you can get the interse...

Plotting and finding the intersection of 2 curves

If you have two vectors, x1, y1 that form the curve (x1, y1), and likewise, another curve (x2, y2), then you can get the interse...

presque 4 ans il y a | 0

Réponse apportée

Is it possible to have two indices in a for loop?

>> Is it possible to have 2 indices in the same for loop? (i and k). In your i- and k-loops, you are considering every combinat...

Is it possible to have two indices in a for loop?

>> Is it possible to have 2 indices in the same for loop? (i and k). In your i- and k-loops, you are considering every combinat...

presque 4 ans il y a | 0

Réponse apportée

Is it possible to have two indices in a for loop?

Jan's solution appears to not provide all combinations of (i,k) for the 2D array, AEMGstructHR. So I do not see how that constru...

Is it possible to have two indices in a for loop?

Jan's solution appears to not provide all combinations of (i,k) for the 2D array, AEMGstructHR. So I do not see how that constru...

presque 4 ans il y a | 0

Réponse apportée

Frequency and Phase response of an IIR system whose system function is given H(z)

Here is an example to plot the magnitude and phase frequency response >> b = [0.0563 -0.0009 -0.0009 0.0563]; >> a = [1...

Frequency and Phase response of an IIR system whose system function is given H(z)

Here is an example to plot the magnitude and phase frequency response >> b = [0.0563 -0.0009 -0.0009 0.0563]; >> a = [1...

presque 4 ans il y a | 0

Réponse apportée

Solving probability problems with MATLAB

You can simulate this problem using a Monte Carlo Simluation. https://www.mathworks.com/matlabcentral/answers/97605-are-there-a...

Solving probability problems with MATLAB

You can simulate this problem using a Monte Carlo Simluation. https://www.mathworks.com/matlabcentral/answers/97605-are-there-a...

presque 4 ans il y a | 0

Réponse apportée

How to make the estimation error and average it correctly?

for sd = 0:10:50 PN=Po+(sd.*gaussnoise); end In each iteration of this inner loop, PN is computed with a new ...

How to make the estimation error and average it correctly?

for sd = 0:10:50 PN=Po+(sd.*gaussnoise); end In each iteration of this inner loop, PN is computed with a new ...

presque 4 ans il y a | 0

| A accepté

Réponse apportée

Is there a way to access a struct object's reference (handle) in MATLAB?

This may be close to what you are looking for. Define a classA.m classdef classA < handle properties a end me...

Is there a way to access a struct object's reference (handle) in MATLAB?

This may be close to what you are looking for. Define a classA.m classdef classA < handle properties a end me...

presque 4 ans il y a | 1

| A accepté

Réponse apportée

Removing one of two plots on a single axis

t =0:.01:1; y = sin(2*pi*4*t); hold on; h1 =plot(.2,.5,'ro'); pause delete(h1) Hit a spacebar and the red circle will disap...

Removing one of two plots on a single axis

t =0:.01:1; y = sin(2*pi*4*t); hold on; h1 =plot(.2,.5,'ro'); pause delete(h1) Hit a spacebar and the red circle will disap...

presque 4 ans il y a | 0

Réponse apportée

Compare Matrices within tolerance range

For a tolerance match between corresponding elements of the rows, start off with this: a = a(:); b = b(:); %% Check for equi...

Compare Matrices within tolerance range

For a tolerance match between corresponding elements of the rows, start off with this: a = a(:); b = b(:); %% Check for equi...

presque 4 ans il y a | 0

Réponse apportée

How to resolve Matrix dimensions error?

I made the code more readable to me, and adjusted the dimensions which are in the annotations. % Increment of current I=0:0.5:...

How to resolve Matrix dimensions error?

I made the code more readable to me, and adjusted the dimensions which are in the annotations. % Increment of current I=0:0.5:...

presque 4 ans il y a | 0

| A accepté

Réponse apportée

How to resolve Matrix dimensions error?

y = polyval(I,x); % Error Did you mean y = polyval(x,I);

How to resolve Matrix dimensions error?

y = polyval(I,x); % Error Did you mean y = polyval(x,I);

presque 4 ans il y a | 0

Réponse apportée

How to resolve Matrix dimensions error?

E =(Po-y).^2; % ( 1x21 - 1x3 ) .^ 2 is this what you want: E =(Po-y').^2; % ( 1x21 -3x1 ) .^ 2

How to resolve Matrix dimensions error?

E =(Po-y).^2; % ( 1x21 - 1x3 ) .^ 2 is this what you want: E =(Po-y').^2; % ( 1x21 -3x1 ) .^ 2

presque 4 ans il y a | 0

Réponse apportée

subtraction of each row with every other row

B = repmat(A, N,1) - repelem(A,N,1);

subtraction of each row with every other row

B = repmat(A, N,1) - repelem(A,N,1);

presque 4 ans il y a | 1

Réponse apportée

How can we convert programs made on older version to be available on newer version of MATLAB?

I had problems with Excel in general when a Windows upgrade to Windows Defender occured. Defender started marking certain folder...

How can we convert programs made on older version to be available on newer version of MATLAB?

I had problems with Excel in general when a Windows upgrade to Windows Defender occured. Defender started marking certain folder...

presque 4 ans il y a | 0