3 Replies - 7121 Views - Last Post: 15 August 2007 - 11:23 AM

#1 little_prince41  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 49
  • Joined: 10-August 07

How write actionscript of laplace transform in flash

Posted 10 August 2007 - 10:21 PM

Hello sir. :)

I have problem about math.

I want write function of laplace transform in flash.
then Kd ki kp is value of input text and then click button go to plot graph
.................................................. ...................

Posted Image

X(s)=kd*s^2 +kp*s+Ki;
F(s)=s^3 +(10+kd)*s^2 +(20+Kp)*s+Ki;
Gc(s)=X(s)/F(s);
Posted Image
.................................................. ...........................
this code in matlab
...............................................................................
Kp=?;//user input value
Ki=?;//user input value
Kd=?;//user input value


num=[Kd Kp Ki];//kd*s^2+Kp*s+Ki
den=[1 10+Kd 20+Kp Ki];//s^3+(10+Kd)*s^2+(20+Kp)*s+Ki

t=0:0.01:2;//t=0 add 0.01 to t=2
step(num,den,t)// plot unit step

example.
then kp=300;
ki=kd=0;
this image in matlab
Posted Image
..................................................................................

how i write code(actionscript) in flash
when Kp Ki Pd is value of user input.
and S is Laplace transform
Help me, Please
Thanks yous. :wub:

This post has been edited by little_prince41: 10 August 2007 - 10:26 PM


Is This A Good Question/Topic? 0
  • +

Replies To: How write actionscript of laplace transform in flash

#2 DilutedImage  Icon User is offline

  • D.I.C Addict
  • member icon

Reputation: 14
  • View blog
  • Posts: 646
  • Joined: 20-November 06

Re: How write actionscript of laplace transform in flash

Posted 11 August 2007 - 11:29 AM

What part are you having trouble with? Show us the ActionScript you've written, so we can troubleshoot it.
Was This Post Helpful? 0
  • +
  • -

#3 little_prince41  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 49
  • Joined: 10-August 07

Re: How write actionscript of laplace transform in flash

Posted 14 August 2007 - 02:31 AM

I dont know write actionscript in flash?
example ....
a=1/(s+20)*(s+3)
this code in laplace transform is a=e^(-2*t)-e^(-3*t)
when write in flash is a=Maht.exp(-2*t)-Math.exp(-3*t)
but its dont work
can you help me?
thanks you.
Was This Post Helpful? 0
  • +
  • -

#4 DilutedImage  Icon User is offline

  • D.I.C Addict
  • member icon

Reputation: 14
  • View blog
  • Posts: 646
  • Joined: 20-November 06

Re: How write actionscript of laplace transform in flash

Posted 15 August 2007 - 11:23 AM

Flash is not a graphing program; you can't just provide a formula, and expect a graph appear. You can certainly do it in Flash, but it'll take a bit more work. If you're not sure how to begin, then it would be a good idea to open the Help documentation and start reading.

I'm happy to help with any questions you might have along the way.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1