Community Profile

photo

VBBV


PEC

Last seen: Today Active since 2017

Programming in MATLAB applied to interdisciplinary engineering fields

Statistics

All
  • MATLAB Central Treasure Hunt Finisher
  • 12 Month Streak
  • Thankful Level 3
  • Promoter
  • Solver
  • Personal Best Downloads Level 2
  • First Review
  • Knowledgeable Level 4
  • Pro
  • Revival Level 3
  • First Answer
  • 5-Star Galaxy Level 1

View badges

Content Feed

Answered
Is this the correct way to use "hold on" in a for loop?
%if true for t = 1:5 ; dx(t) = vx*t; dy(t) = vy*t-0.5*9.81*t^2; plot(dx(1:t),dy(1:t),'g-'); end you are trying to plot...

2 hours ago | 0

Answered
getting error while using feedback
%if true K1 = tf([0.005659 0.05206 0.004496],[1 9.357 2.228 0.06147]) K2 = tf([0 0 27.5084 0],[0 0 27.5084 0]) feedback...

3 hours ago | 0

Answered
Issue while plotting image (wrong scale)
%f true set(gca,'YtickLabel',0:100:1000) If you don't want Y scale to be inverted use the above

1 day ago | 0

Answered
comparing column vectors finding maxima element wise
%f true max([a;b]) Use this

1 day ago | 0

Answered
I want to display result in different names.
Try also using _disp_ function

3 days ago | 0

Answered
Why is my nested if statement is not working.
Check the size of _mark1_ it may be cell array instead of scalar value that you want to do condition tests through nested _If..e...

4 days ago | 0

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

4 days 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]...

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

6 days 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)));

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

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

13 days 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

15 days 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

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

20 days 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] ...

20 days 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 =...

26 days 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)

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

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

1 month ago | 0

Answered
How to separate plot titles on single line? [solved]
%if true plot(rand(10)); title('[head neck helmet impact energy rep]');

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

1 month 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

1 month ago | 1

Answered
Access Matrix using array as keys
%if true coveredPoints = allPoints(bottoms(:,1):tops(:,2), bottoms(:,1):tops(:,1)) Try this

1 month 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

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

1 month 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])

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

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

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

2 months ago | 0

| accepted

Load more