What would cause the code "plot(ScopeData.time,ScopeData.signals.values,'or')" to have an error and how to fix it. This is my code:
x0 = -1;A = -2;B = 1;C = 1;D = 0;t = linspace(0,10);u = 2 +3*sin(3*t);[y,~]=lsim(A,B,C,D,u,t,x0);plot(t,y);hold onplot(ScopeData.time,ScopeData.signals.values,'or');xlabel('time(s)');ylabel('x(t)');legend('lsim','simulink','Location','northwest');
This is my Simulink
Best Answer