Can someone help me with this program. I cannot seem to plot the graphs nor can I get the output matrices.
Thanks
RA
Solved! Go to Solution.
Instead of ending the program with [t f u u''] end it with:
augment(t,f,u,u'')
Then you should be able to plot u versus t for example.
Success!
Luc
Show please your ODEs!
did you get the zip file?
Yep, the zip file was found. I'm limited to Prime Express (no programming a.o.) so I cannot run the program.
At first glance:
In your Solution program you assign n*delta_t to each of the values t[i (That is t with index i). Note that n*delta_t is a constant of 2 seconds. I guess you want to assign i*delta_t to each value of t[i...
Then you go and test the t[i value against, 0, t.1 and t.2 .... Note that there is a difference between t[1 and t.1
t[1 is the second (!) value in the array t, that is because array inexing starts at 0 (controlled by the constant ORIGIN)
t.1 is just a variable t with subscript 1.
Try to correct your sheet with the above notions in mind and come back for further advice if needed.
Success!
Luc
"help me with this program"
Which program?
Please send in your Mathcad or Prime worksheet.
You may have to zip it first. A serious bug in this forum prevents direct uploading of Mathcad and Prime worksheets for most users. But a .ZIP file can be attached to a posting.
To get the .zip file, use Windows Explorer, select the file, right-mouse click and select "Send to" then "Compressed (.zip) folder". this results in a .zip file containing the worksheet that you can attach.
Luc
Luc, thanks for you help. I got the program to work, but not very sure how to output the all the results. Can you please show me?
You attached the very same sheet file, not the corrected one.
Hence no results for me to work with.
Luc
You still have a problem in your program.
The calculation for u'' gives units of ft^2/s^4, where it most probably would need to result in ft/s^2.
Correct that and come back when you need more help.
Success!
Luc
Luc, I am able to get individual results for t, f, u and u'' not not all the results together. The units are also consistent when individually extracted.
Sorry, my mistake. I multiplied f.i/m with omega^2*u.0, instead of subtracting.
But I do get an error message saying Solution is undefined.
What do you get when you evaluate t[0=
?
Luc
Instead of ending the program with [t f u u''] end it with:
augment(t,f,u,u'')
Then you should be able to plot u versus t for example.
Success!
Luc
Thanks Luc, that worked
Hi RA,
you could use the finite difference method below:
Yes, FDM is one of the several ways, and thanks for sharing that program with us. The time intervals need to be no more than 1/10 of the peak forcing function, which means that the number of iterations for a 2 sec response would be in the thousands.
Hi ,
For any order matrix, you can do so as indicated below:
Excellent solution procedure, and I will sure try that.
Thanks You very much
I got my program to work, but unable to extract the t, u, and u''. Can you please show me how to display a table of all these values?