Info
이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.
when i 'm trying to run this mfile it is giving the following error ??? Undefined function or method 'solve' for input arguments of type 'double'. Error in ==> tofindx at 14 . can anyone please help me to solve the problem? thanku
조회 수: 1 (최근 30일)
이전 댓글 표시
clc;
clear all;
x=0;
f=input('force:');
rho=input('rho:');
D=input('diameter:');
Cd=input('Cd:');
Cm=input('Cm:');
w=input('w:');
u=input('u:');
a=input('a:');
t=0.1;
S=solve(((0.5*rho*Cd*D*abs(u+x*w*sin(w*t))*(u+x*w*sin(w*t)))+(rho*pi*D^2*Cm*(a+x*cos(w*t)*w^2)/4)+(rho*pi*D^2*w^2*x*cos(w*t)/4))==f,x);
댓글 수: 1
Walter Roberson
2013년 2월 1일
Please read the guide to tags and retag this question. http://www.mathworks.co.uk/matlabcentral/answers/43073-a-guide-to-tags
답변 (1개)
Walter Roberson
2013년 2월 1일
편집: Walter Roberson
2013년 2월 1일
You have not made "x" a symbolic variable: instead you made it a numeric variable when you used "x=0" Use
syms x
If it complains that there is no command syms for arguments of type char, then you either do not have the Symbolic toolbox installed or you do not have it licensed.
If, after you use "syms x", you get a complaint about not being able to convert from syms to double, then you are using an older version of MATLAB that does not accept "==" in expressions. If that happens to you then change your expression from the form
A == B
to the form
(A) - (B)
with no "==" in it.
댓글 수: 0
이 질문은 마감되었습니다.
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!