??? Error using ==> plot Conversion to double from sym is not possible...help?

2 ビュー (過去 30 日間)
an
an 2014 年 4 月 7 日
回答済み: Alberto 2014 年 4 月 7 日
clc
clear all
Pc=1.6*10^9
Pa=300*10^9
Ps=1*10^9
r=5
h=1
d0=0.4
d=1:10:30
s=(d./r)
w1=4.3
E0=8.85*10^-12
Eb=6.830890.*(w1.^(3/2))
A1=d.^2
B1=(d./d0).^(1/3)
l=(0.5.*E0.*Eb.^2./B1.^2).*10^18
m=Pc
n=(4.*Pa./(1+s).^4)
x2=min(m,n)
Es=min(x2,l)
Ea= (Es.*(d+r).^2)./(2.*r.^2)
y1= (0.5.*Ea.^2.*d.^2)./((d+r).^2.*d.^3)
syms y
b=y.^2
y2= int(b,r,r+d)
u=y2
plot(d,u)

採用された回答

Alberto
Alberto 2014 年 4 月 7 日
It´s not clear what you are trying to do, but there are some bad things here:
1) when you use int command, you dont give the integration variable; i think it will be y.
2) the upper r+d is not a value, but an array. So u better write it like this:
y2= int(b,y, r,r+d(1))
( or some other selection in the array d), instead of yours :
y2= int(b,r,r+d)
By the way, you are using plot for representing 3 2D points (I hope you know that), but they cant barely be visible. You better use:
plot(d,u, 'x')
I hope this will be helpful.

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeProgramming についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by