Community Tip - Your Friends List is a way to easily have access to the community members that you interact with the most! X
I am trying to solve a second order ODE in a solve block. I must have done something wrong with the syntax..
But I cannot figure out what is wrong, can anyone help?
It is just a simple calculation to find angular position as a function of time of a droping (rotating) plate which as one edge fixed to a rotation axis. And the force is gravity alone.
Thanks so much!
Solved! Go to Solution.
All is OK in Mathcad 15:
Now I would like to find an error in Mathcad Prime - see about variables lables here http://communities.ptc.com/message/187832
The corrected Mathcad Prime sheet in attach.
I am trying use root on the odesolve result. But I cannot , can someone let me know how to do it? It said it is out of the range.
Thanks
One example:
I can understand Valery's example, but I do not know what is wrong with mine. Can someone tell me? BTW, what is the difference between
and
When should I use a function(t) like Valery does in his example and when should I use the function at the end of my program?
Thanks
You can get it to work by replacing the dH(U,n,k,t)/dt term by the the gradient term as it appears in your ODE solve block (ie U.(1-k/H)^n or whatever it is). The results are values of time not values of the SOLVER function. However, what exactly are you trying to achieve here? The SOLVER function as it stands doesn't make much sense to me.
Alan
Thanks, Now I get it.
Would you or anyone tell me the limitation of the derivative function? Like in this case, since I defined dH/dt = f(H(t)), I can replace it with f(H(t)) to do calculation. But in the case if I dont have f(H(t)) , I am forced to have mathcad calculate dH/dt, how can I avoid running into problem like what I had or how to spot a potential problem which would not allow me to use dH/dt directly?.
My function is to found a series of linear line that has a specified y-intercept and is tangent to the function of the curve fit, which is H(t). What I am really interested in is the slope of that line. So I first find where the linear line make tangent to H(t) and then find the value of that tangent slope. Can someone suggest a different way to do it? Or How should I write my program to skip finding "t" where the linear line is tangent to the curve and the solve for tangent slope? Is there a way to find the tangent slope I want directly?
What are other methods to acheive the same result? I want to learn more method
BTW, go back to my question about program.
When I define a function f(t) = some program,
what is the difference for using f(t) and f as the last line of entry in the program? Like in the two images I posted earlier, (the one with SOLVER(t) gives error, but the one with SOLVER work fine). But sometimes I see program ending in f(t), such as Valery's example
I am confused with their meaning.
Thanks
Henry
henry leung wrote:
Thanks, Now I get it.
Would you or anyone tell me the limitation of the derivative function?
Thanks
Henry
We can use in Mathcad numerical and symbolic finding derivative.
But the numerical finding derivative is incorrect operation from the point of view of mathematics.
IC...so the reason for error in my original worksheet is because mathcad cannot numerically evaluate the derivative dH/dt, so I must use the symbolic one?
Thanks
henry leung wrote:
IC...so the reason for error in my original worksheet is because mathcad cannot numerically evaluate the derivative dH/dt, so I must use the symbolic one?
Thanks
Mathcad can numerically evaluate... but the numerical finding derivative is incorrect operation from the point of view of mathematics.
Oh, what I mean is in my original worksheet, mathcad trys to numerically evaluate the derivative but failed because of the capability of the software or the range was too large etc. Forcing me to use symbolic evaluation to find the value. Because they all mean a derivative of a function. It looks like to me mathcad cannot use numerically evaluate the derivative of the function, H(t), in my worksheet because it is a result of odesolve and it is too much work load for the derivative calculator. Because mathcad can numerically evaluate function of H(t), it is just easier for the computer to get the value of the derivative if I express it in terms of H(t) symbolicly ( and explicitly also). I guess I should avoid using the dx/dt function in mathcad when possible.
Of course it is always more accurate to have a symbolic expression. I understand numerical evaluation is an approximation, but it is good enough for what I need.
Thank you very much. But I am still confused with my other question about program. Hope someone can enlighten me a bit.
henry leung wrote:
Oh, what I mean is in my original worksheet, mathcad trys to numerically evaluate the derivative but failed because of the capability of the software or the range was too large etc. Forcing me to use symbolic evaluation to find the value. Because they all mean a derivative of a function. It looks like to me mathcad cannot use numerically evaluate the derivative of the function, H(t), in my worksheet because it is a result of odesolve and it is too much work load for the derivative calculator. Because mathcad can numerically evaluate function of H(t), it is just easier for the computer to get the value of the derivative if I express it in terms of H(t) symbolicly ( and explicitly also). I guess I should avoid using the dx/dt function in mathcad when possible.
Of course it is always more accurate to have a symbolic expression. I understand numerical evaluation is an approximation, but it is good enough for what I need.
Thank you very much. But I am still confused with my other question about program. Hope someone can enlighten me a bit.
About Num and Sym Math - http://communities.ptc.com/message/191043#191043
henry leung wrote:
But I am still confused with my other question about program. Hope someone can enlighten me a bit.
Have a look at the attached. With luck it might help.
Alan
This is very helpful for new mathcad user! I wish there is a way to archive file like this...Instead of scattering it across discussion. I am sure I am not the first one to ask the question.. But sometimes I dont even know what keyword to look for when I have question like this.
Thank you very much!
I have also attached what I was trying to do with my worksheet. And I have another question about this part of my attachment:
Is there any way to simplify this so that I do not have do line0, line1, line2 on the graph? Is it possible that I can give it 1 name and it plot all of the lines?
Thanks
henry leung wrote:
Is there any way to simplify this so that I do not have do line0, line1, line2 on the graph? Is it possible that I can give it 1 name and it plot all of the lines?
Thanks
Not in Prime unfortunately! Perhaps in a future release? (It can be done in M15)
Alan
AlanStevens wrote:
henry leung wrote:
Is there any way to simplify this so that I do not have do line0, line1, line2 on the graph? Is it possible that I can give it 1 name and it plot all of the lines?
Thanks
Not in Prime unfortunately! Perhaps in a future release? (It can be done in M15)
Alan
Sorry it's possible!
I copy a plot from Prime, edit it in Paint and return the picture back into Prime as a fine picture without "line1, line2 etc" but with neaded detals. Not for work but for reports for articles and books.
henry leung wrote:
I can understand Valery's example, but I do not know what is wrong with mine. Can someone tell me? BTW, what is the difference between
and
When should I use a function(t) like Valery does in his example and when should I use the function at the end of my program?
Thanks
One remark.
Sorry, we cannot change the value i in the for i cycle. The for i cycle does it itself!