From: theasus on
I want to plot this equation;

[URL=http://img375.imageshack.us/i/90489043.jpg/][img]http://img375.imageshack.us/img375/2024/90489043.jpg[/img][/URL]

x(t)=sin(2*pi*50*t)

This plot axes will be y(t) - t .Could you purpose any idea for this operation ?
I have written these codes;
>>t=0:0.01/50:10/50;
>>Q=dsolve('Dy+8.5*y=5.4*sin(2*pi*50*t)*sin(2*pi*50*t)','y(0)=0','Dy(0)=0','t')
>>plot(Q,t);
And I got some errors;
??? Error using ==> plot
Conversion to double from sym is not possible.
How can I fix this problem??
From: Wayne King on
"theasus " <theasus87(a)hotmail.com> wrote in message <i2udmo$odq$1(a)fred.mathworks.com>...
> I want to plot this equation;
>
> [URL=http://img375.imageshack.us/i/90489043.jpg/][img]http://img375.imageshack.us/img375/2024/90489043.jpg[/img][/URL]
>
> x(t)=sin(2*pi*50*t)
>
> This plot axes will be y(t) - t .Could you purpose any idea for this operation ?
> I have written these codes;
> >>t=0:0.01/50:10/50;
> >>Q=dsolve('Dy+8.5*y=5.4*sin(2*pi*50*t)*sin(2*pi*50*t)','y(0)=0','Dy(0)=0','t')
> >>plot(Q,t);
> And I got some errors;
> ??? Error using ==> plot
> Conversion to double from sym is not possible.
> How can I fix this problem??

Hi, does this do what you want:

t=0:0.01/50:10/50;
Q=dsolve('Dy+8.5*y=5.4*sin(2*pi*50*t)*sin(2*pi*50*t)','y(0)=0','Dy(0)=0','t')
ezplot(Q,[t(1) t(end)]);

Wayne
From: theasus on
Ok It is worked.Thanks!!But I have used same method for another equation which is more complex but It doesn't worked;
[IMG]http://i30.tinypic.com/2yke3at.jpg[/IMG]

And I have used these codes;
>>t=0:0.01/50:10/50;
>>Q=dsolve('Dy+299*y+100171*y^2=21*sin(2*pi*50*t)*sin(2*pi*50*t)','y(0)=0','Dy(0)=0','t')
>>ezplot(Q,[t(1) t(end)];

When I wrote these codes my computer is locked.And I have tried many times but didn't get result.How can I get over from this problem?
From: theasus on
I really couldn't undestand where is the problem?Is there any mistake in this expression?
From: theasus on
I couldn't get an answer or an idea for my question.Could you propose any idea for this operation ? where is my mistake????
Thanks...