Skip to main content
12-Amethyst
September 30, 2022
Question

Problem plotting 3D surface in Mathcad 15

  • September 30, 2022
  • 1 reply
  • 4882 views

I have an issue plotting in Mathcad 15.

I am trying to plot a 3D surface, and I received a message that I have never seen before:

"Specified cast is not valid."

I do not know what that means and do not see the problem.

I could calculate the matrix that gets all the values for the surface calculation, but at the moment of plotting it, I receive that message.

 

Thank you in advance,

 

Rogelio

1 reply

25-Diamond I
September 30, 2022

The error message looks like it doesn't stem from Mathcad but rather from the underlying programming language.

I guess to get help you would have to attach your worksheet here so we can see whats going on.

12-Amethyst
September 30, 2022

Hello Werner, 

 

please, see the file attached.

 

thanks,

 

Rogelio

25-Diamond I
September 30, 2022

Hmm, this is what I see when I open your worksheet

Werner_E_0-1664561731494.png

No error message.

Here is the result when no lines were plotted but the contours filled and drawn

Werner_E_1-1664561882668.png

The error message you reported may be caused by some installation/software problem on your machine.

 

I have no idea if this could be of any help, but I resaved the sheet and attach it here. I also have removed the border around the plot because I remember that many people reported problems with 3D plots in MC15 when Windows 10 was brand new and one of the workaround suggested was to remove the border. Just a feeble attempt - if it does not help, then it should not hurt either 😉

 

Should have nothing to do with the plot failing, but I noticed that it looks like you are not aware that the default setting of ORIGIN is 0. This means that the first index in a vector or matrix is 0, not 1. Your ranges are defined to run from 1 up and the definition of your matrix ma uses these ranges. This means that the first row and first column (both have index number 0) never were assigned a value and so they default to zero. You can clearly see that in the display of Ma. I guess this wasn't done on purpose.

I was also surprised that in the defintion of x and y you are mixing meter and feet. Because the ranges start with one, the first value in x and y are -1meter+1feet = -0.605 m = -2.281 ft. Was this done on purpose?