Aaron's Homepage Forum
Aaron's Homepage Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Miscellaneous
 Lounge
 Math question

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

Screensize:
UserName:
Password:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkInsert EmailInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

   Insert an Image File (GIF, JPG, JPEG, BMP, ZIP, PNG)

   

T O P I C    R E V I E W
wasssup1990 Posted - Jan 29 2010 : 10:54:23 AM
This might not be the best place to ask this question but I'll give it a shot.
What do you call a function that depends on itself?

Like a(t):
a(t) = sin(t)*a(t)

I don't know if this is valid in the mathematics world but I have been able to do it before or at least something that looks similar to this.

Thanks
5   L A T E S T    R E P L I E S    (Newest First)
wasssup1990 Posted - Jan 31 2010 : 7:22:13 PM
That's okay, thanks for trying to help anyway.
codingplanet Posted - Jan 31 2010 : 3:36:22 PM
I've never used Matlab and to be honest I'm rather lost. I don't know where/what the problem is and I don't think I can help you, sorry.
wasssup1990 Posted - Jan 29 2010 : 9:12:24 PM
I have left out some parts and only included the necessary. You can see what depends on what.



Initial Conditions
tsim := 10:
pxi := 5:
pyi := 5:
vxi := 0.1:
vyi := -1:
m := 1:
Fxi := 0:
Fyi := 0:

Fx(t) := Fxi;
Fy(t) := Fyi;



Acceleration of particle
ax(t) := Fx(t)/m;
ay(t) := Fy(t)/m;



Velocity of particle
vx(t) := int(ax(t), t=0..t) + vxi;
vy(t) := int(ay(t), t=0..t) + vyi;



Position of particle from origin
px(t) := int(vx(t), t=0..t) + pxi;
py(t) := int(vy(t), t=0..t) + pyi;



d(t) := sqrt(px(t)^2 + py(t)^2);
d2(t) := diff(d(t), t);



Force on particle
Fx(t) := d2(t);
Fy(t) := 0;

wasssup1990 Posted - Jan 29 2010 : 8:16:26 PM
Thanks codingplanet.

I'm using a symbolic mathematics toolbox that comes with MATLAB called MuPAD.

a(t) := sin(t)*a(t):
f := plot::Function2d(a(t), t=0..10):
plot(f):

This won't yield a result because a(t) initially equals 0. I prefer to stick with continuous mathematics in my models and I don't want go discrete like I did with my physics simulator. Like where the force on an atom depends on the distance between the atoms. This can be considered recursive because the position of the atoms depends on the force applied to the atoms over time and then your feeding back the distance of the two atoms to recalculate the force vectors for the two atoms again.

So I looked up recursive functions as you mentioned and it seems to define what I am looking for.

I think I'll have to show you the actual problem that I have created at hand to see how we can fix it. I would really appreciate it if you could help me out.

Let me organize myself and I'll post it here.

Do you have MATLAB?
codingplanet Posted - Jan 29 2010 : 3:02:27 PM
I would say it is recursion or maybe a recursive function.

Edit: It is valid mathematical syntax (if that makes sense)

Aaron's Homepage Forum © 1995-2020 AARONCAKE.NET Go To Top Of Page
This page was generated in 0.05 seconds. Snitz Forums 2000