作业帮 > 数学 > 作业

matlab求解方程.f=x*sin(y)+((pi*12/4+(60-x)*tan(pi/9))+48*y)*tan(

来源:学生作业帮 编辑:作业帮 分类:数学作业 时间:2024/05/22 12:48:14
matlab求解方程.f=x*sin(y)+((pi*12/4+(60-x)*tan(pi/9))+48*y)*tan(pi/9)=0,其中x范围为30到60,求y.
你这个就是一个式子,而不是方程,是超越的,没法直接求解,只能得到一系列的关系点.
>> syms x y
>> f=x*sin(y)+((pi*12/4+(60-x)*tan(pi/9))+48*y)*tan(pi/9);
>> ezplot(f,[30 60 -1 1])


>> x=30:60;

>> f1=eval(f);
>> n=length(f1);
>> for i=1:n
y(i)=solve(f1(i));
end
>> y=subs(y)
y =
  Columns 1 through 12 
   -0.1564   -0.1504   -0.1446   -0.1391   -0.1338   -0.1287   -0.1238   -0.1191   -0.1146   -0.1102   -0.1059   -0.1018
  Columns 13 through 24 
   -0.0979   -0.0941   -0.0904   -0.0868   -0.0833   -0.0800   -0.0767   -0.0736   -0.0705   -0.0676   -0.0647   -0.0619
  Columns 25 through 31 
   -0.0591   -0.0565   -0.0539   -0.0514   -0.0490   -0.0466   -0.0443
>>