topic Re: Spline Interpolation in PTC Mathcad
https://community.ptc.com/t5/PTC-Mathcad/Spline-Interpolation/m-p/692080#M192323
<P>I apologize for the fact that in the book I did not quite clearly describe the technique when on one line you can write several operators in a matrix with one row and several columns. I wanted the calculations in the book to be compact.</P>Sun, 11 Oct 2020 18:31:12 GMTValeryOchkov2020-10-11T18:31:12ZSpline Interpolation
https://community.ptc.com/t5/PTC-Mathcad/Spline-Interpolation/m-p/692035#M192318
<P>Hi,</P>
<P>I bought a book called Thermal Engineering Studies with Excel, Mathcad, and Internet, and I replicated a problem in chapter 1. </P>
<P> </P>
<P>I wondered if someone can point out what I am doing wrong because I'm not getting the answer. The message that I get is that the value must be a scalar or matrix. </P>
<P> </P>
<P>I also attached the file I was working on in Mathcad Prime 3.1.</P>
<P> </P>
<P>Thanks! </P>
<P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Chapter 1 - Spline Interpolation.PNG" style="width: 400px;"><img src="https://sejnu66972.i.lithium.com/t5/image/serverpage/image-id/32336i2D1E56191D8E8770/image-size/medium?v=1.0&px=400" role="button" title="Chapter 1 - Spline Interpolation.PNG" alt="Chapter 1 - Spline Interpolation.PNG" /></span></P>
<P> </P>Sat, 10 Oct 2020 06:22:20 GMThttps://community.ptc.com/t5/PTC-Mathcad/Spline-Interpolation/m-p/692035#M192318eduardoleal2020-10-10T06:22:20ZRe: Spline Interpolation
https://community.ptc.com/t5/PTC-Mathcad/Spline-Interpolation/m-p/692045#M192319
<P>There are three errors in your sheet:</P>
<P> </P>
<P>1) highlighted in yellow: You missed the argument "1+ORIGIN" in one of the submatrix commands</P>
<P>2) green arrows: You must use the column selector (Ctrl-Shift-C) here , not the power operator.</P>
<P>3) red arrows: these lines are 1 x 2 matrices but you created a 1x1 matrix with an implicit multiplication of an assignment and a string.</P>
<P>Basically Valery did this confusing thing to be able to place the comments beside the program lines. Thats the only reason for creating a matrix (by typing square brackets). For the program to work correctly only the assignment is necessary.</P>
<P>So you can replace the line</P>
<P>[X <- submatrix(.....) "coment text"]</P>
<P>simply by</P>
<P>X <- submatrix(.....)</P>
<P>No square brackets, no text.</P>
<P>If you want to duplicate what Valery did, you would type the square bracket, then "X <- submatrix(.....)" but then you press Shift-Space to create a second matrix column where you can type the comment string.</P>
<P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Werner_E_0-1602318303507.png" style="width: 665px;"><img src="https://sejnu66972.i.lithium.com/t5/image/serverpage/image-id/32341i7F4601ADE7A2DE13/image-dimensions/665x315?v=1.0" width="665" height="315" role="button" title="Werner_E_0-1602318303507.png" alt="Werner_E_0-1602318303507.png" /></span></P>
<P><SPAN class="tlid-translation translation"><SPAN class="" title="">I myself prefer to put the comments on a line of their own before the command.</SPAN> <SPAN class="" title="">That makes the program a little longer, but it's less confusing in my opinion.</SPAN></SPAN> In the example you posted this would look like this:</P>
<P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Werner_E_0-1602319348139.png" style="width: 566px;"><img src="https://sejnu66972.i.lithium.com/t5/image/serverpage/image-id/32342i6599F431EA6C60E8/image-dimensions/566x362?v=1.0" width="566" height="362" role="button" title="Werner_E_0-1602319348139.png" alt="Werner_E_0-1602319348139.png" /></span></P>
<P> </P>
<P><SPAN class="tlid-translation translation"><SPAN class="" title=""> </SPAN></SPAN></P>
<P> </P>Sat, 10 Oct 2020 08:46:10 GMThttps://community.ptc.com/t5/PTC-Mathcad/Spline-Interpolation/m-p/692045#M192319Werner_E2020-10-10T08:46:10ZRe: Spline Interpolation
https://community.ptc.com/t5/PTC-Mathcad/Spline-Interpolation/m-p/692080#M192323
<P>I apologize for the fact that in the book I did not quite clearly describe the technique when on one line you can write several operators in a matrix with one row and several columns. I wanted the calculations in the book to be compact.</P>Sun, 11 Oct 2020 18:31:12 GMThttps://community.ptc.com/t5/PTC-Mathcad/Spline-Interpolation/m-p/692080#M192323ValeryOchkov2020-10-11T18:31:12Z