d2jsp
Log InRegister
d2jsp Forums > Off-Topic > Computers & IT > Programming & Development > Simple Matlab Help > Need Help Tonight Please
Add Reply New Topic New Poll
Member
Posts: 13,667
Joined: Jun 16 2006
Gold: 285.00
Feb 12 2013 11:01pm
So my problem is that my output T is constant. Every number in my equation seen where it says T= is a constant, except for t, which is a matrix with multiple data points. My T should have as many different values as I have of t, but for some reason, my T is constant. This does not make sense to me at all.

The output of the matrix T can be seen on the left, all equaling 13.246. This isn't right, but I cant see why. Anyone that can help would be appreciated.






Member
Posts: 13,667
Joined: Jun 16 2006
Gold: 285.00
Feb 12 2013 11:22pm
I decided to try just doing T=exp(-t/tau) and it outputs varying data as it should. For some reason the equation T=Tf-((Tf-Ti)*(exp(-t/tau))) gives a constant, which makes no sense. the numbers in front should only be a constant and only affect the magnitude, but for some reason its messing up that way.
Member
Posts: 641
Joined: Sep 17 2009
Gold: 809.20
Mar 14 2013 03:57am
In order to make something random in matlab you have to use a funktion like rand. Otherwise matlab will always try to find a constant of your equation.
Member
Posts: 16,144
Joined: Mar 27 2008
Gold: 14,618.00
Mar 14 2013 12:32pm
we cant help you when we have not the content of "t"

but its most likely that exp(-t/tau) gets really small. when you google about float/double you will find how these numbers are stored

if you add a big number to a very small number, the result will be the big number

thats not something matlab-specific, thats basics of datatypes
Go Back To Programming & Development Topic List
Add Reply New Topic New Poll