Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Help,Conversion to double from sym is not possible

17 views
Skip to first unread message

mon...@gmail.com

unread,
Jun 5, 2006, 7:22:01 PM6/5/06
to
syms x;
ab=exp(-abs(x));
z=zeros(1,10);
for n=1:10
z(n)=int((x^n)*ab,x,-inf,inf);
end

matlab tells : ??? Conversion to double from sym is not possible.
I am a beginner of matlab, and don't understand what is wrong? Please
explain it to me, if possible.
Really appreciate.

Thank you.
Mond Zhu

mond

unread,
Jun 6, 2006, 2:55:55 PM6/6/06
to
I know what is going on here, now?
I post the solution,maybe it helps.

syms x;
> ab=exp(-abs(x));
> z=zeros(1,10);
> for n=1:10
> z(n)=double(int((x^n)*ab,x,-inf,inf));
> end
0 new messages