cancel
Showing results for
Did you mean:
cancel
Showing results for
Did you mean:

Highlighted
Participant

## Spline Interpolation

Hi,

I bought a book called Thermal Engineering Studies with Excel, Mathcad, and Internet, and I replicated a problem in chapter 1.

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.

I also attached the file I was working on in Mathcad Prime 3.1.

Thanks!

2 REPLIES 2
Highlighted

## Re: Spline Interpolation

There are three errors in your sheet:

1) highlighted in yellow: You missed the argument "1+ORIGIN" in one of the submatrix commands

2) green arrows: You must use the column selector (Ctrl-Shift-C) here , not the power operator.

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.

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.

So you can replace the line

[X <- submatrix(.....)    "coment text"]

simply by

X <- submatrix(.....)

No square brackets, no text.

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.

I myself prefer to put the comments on a line of their own before the command. That makes the program a little longer, but it's less confusing in my opinion. In the example you posted this would look like this:

Highlighted

## Re: Spline Interpolation

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.

Announcements