Answered

How can I shade confidence intervals and assign colors to frequency spectra plot (pwelch)

The plot commands accept a 3 element vector in place of the built-in colors, each element being a number between 0 and 1 represe...

How can I shade confidence intervals and assign colors to frequency spectra plot (pwelch)

The plot commands accept a 3 element vector in place of the built-in colors, each element being a number between 0 and 1 represe...

8 months ago | 0

Answered

Add error bars to grouped bar plot

Like this? https://www.mathworks.com/help/matlab/creating_plots/bar-chart-with-error-bars.html

Add error bars to grouped bar plot

Like this? https://www.mathworks.com/help/matlab/creating_plots/bar-chart-with-error-bars.html

8 months ago | 0

Answered

How map values of array to 0 and 1

normalized_array = normalize(array,'range',[0 1]);

How map values of array to 0 and 1

normalized_array = normalize(array,'range',[0 1]);

8 months ago | 1

Answered

Brace indexing is not supported for variables of this type

Mu_s{:} < 1.0 && Mu_d{:} < 7.0

Brace indexing is not supported for variables of this type

Mu_s{:} < 1.0 && Mu_d{:} < 7.0

8 months ago | 0

Answered

Using now() in different time zones (or with daylight saving time)

From the documentation for now Limitations MATLAB Online returns the current date and time in Coordinated Universal Time (UTC...

Using now() in different time zones (or with daylight saving time)

From the documentation for now Limitations MATLAB Online returns the current date and time in Coordinated Universal Time (UTC...

8 months ago | 0

Answered

Having an array V from 0 to 44.8 in steps of 0.01, I try to use the function find(V == 30) and I get and empty array. Why?

I suspect this is a case of roundoff error. A workaround would be find(Volt > 29.999 & Volt < 30.001); Using whatever toleranc...

Having an array V from 0 to 44.8 in steps of 0.01, I try to use the function find(V == 30) and I get and empty array. Why?

I suspect this is a case of roundoff error. A workaround would be find(Volt > 29.999 & Volt < 30.001); Using whatever toleranc...

8 months ago | 0

Answered

The code runs, but imediately deletes the animation and does not update

delete(P1_pos_cir); delete(P2_pos_cir); delete(P3_pos_cir); delete(P4_pos_cir); delete(P5_pos_cir); ...

The code runs, but imediately deletes the animation and does not update

delete(P1_pos_cir); delete(P2_pos_cir); delete(P3_pos_cir); delete(P4_pos_cir); delete(P5_pos_cir); ...

8 months ago | 0

Answered

Confusion manipulating timestamp and plotting

Is each number supposed to represent a datetime as a "datenum" data type? t = 0.0517361112797516; d = datetime(t,'ConvertFrom'...

Confusion manipulating timestamp and plotting

Is each number supposed to represent a datetime as a "datenum" data type? t = 0.0517361112797516; d = datetime(t,'ConvertFrom'...

8 months ago | 0

Answered

How to include string + numbers in a table using a for...end routine

It sounds like you might want to use the command readtable This will read your entire spreadsheet as a table data type

How to include string + numbers in a table using a for...end routine

It sounds like you might want to use the command readtable This will read your entire spreadsheet as a table data type

8 months ago | 0

Answered

Error while using writematrix to save complex values in a .txt

csvwrite Does this correctly. I will look into writematrix

Error while using writematrix to save complex values in a .txt

csvwrite Does this correctly. I will look into writematrix

8 months ago | 1

| accepted

Answered

Warning: Executing startup failed in matlabrc. This indicates a potentially serious problem in your MATLAB setup, which should be resolved as soon as possible. Error detected was: MATLAB:calllib:MethodNotFound Method was not found.

Did you move or delete a file or rename one of the Matlab directories?

Warning: Executing startup failed in matlabrc. This indicates a potentially serious problem in your MATLAB setup, which should be resolved as soon as possible. Error detected was: MATLAB:calllib:MethodNotFound Method was not found.

Did you move or delete a file or rename one of the Matlab directories?

8 months ago | 0

| accepted

Answered

Using fzero to solve an equation with different constants every time

x0=[0;1]; By passing a vector into fzero you are telling it that you think the solution is between these values, so it will sta...

Using fzero to solve an equation with different constants every time

x0=[0;1]; By passing a vector into fzero you are telling it that you think the solution is between these values, so it will sta...

9 months ago | 0

| accepted

Answered

How do I get the date out of a filename using regexp?

str = 'xxx_2014_06_03_00_00_01'; id = regexp(str,'\d') Returns: id = 5 6 7 8 10 11 13 14 16 ...

How do I get the date out of a filename using regexp?

str = 'xxx_2014_06_03_00_00_01'; id = regexp(str,'\d') Returns: id = 5 6 7 8 10 11 13 14 16 ...

9 months ago | 0

Answered

Solving non-linear equation including natural logarithm

Most probably, there is no analytical solution for y in terms of (a,b,c,x). You can solve numerically for y at given values of a...

Solving non-linear equation including natural logarithm

Most probably, there is no analytical solution for y in terms of (a,b,c,x). You can solve numerically for y at given values of a...

9 months ago | 0

Answered

how to mathematical modelling the solar PV in Simulink?

Hi, The "sum" block in the "Photo Current" subsystem is meant to be +/- according to the model - your current setup has a +/+. ...

how to mathematical modelling the solar PV in Simulink?

Hi, The "sum" block in the "Photo Current" subsystem is meant to be +/- according to the model - your current setup has a +/+. ...

9 months ago | 0

Answered

How can I extract a certain numerical value from a text file?

I have written a similar function - something along the lines of fopen(fid) while feof ~= 1 str = fgetl(fid); if str...

How can I extract a certain numerical value from a text file?

I have written a similar function - something along the lines of fopen(fid) while feof ~= 1 str = fgetl(fid); if str...

9 months ago | 1

| accepted

Answered

Error when opening a variable

What exactly are you doing to encounter this error? Are you using load ?

Error when opening a variable

What exactly are you doing to encounter this error? Are you using load ?

9 months ago | 0

Answered

Distance between all points in array and delete the second point if it is less that certian value (Victorized)

Something like this? n= 1000; Rx=rand(n,1)*0.2; Ry=rand(n,1)*0.2; Rz=rand(n,1)*0.2; R_all=[Rx Ry Rz]; Df=0.002; Dr = diff...

Distance between all points in array and delete the second point if it is less that certian value (Victorized)

Something like this? n= 1000; Rx=rand(n,1)*0.2; Ry=rand(n,1)*0.2; Rz=rand(n,1)*0.2; R_all=[Rx Ry Rz]; Df=0.002; Dr = diff...

9 months ago | 0

Answered

Using a for loop to put a number of 2D arrays in a directory into a single 3D array

I misread at first, so I'm editing: If you read in 3 2D arrays you can concatenate them - if A,B,C are each 2D then D = A; D...

Using a for loop to put a number of 2D arrays in a directory into a single 3D array

I misread at first, so I'm editing: If you read in 3 2D arrays you can concatenate them - if A,B,C are each 2D then D = A; D...

9 months ago | 0

Answered

Solving System of Equations

Typically I prefer doing it numerically by putting my equations into the form Ax=b and then x = A\b

Solving System of Equations

Typically I prefer doing it numerically by putting my equations into the form Ax=b and then x = A\b

9 months ago | 0

Answered

Using ODE45 to solve Rossler equations

You are correct ode45 appears to be stuck. But if you try ode15s it appears to work

Using ODE45 to solve Rossler equations

You are correct ode45 appears to be stuck. But if you try ode15s it appears to work

9 months ago | 0

Answered

Error when trying to enter in a simple matrix

The little red underlines are not just there for decoration - sin^2(x) is not valid syntax in matlab. I think you want sin(psi)...

Error when trying to enter in a simple matrix

The little red underlines are not just there for decoration - sin^2(x) is not valid syntax in matlab. I think you want sin(psi)...

9 months ago | 0

Answered

Second Order Runge-Kutta Method for Problem

The ode solvers built into MATLAB are based on the runge-kutta method. Are you meant to implement your own method, or can you us...

Second Order Runge-Kutta Method for Problem

The ode solvers built into MATLAB are based on the runge-kutta method. Are you meant to implement your own method, or can you us...

9 months ago | 0

Answered

sinc(pi) doesn't give zero

Since pi is an irrational number and cannot be represented exactly by a finite number of binary digits, there is always going to...

sinc(pi) doesn't give zero

Since pi is an irrational number and cannot be represented exactly by a finite number of binary digits, there is always going to...

9 months ago | 0

| accepted

Answered

Finding all numbers which is divisible by 5

Hi, In your mod command you want to compare the number variable to 5, not a (a doesn't change). This is why you're getting unex...

Finding all numbers which is divisible by 5

Hi, In your mod command you want to compare the number variable to 5, not a (a doesn't change). This is why you're getting unex...

9 months ago | 0

| accepted

Answered

How to select a value in a matrix based on a pair of vectors?

The easiest way I thought of was to use a loop. It's made awkward by the fact that your index for girls is the opposite of the d...

How to select a value in a matrix based on a pair of vectors?

The easiest way I thought of was to use a loop. It's made awkward by the fact that your index for girls is the opposite of the d...

10 months ago | 1

| accepted