Error with Vector Length
Hi All,
Trying to get this code to work for a school lab assignment. I keep getting a vector length error, but my classmates are not having the same problem. Not sure what is the difference between my system and theirs. We are all running MATLAB R2022b. Could someone please point me in the right direction and explain why this isn’t working?
Thanks!
Code:
clear;
close all;
t0=0;
t1=-10;
t2=20;
[x,t]=step(t0,t1,t2)
figure
plot(t,x,’r’,’linewidth,2′);
xlabel(‘Time (s)’);
ylabel(‘Signal Amplitude’);
Error Message:Hi All,
Trying to get this code to work for a school lab assignment. I keep getting a vector length error, but my classmates are not having the same problem. Not sure what is the difference between my system and theirs. We are all running MATLAB R2022b. Could someone please point me in the right direction and explain why this isn’t working?
Thanks!
Code:
clear;
close all;
t0=0;
t1=-10;
t2=20;
[x,t]=step(t0,t1,t2)
figure
plot(t,x,’r’,’linewidth,2′);
xlabel(‘Time (s)’);
ylabel(‘Signal Amplitude’);
Error Message: Hi All,
Trying to get this code to work for a school lab assignment. I keep getting a vector length error, but my classmates are not having the same problem. Not sure what is the difference between my system and theirs. We are all running MATLAB R2022b. Could someone please point me in the right direction and explain why this isn’t working?
Thanks!
Code:
clear;
close all;
t0=0;
t1=-10;
t2=20;
[x,t]=step(t0,t1,t2)
figure
plot(t,x,’r’,’linewidth,2′);
xlabel(‘Time (s)’);
ylabel(‘Signal Amplitude’);
Error Message: vector length MATLAB Answers — New Questions