Matlab Error using ==> plot Conversion to double from sym is not possible.clearx=0:0.1:1;syms a;B=2*int((-x*sin(a)+1)./(1+(x.^2)-2*x*cos(a)).^1.5,a,0,pi);plot(x,B)运行后就出现?Error using ==> plotConversion to double from sym is not possible.

来源:学生作业帮助网 编辑:作业帮 时间:2024/07/20 14:34:40
Matlab Error using ==> plot Conversion to double from sym is not possible.clearx=0:0.1:1;syms a;B=2*int((-x*sin(a)+1)./(1+(x.^2)-2*x*cos(a)).^1.5,a,0,pi);plot(x,B)运行后就出现?Error using ==> plotConversion to double from sym is not possible.
xSMo@+{]׉#qiPQi$R5PJPJUQ9-JD3k_0YGC֬7oƖ{\@|F *VSJP *d P#:0+%vz)mKf 슝( VLH)ku1:P5Ӹc={IP}E-?ۣտܿSk?l^Idy{!"˯][Z#whELJ򻨷ذ!:C+|ks!D/6cqqwG7(. VѭL-o?zDe0zJ y15\T,IF1,ś~򪕢vsyW

Matlab Error using ==> plot Conversion to double from sym is not possible.clearx=0:0.1:1;syms a;B=2*int((-x*sin(a)+1)./(1+(x.^2)-2*x*cos(a)).^1.5,a,0,pi);plot(x,B)运行后就出现?Error using ==> plotConversion to double from sym is not possible.
Matlab Error using ==> plot Conversion to double from sym is not possible.
clear
x=0:0.1:1;
syms a;
B=2*int((-x*sin(a)+1)./(1+(x.^2)-2*x*cos(a)).^1.5,a,0,pi);
plot(x,B)
运行后就出现?Error using ==> plot
Conversion to double from sym is not possible.
大神们怎么改

Matlab Error using ==> plot Conversion to double from sym is not possible.clearx=0:0.1:1;syms a;B=2*int((-x*sin(a)+1)./(1+(x.^2)-2*x*cos(a)).^1.5,a,0,pi);plot(x,B)运行后就出现?Error using ==> plotConversion to double from sym is not possible.
你这个程序语法和函数使用有一些错误,我求解了一下,这个函数使用int也求不出解析解.下面是我用数值解做的,x=1时貌似没有积分值.
f=@(x,a) (-x*sin(a)+1)./(1+(x.^2)-2*x*cos(a)).^1.5;
I=[];
for x=0:0.1:1
I=[I 2.*quad(@(a)f(x,a),0,pi)];
end
x=0:0.1:1;
plot(x,I)