Physics Quıestion in Matlab
1 次查看(过去 30 天)
显示 更早的评论
As you can see question in below.I wrote this code but matlab gives some error.What can I do?
if true
function [outputArg1,outputArg2] = untitled2(inputArg1,inputArg2)
F=3;
x=1;
k=-F/x;
k
x(0)=1;
Dx(0)=-0.5;
x(t)=c1*sin(sqrt(k/m)*t)+c2*cos(sqrt(k/m));
end
0 个评论
采纳的回答
更多回答(1 个)
Roger Stafford
2018-1-21
编辑:Roger Stafford
2018-1-21
Matlab does not accept indices equal to zero. These can only be positive integers greater than zero. Therefore "x(0)=1;" and "Dx(0)=-0.5;" are not permitted. The same would apply to "x(t)" if 't' were of improper size.
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!