Answered

Axes of plotted figure not complet (Matlab)

%if true box on Use this command to get the black lines top and right sides like you want.

Axes of plotted figure not complet (Matlab)

%if true box on Use this command to get the black lines top and right sides like you want.

2 months ago | 0

| accepted

Answered

Im trying to get a column vector with a list of composite numbers within a random range using the randi function but I keep getting an error.

%if true randB1 = randi([1 99],1,20); Try using randB1 like above. Since you require a 20 number range within a [1 99]...

Im trying to get a column vector with a list of composite numbers within a random range using the randi function but I keep getting an error.

%if true randB1 = randi([1 99],1,20); Try using randB1 like above. Since you require a 20 number range within a [1 99]...

2 months ago | 0

Answered

How to Set Plot Background Color

%if true x = linspace(1, 15, 15); y = randi([0 15], 1, 15); figure(1) h = plot(x, y, 'b-'); hold on patch([2 6 6 2 2...

How to Set Plot Background Color

%if true x = linspace(1, 15, 15); y = randi([0 15], 1, 15); figure(1) h = plot(x, y, 'b-'); hold on patch([2 6 6 2 2...

2 months ago | 0

Answered

Unable to perform assignment because the indices on the left side are not compatible with the size of the right side.

Use _gradient_ function instead of _diff_ %if true Y(:,1) = 100*gradient(log(Data(:,6)));

Unable to perform assignment because the indices on the left side are not compatible with the size of the right side.

Use _gradient_ function instead of _diff_ %if true Y(:,1) = 100*gradient(log(Data(:,6)));

2 months ago | 0

Answered

How to create a loop for varying the values of A, B & C according to months?

A, B and C are not constants, they are actually variables. Define, vectors for each of the parameters, A, B and C Then use a f...

How to create a loop for varying the values of A, B & C according to months?

A, B and C are not constants, they are actually variables. Define, vectors for each of the parameters, A, B and C Then use a f...

2 months ago | 0

| accepted

Answered

Help calculating wind turbine power, with a timeseries and a varying capacity factor

C = rand(1,55); % efficiency table A = 121; % swept area V = rand(1,200)*4; % 4 m/s wind speed say D = 1.14; % air density f...

Help calculating wind turbine power, with a timeseries and a varying capacity factor

C = rand(1,55); % efficiency table A = 121; % swept area V = rand(1,200)*4; % 4 m/s wind speed say D = 1.14; % air density f...

2 months ago | 0

Answered

summation inside for loop

%if true for iznext=1:5 Change this line. Since you said Q_z is 5x5 transition matrix

summation inside for loop

%if true for iznext=1:5 Change this line. Since you said Q_z is 5x5 transition matrix

2 months ago | 0

Answered

I need to make a long code that already has loops loop.

%f true FinalProb(k) = probu/L Change this line in your code to view probability of all loops

I need to make a long code that already has loops loop.

%f true FinalProb(k) = probu/L Change this line in your code to view probability of all loops

2 months ago | 0

Answered

Unrecognized function or variable 'gaussian_plume_model'

gaussian_plume_model is a function which needs to be in same folder where you are running your script file. Try running your scr...

Unrecognized function or variable 'gaussian_plume_model'

gaussian_plume_model is a function which needs to be in same folder where you are running your script file. Try running your scr...

2 months ago | 1

| accepted

Answered

Unable to perform assignment because the left and right sides have a different number of elements.

It's due to the HH:MM:SS format. Matlab treats 01:01:10 as an array instead of date. So, size of table_starttimes and [date] ...

Unable to perform assignment because the left and right sides have a different number of elements.

It's due to the HH:MM:SS format. Matlab treats 01:01:10 as an array instead of date. So, size of table_starttimes and [date] ...

2 months ago | 0

Answered

Error using plot vectors must be the same length

V = struct2cell(velocity) % velocity is struct VV = cell2mat(V); A = struct2cell(acceleration) % acceleration is struct AA =...

Error using plot vectors must be the same length

V = struct2cell(velocity) % velocity is struct VV = cell2mat(V); A = struct2cell(acceleration) % acceleration is struct AA =...

2 months ago | 0

Answered

How do I create a 3D plot that can show both magnitude of air speed and temperature of the air?

%if true w = wind_speed(:,:,:) T = temperature(:,:,:); quiver3(x,y,z,u,v,w) hold on quiver3(x,y,z,u,v,T)

How do I create a 3D plot that can show both magnitude of air speed and temperature of the air?

%if true w = wind_speed(:,:,:) T = temperature(:,:,:); quiver3(x,y,z,u,v,w) hold on quiver3(x,y,z,u,v,T)

3 months ago | 0

Answered

WHY A VARIABLE DOESN'T APPEAR IN THE PLOT?

It seems there are ONLY 2 columns in your mat file. i.e. Dec1997 and Var4 Obvisouly you will get error, Please check your mat...

WHY A VARIABLE DOESN'T APPEAR IN THE PLOT?

It seems there are ONLY 2 columns in your mat file. i.e. Dec1997 and Var4 Obvisouly you will get error, Please check your mat...

3 months ago | 0

Answered

Plotting the results of 3equation and 3 variables...

clc clear all close all syms Rab Rca Rbc %x = 1:100:500; for x=1:100:500 a = 1; b = 5.45*(10^4); y_gam11(x) = gamcdf(...

Plotting the results of 3equation and 3 variables...

clc clear all close all syms Rab Rca Rbc %x = 1:100:500; for x=1:100:500 a = 1; b = 5.45*(10^4); y_gam11(x) = gamcdf(...

3 months ago | 0

Answered

How to separate plot titles on single line? [solved]

%if true plot(rand(10)); title('[head neck helmet impact energy rep]');

How to separate plot titles on single line? [solved]

%if true plot(rand(10)); title('[head neck helmet impact energy rep]');

3 months ago | 0

| accepted

Answered

How to add text and numbers to gui table?

[x,txtData]=xlsread('Pattern Balancing.xlsx','A:A'); % change here c=string(cell2mat(txtData)); y=xlsread('Pattern Balancing.x...

How to add text and numbers to gui table?

[x,txtData]=xlsread('Pattern Balancing.xlsx','A:A'); % change here c=string(cell2mat(txtData)); y=xlsread('Pattern Balancing.x...

3 months ago | 0

Answered

Operator '>=' is not supported for operands of type 'cell'

find((T{2}(1:end,1))>= thor(1,1) & (T{2}(1:end,1))< thor(2,1),numel(T{2})); Try with the second argument like above

Operator '>=' is not supported for operands of type 'cell'

find((T{2}(1:end,1))>= thor(1,1) & (T{2}(1:end,1))< thor(2,1),numel(T{2})); Try with the second argument like above

3 months ago | 1

Answered

Access Matrix using array as keys

%if true coveredPoints = allPoints(bottoms(:,1):tops(:,2), bottoms(:,1):tops(:,1)) Try this

Access Matrix using array as keys

%if true coveredPoints = allPoints(bottoms(:,1):tops(:,2), bottoms(:,1):tops(:,1)) Try this

3 months ago | 0

Answered

Why the energy value is constant?

@Walter Roberson explanation seems correct, the values for x in the numerator and denominator cancel out each other

Why the energy value is constant?

@Walter Roberson explanation seems correct, the values for x in the numerator and denominator cancel out each other

3 months ago | 0

Answered

How to modify the y-axis tick label and tick values (2016a)

yval = ylim(gca); set(gca,'YTick',linspace(yval(1),yval(end),16),'YTickLabel', YTickStr) Since you have YTickStr has...

How to modify the y-axis tick label and tick values (2016a)

yval = ylim(gca); set(gca,'YTick',linspace(yval(1),yval(end),16),'YTickLabel', YTickStr) Since you have YTickStr has...

3 months ago | 0

Answered

how can i plot this equation?

%if tr syms x y f = y^3+0.2*exp(-1*x^2)*y^2-2.2039*y^2+0.8155 == 0; fimplicit(f,[-4 4])

how can i plot this equation?

%if tr syms x y f = y^3+0.2*exp(-1*x^2)*y^2-2.2039*y^2+0.8155 == 0; fimplicit(f,[-4 4])

3 months ago | 0

| accepted

Answered

How to rotate a figure around an origin that is rotating?

close all, clc, clear %% 1: Generating Data ang = linspace(0,2*pi,50); % Angle from 0 to 2pi % Data to draw black fixed circ...

How to rotate a figure around an origin that is rotating?

close all, clc, clear %% 1: Generating Data ang = linspace(0,2*pi,50); % Angle from 0 to 2pi % Data to draw black fixed circ...

4 months ago | 0

Answered

How can I introduce the break in the plot?

%if T1 = rand(1)*1.01*(85:95) T2 = rand(1)*1.01*(75:85) x1 = 1:11; x2 = 13:23 plot(x1,T1);hold on;plot(x2,T2) Extract...

How can I introduce the break in the plot?

%if T1 = rand(1)*1.01*(85:95) T2 = rand(1)*1.01*(75:85) x1 = 1:11; x2 = 13:23 plot(x1,T1);hold on;plot(x2,T2) Extract...

4 months ago | 0

Answered

Plotting content from structure

sges.location1 = 1; sges.location2 = 2; sges.location3 = 3, sges.location4 = 4; sges.location5 = 5; sh.location1 = 4; sh...

Plotting content from structure

sges.location1 = 1; sges.location2 = 2; sges.location3 = 3, sges.location4 = 4; sges.location5 = 5; sh.location1 = 4; sh...

4 months ago | 0

| accepted

Answered

Why my plotting curves exceed the loop index?

what is the size of depr(i,:) matrix ?

Why my plotting curves exceed the loop index?

what is the size of depr(i,:) matrix ?

4 months ago | 0

Answered

How to solve "brace indexing is not supported for variables of this type" for this code?

%if true for s=1:19 % change the for loop index fprintf("%d\n",number(s)) end Change the _for loop_ index as shown

How to solve "brace indexing is not supported for variables of this type" for this code?

%if true for s=1:19 % change the for loop index fprintf("%d\n",number(s)) end Change the _for loop_ index as shown

4 months ago | 0

Answered

How do I plot 3d graph ?

%if true Z = repmat(z,1,length(X)) surf(X,Y,Z) Z is your density data

How do I plot 3d graph ?

%if true Z = repmat(z,1,length(X)) surf(X,Y,Z) Z is your density data

4 months ago | 1

Answered

Array indices must be positive integers or logical values.

for i = 2:100 El1(i) = Elev1(i-1) - (Db1 - Da1); end if you want Elev1(i-1) to be computed one value before, otherwise us...

Array indices must be positive integers or logical values.

for i = 2:100 El1(i) = Elev1(i-1) - (Db1 - Da1); end if you want Elev1(i-1) to be computed one value before, otherwise us...

4 months ago | 0

Answered

Vectors -Must- be the same length

dt= 1.3 %time change %r=1e-7 r=5e-8 a=0.05 %b=a*0.01 b=a*0.04 S0=8419000. R0=0 I0=100 tmax=120 %number of days popscal...

Vectors -Must- be the same length

dt= 1.3 %time change %r=1e-7 r=5e-8 a=0.05 %b=a*0.01 b=a*0.04 S0=8419000. R0=0 I0=100 tmax=120 %number of days popscal...

4 months ago | 0

Answered

Please amend my code :(

%if clear all close all grav=9.81; theta=pi/4; v=20; x=0; vx=cos(theta).*v; y=0; vy=sin(theta).*v; dt=0.05; for v=...

Please amend my code :(

%if clear all close all grav=9.81; theta=pi/4; v=20; x=0; vx=cos(theta).*v; y=0; vy=sin(theta).*v; dt=0.05; for v=...

4 months ago | 0