topic Re: CUBIC POLYNOMIAL in PTC Mathcad
https://community.ptc.com/t5/PTC-Mathcad/CUBIC-POLYNOMIAL/m-p/427310#M167717
<HTML><HEAD></HEAD><BODY><P>Hello Werner,</P><P></P><P>Sorry, I had a wrong sign in the equation. Please see the correct worksheet attached.</P><P></P><P>Thank you so much. You are right. We had this before, I had problem with defining i !!!</P><P></P><P>1- How do you decide the range for i? </P><P></P><P>2- And also, how do you define alpha sub i?</P><P></P><P>3- Why the graph does not plot Chi(alpha) at the bottom of the worksheet? Please see the attached.</P><P></P><P>4- How can we refine the polynomial to get 1 for Chi at alpha=0.5</P><P></P><P>Thank you,</P><P>Anousheh</P></BODY></HTML>Thu, 02 May 2013 01:27:06 GMTAnousheh2013-05-02T01:27:06ZCUBIC POLYNOMIAL
https://community.ptc.com/t5/PTC-Mathcad/CUBIC-POLYNOMIAL/m-p/427308#M167715
Hello everyone,This is rather URGENT. Would you please help me to generate a cubic polynomial for the function in the attached worksheet?Really appreciate your time and help.Thanks a lot,AnoushehThu, 03 May 2018 17:18:48 GMThttps://community.ptc.com/t5/PTC-Mathcad/CUBIC-POLYNOMIAL/m-p/427308#M167715Anousheh2018-05-03T17:18:48ZRe: CUBIC POLYNOMIAL
https://community.ptc.com/t5/PTC-Mathcad/CUBIC-POLYNOMIAL/m-p/427309#M167716
<HTML><HEAD></HEAD><BODY><P>Didn't we had that same kind of question sometimes before? Same methods apply, see attached</P></BODY></HTML>Thu, 02 May 2013 00:26:08 GMThttps://community.ptc.com/t5/PTC-Mathcad/CUBIC-POLYNOMIAL/m-p/427309#M167716Werner_E2013-05-02T00:26:08ZRe: CUBIC POLYNOMIAL
https://community.ptc.com/t5/PTC-Mathcad/CUBIC-POLYNOMIAL/m-p/427310#M167717
<HTML><HEAD></HEAD><BODY><P>Hello Werner,</P><P></P><P>Sorry, I had a wrong sign in the equation. Please see the correct worksheet attached.</P><P></P><P>Thank you so much. You are right. We had this before, I had problem with defining i !!!</P><P></P><P>1- How do you decide the range for i? </P><P></P><P>2- And also, how do you define alpha sub i?</P><P></P><P>3- Why the graph does not plot Chi(alpha) at the bottom of the worksheet? Please see the attached.</P><P></P><P>4- How can we refine the polynomial to get 1 for Chi at alpha=0.5</P><P></P><P>Thank you,</P><P>Anousheh</P></BODY></HTML>Thu, 02 May 2013 01:27:06 GMThttps://community.ptc.com/t5/PTC-Mathcad/CUBIC-POLYNOMIAL/m-p/427310#M167717Anousheh2013-05-02T01:27:06ZRe: CUBIC POLYNOMIAL
https://community.ptc.com/t5/PTC-Mathcad/CUBIC-POLYNOMIAL/m-p/427311#M167718
<HTML><HEAD></HEAD><BODY><BLOCKQUOTE><TABLE border="1"><TBODY><TR><TD><P>Anousheh Rouzbehani wrote:</P><P>...</P><P></P><P>1- How do you decide the range for i? </P><P></P></TD></TR></TBODY></TABLE></BLOCKQUOTE><P>You decide upper and lower limits. You decide number of points depending on the resolution/closeness of fit you want.</P><P></P><BLOCKQUOTE><TABLE border="1"><TBODY><TR><TD><P></P><P></P><P>2- And also, how do you define alpha sub i?</P><P></P><P></P></TD></TR></TBODY></TABLE></BLOCKQUOTE><P></P><P>Use the [ key i.e. alpha[i produces alpha sub i.</P><P></P><BLOCKQUOTE><TABLE border="1"><TBODY><TR><TD><P></P><P>3- Why the graph does not plot Chi(alpha) at the bottom of the worksheet? Please see the attached.</P><P></P><P></P></TD></TR></TBODY></TABLE></BLOCKQUOTE><P>Because you pass a vector of alphas to Chi, and Chi is written in such a way that the product in the numerator returns a scalar when each is a vector. You need to vectorise Chi when you pass it a vector i.e. either put an arrow over the top (see the matrix menu) or pass it individual values, alpha sub i. - see attached.</P><P></P><BLOCKQUOTE><TABLE border="1"><TBODY><TR><TD><P></P><P></P><P>4- How can we refine the polynomial to get 1 for Chi at alpha=0.5</P><P></P><P></P></TD></TR></TBODY></TABLE></BLOCKQUOTE><P>One (rather coarse) way is simply to weight the point alpha = 0.5 by adding many points with alpha = 0.5 to the vector of points created before you do the fit - see attached.</P><P></P><P>Alan</P></BODY></HTML>Thu, 02 May 2013 07:26:44 GMThttps://community.ptc.com/t5/PTC-Mathcad/CUBIC-POLYNOMIAL/m-p/427311#M167718AlanStevens2013-05-02T07:26:44ZRe: CUBIC POLYNOMIAL
https://community.ptc.com/t5/PTC-Mathcad/CUBIC-POLYNOMIAL/m-p/427312#M167719
<HTML><HEAD></HEAD><BODY><P>Just for the fun of it here's a slicker way of getting the fit and forcing it to go through 1 at alpha = 0.5.</P><P></P><P>Alan</P></BODY></HTML>Thu, 02 May 2013 08:40:14 GMThttps://community.ptc.com/t5/PTC-Mathcad/CUBIC-POLYNOMIAL/m-p/427312#M167719AlanStevens2013-05-02T08:40:14ZRe: CUBIC POLYNOMIAL
https://community.ptc.com/t5/PTC-Mathcad/CUBIC-POLYNOMIAL/m-p/427313#M167720
<HTML><HEAD></HEAD><BODY><P>Yet another way to force p(0.5)=1.</P><P>Just sample only 4 data points (from 0.2 to 0.4), so the cubic is forced to go through all of them.</P><P>As your function is "well behaved" enough in the interval of concern we can do that without loosing the good fit.</P></BODY></HTML>Thu, 02 May 2013 10:35:37 GMThttps://community.ptc.com/t5/PTC-Mathcad/CUBIC-POLYNOMIAL/m-p/427313#M167720Werner_E2013-05-02T10:35:37ZRe: CUBIC POLYNOMIAL
https://community.ptc.com/t5/PTC-Mathcad/CUBIC-POLYNOMIAL/m-p/427314#M167721
<HTML><HEAD></HEAD><BODY><P>I think Alan has already answered your questions.</P><P>Some remarks Q1 and 2: I took the number of points and the range from your range variable alpha. So every of the 26 points you user for plotting would be considered by the fit. For a cubic fit you would need at least 4 datapoints.</P><P>If you you just 4 points, you will get a function whose graph will run exactly through those points. I used this in a prior post in this thread to force the cubic at (0.5/1). It depends on the function how good the fit would be with respect to the other data points. </P><P>More sample points usually will give a better fit.</P><P></P><P>As for the construction of the range variable and the functions arguments, you may use a simple formula:</P><P></P><P>If you have an range af x-values beginning at xB and ending at xE and you want nrofpoints datapoints (meaning you are deviding your interval in nrofpoints-1 parts) you may declare</P><P></P><P>i:=0 .. nrofpoints - 1</P><P></P><P>and define</P><P></P><P>x[i := xB + i * (xE-xB) / (nrofpoints - 1)</P><P></P><P>In case of your file I had 26 datapoints and a range for alpha from 0.25 to 0.5</P><P></P><P>so we have </P><P></P><P>i:=0..25</P><P></P><P>and</P><P></P><P>alpha[i := 0.25 + i * (0.5-0.25) / 25 </P><P></P><P>or</P><P></P><P>alpha[i := 0.25 + i * 1 / 100 </P></BODY></HTML>Thu, 02 May 2013 13:59:49 GMThttps://community.ptc.com/t5/PTC-Mathcad/CUBIC-POLYNOMIAL/m-p/427314#M167721Werner_E2013-05-02T13:59:49ZRe: CUBIC POLYNOMIAL
https://community.ptc.com/t5/PTC-Mathcad/CUBIC-POLYNOMIAL/m-p/427315#M167722
<HTML><HEAD></HEAD><BODY><P>Hello Werner,</P><P></P><P>Thank you so much for the explanations.</P><P></P><P>All the best,</P><P>Anousheh</P></BODY></HTML>Fri, 03 May 2013 01:54:59 GMThttps://community.ptc.com/t5/PTC-Mathcad/CUBIC-POLYNOMIAL/m-p/427315#M167722Anousheh2013-05-03T01:54:59ZRe: CUBIC POLYNOMIAL
https://community.ptc.com/t5/PTC-Mathcad/CUBIC-POLYNOMIAL/m-p/427316#M167723
<HTML><HEAD></HEAD><BODY><P>Hello Alan,</P><P></P><P>Thanks a lot.</P><P>Very helpful remarks. I really appreciate your time.</P><P></P><P>Regards,</P><P>Anousheh</P></BODY></HTML>Fri, 03 May 2013 02:05:11 GMThttps://community.ptc.com/t5/PTC-Mathcad/CUBIC-POLYNOMIAL/m-p/427316#M167723Anousheh2013-05-03T02:05:11Z