why does the command window say my file is not found
Ältere Kommentare anzeigen
%%
sim('Lab1.slx')
figure
subplot(2,2,1)
plot(tout, Acceleration.Data, 'k-')
xlabel('Time')
ylabel('Acceleration')
grid on
subplot(2,2,2)
plot(tout, Velocity.Data, 'r-')
xlabel('Time')
ylabel('Velocity')
grid on
subplot(2,2,3)
plot(tout, Displacement.Data, 'r-')
xlabel('Time')
ylabel('Displacement')
grid on
Error using VibrationsLab1 (line 2)
No system or file called 'Lab1.slx' found.
I have a simulink model in the same directory as this .m file but when i run the code it says that the simulink file wasn't found
Antworten (1)
Fangjun Jiang
am 18 Dez. 2022
0 Stimmen
Could be a Lab1.mdl file. Try this
open_system('Lab1');
sim('Lab1');
Kategorien
Mehr zu File Operations finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!