topic cspline with oscilating data in PTC Mathcad
https://community.ptc.com/t5/PTC-Mathcad/cspline-with-oscilating-data/m-p/257901#M100870
<HTML><HEAD></HEAD><BODY><P>I have a curve I'm trying to fit with cspline and interp (see the attached calculation). Unfortunately, my y axis data oscilates so I had to write my function in terms of the x axis and use csort to make everything work. I was able to get a function M(phi) which works, but what I really need is phi(M) of an integral I need to perform on phi. </P><P></P><P>So, what I need to do is rewrite my function in the opposite terms (I'm not sure what the math terminology would be here). Any suggestions? What is the proper term for what I'm trying to do? </P><P></P><P>Thanks. </P></BODY></HTML>Thu, 03 May 2018 16:31:10 GMTptc-12999622018-05-03T16:31:10Zcspline with oscilating data
https://community.ptc.com/t5/PTC-Mathcad/cspline-with-oscilating-data/m-p/257901#M100870
I have a curve I'm trying to fit with cspline and interp (see the attached calculation). Unfortunately, my y axis data oscilates so I had to write my function in terms of the x axis and use csort to make everything work. I was able to get a function M(phi) which works, but whatThu, 03 May 2018 16:31:10 GMThttps://community.ptc.com/t5/PTC-Mathcad/cspline-with-oscilating-data/m-p/257901#M100870ptc-12999622018-05-03T16:31:10ZRe: cspline with oscilating data
https://community.ptc.com/t5/PTC-Mathcad/cspline-with-oscilating-data/m-p/257902#M100871
<HTML><HEAD></HEAD><BODY><BLOCKQUOTE><TABLE border="1"><TBODY><TR><TD><P>I was able to get a function M(phi) which works, but what I really need is phi(M) of an integral I need to perform on phi. </P></TD></TR></TBODY></TABLE></BLOCKQUOTE><P>Its the othe way round, isn't it? In your sheet you have phi(M) and are asking for M(phi)</P><P></P><P>I can't test it without the Excel data but the attached file should help finding the inverse function(s).</P><P>I haven't looked at your various calculations before or where the data vectors come from - I just worked from the definition of your function phi_curve depending on the two vectors M_sort1 and Phi_sort1 and simply switched those vectors. Hope thats what you need.</P><P>Also showed how to get the inverse of any function using a solve block.</P></BODY></HTML>Wed, 05 Feb 2014 00:03:10 GMThttps://community.ptc.com/t5/PTC-Mathcad/cspline-with-oscilating-data/m-p/257902#M100871Werner_E2014-02-05T00:03:10ZRe: cspline with oscilating data
https://community.ptc.com/t5/PTC-Mathcad/cspline-with-oscilating-data/m-p/257903#M100872
<HTML><HEAD></HEAD><BODY><P>Thanks,</P><P></P><P>Unfortunately, that didn't quite work, at least I don't think it did. When you sort by the moment (Y axis in the picture below) the order doesn't make sense anymore when you turn it into a continuous function. I checked it by choosing a value of moment ( say 375) and there are three possible curvature values that could produce this moment value. The cspline function when sorting by moment produces a curvature value of ~.026 which is correct in one instance, but I don't think my integration will be correct. <IMG __jive_id="66850" class="jive-image-thumbnail jive-image" onclick="" alt="Moment-curvature-p157.jpg" src="https://community.ptc.com/legacyfs/online/66850_Moment-curvature-p157.jpg" width="450" /></P></BODY></HTML>Wed, 05 Feb 2014 01:09:35 GMThttps://community.ptc.com/t5/PTC-Mathcad/cspline-with-oscilating-data/m-p/257903#M100872ptc-12999622014-02-05T01:09:35ZRe: cspline with oscilating data
https://community.ptc.com/t5/PTC-Mathcad/cspline-with-oscilating-data/m-p/257904#M100873
<HTML><HEAD></HEAD><BODY><P>Also, I forgot to say, but below the first portion of the calculation (original attachment) where I define the functions is an intermediate results section. I placed values from the Excel file in here so that you can see the numerical results for a particular line of Excel data. </P><P></P><P>That's where the above moment-curvature curve comes from. </P></BODY></HTML>Wed, 05 Feb 2014 01:15:26 GMThttps://community.ptc.com/t5/PTC-Mathcad/cspline-with-oscilating-data/m-p/257904#M100873ptc-12999622014-02-05T01:15:26ZRe: cspline with oscilating data
https://community.ptc.com/t5/PTC-Mathcad/cspline-with-oscilating-data/m-p/257905#M100874
<HTML><HEAD></HEAD><BODY><BLOCKQUOTE><TABLE border="1"><TBODY><TR><TD><P>I checked it by choosing a value of moment ( say 375) and there are three possible curvature values that could produce this moment value.will be correct. </P></TD></TR></TBODY></TABLE></BLOCKQUOTE><P>I see, so your inverse is, mathematically spoken, not a function but just a general relation which is, as you pointed ot, not unique. Functional operators like integrals are defined for functions only - the outcome has to be unique for every abscissa value, which is not true for the inverse of M(Phi). So there is not much you could do analytically with Phi(M).</P><P>What should Phi(375) yield? A vector with three values?</P><P>How would you define integration over Phi(M)?</P><P>What should be the outcome of the definite integral int(Phi(M),M,350,400)?</P><P>This wouldn't all make much sense.</P><P></P><P>The only thing you can do is to turn your inverse into a function by restricting the Phi-range like your pocket calculator does if you ask for the inverse of sinus. arcsin(0.5) yields pi/6, but of course arcsin/0.5) has an infinite number of values (pi/6 + k*2*pi and 5*pi/6 + k*2*pi, with k=integer). But your calculator (and also Mathcad) restricts the angle to the range -pi/2 to pi/2 which makes the inverse a function with unique function values and that way analytical operation like integrals are valid.</P><P></P><P>You can do the same with your Phi(M). Restrict phi to the range 0 to 0.005 (approx.) and you have a function you are able to integrate. From your graph I see you can create three different functions Phi(M). You are able to integrate each of them frim 350 to 400. But what will you do with the three results?</P><P>I am not sure if this would be of help to you. And to automatically determine the number of possible inverse functions and determinig the exact phi-ranges could be a bit cumbersome.</P><P>So whatever you have to calculate by the integral of Phi(M), either it is sufficient to use the Phi-range up to the first maximum only or there may be another way to obtain it?</P><P></P><P></P><P><IMG __jive_id="66854" alt="05.02.png" class="jive-image" src="https://community.ptc.com/legacyfs/online/66854_05.02.png" /></P></BODY></HTML>Wed, 05 Feb 2014 02:22:23 GMThttps://community.ptc.com/t5/PTC-Mathcad/cspline-with-oscilating-data/m-p/257905#M100874Werner_E2014-02-05T02:22:23ZRe: cspline with oscilating data
https://community.ptc.com/t5/PTC-Mathcad/cspline-with-oscilating-data/m-p/257906#M100875
<HTML><HEAD></HEAD><BODY><P>Thanks Werner. That was very clear and helpful. </P><P></P><P>I think my solution, like you said much more eloquently, is to break the data up into specific groups for which a proper function can be defined and then doing a piecewise integration based on those ranges and limits. </P></BODY></HTML>Wed, 05 Feb 2014 17:49:36 GMThttps://community.ptc.com/t5/PTC-Mathcad/cspline-with-oscilating-data/m-p/257906#M100875ptc-12999622014-02-05T17:49:36Z