Physics Quıestion in Matlab
Show older comments
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
Accepted Answer
More Answers (1)
Roger Stafford
on 21 Jan 2018
Edited: Roger Stafford
on 21 Jan 2018
0 votes
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.
1 Comment
Aykut Albayrak
on 21 Jan 2018
Categories
Find more on Mathematics in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!