Community Tip - Visit the PTCooler (the community lounge) to get to know your fellow community members and check out some of Dale's Friday Humor posts! X
No matter what range i change i am not able to show 3d plot data. Anyways how's the range should be chosen for such scenarios
Solved! Go to Solution.
"Is there any specific reason"
Yes, Prime will not accept a 3D plot from a matrix with just a single row. It's because it (deliberately or inadvertently) was implemented that way:
The work-around (one of the many work-arounds that you need when working with Prime) for this shortcoming is to repeat the matrix row when you want to plot just a single point. This can be done by stacking:
Success!
Luc
Hi,
It would appear you need at least two rows in the data to get a scatter plot!
Cheers
Terry
In real Mathcad plotting a couple of points was a bit awkward as it needed a nested matrix to do so. This was made a bit easier in Prime.
But Mathcad would also allow to plot a single point and this seems to be broken in Prime. On the other hand, the plot abilities in Prime, and especially the 3D plots, are not really to be taken seriously anyway.
A simple workaround, if you really want to use Primes 3D plot and plot a single point, is to plot the same point twice 😉
Is there any specific reason the same point needs to be plotted twice?
"Is there any specific reason"
Yes, Prime will not accept a 3D plot from a matrix with just a single row. It's because it (deliberately or inadvertently) was implemented that way:
The work-around (one of the many work-arounds that you need when working with Prime) for this shortcoming is to repeat the matrix row when you want to plot just a single point. This can be done by stacking:
Success!
Luc
How do I to plot the points so that each row from each matrix “A, B, and C” be considered as “x, y, and z” coordinates of the points, respectively.
Example: P1(x1=3 y1=60 z1=30) ; P2(x2=10 y2=40 z2=30) ; … ; P21(x21=35 y21=80 z21=30)
To create the necessary n x 3 matrix you have to use "augment", not "stack".
Is it possible to pass a surface through these points (using the mesh or any other functions available in MathCAD, let me know how if it is possible
basically you have two options, either an interpolating surface which includes all points but of course would be defined piecewise, or a fitted surface which may not include exactly a single of the given points but will fit best.
For the first option you may find functions for a 2D interpolation which uses either linear or cubic spline interpolation here in the froum.
For the second option you may use "polyfit" for a polynomial fit or a solve block with "minerr" to fit your data to an arbitrary function type.
Using "polyfit" to fit a third order polynomial may look like this
@SP_9781969 wrote:
Is there any specific reason the same point needs to be plotted twice?
Yes, the reason is that it doesn't work in Prime if you don't 😄
We don't know why PTC implemented it that way. But then, we also don't know why a company with a full fledged CAD and 3D modeling program as one of their flag ships is not willing to implement 2D and 3D plotting capabilities in Prime which at least come up to the level of age old Mathcad (and Mathcad sure never was famous for its plotting abilities). They implemented in a very clumsy way a third party 2D plot tool which lacks a lot (like being unit aware) and the 3D plot in Prime sure is something better not used at all - the formatting abilities are nearly non-existent, at least very poor.
As of plotting just one single point in Primes 3D, my guess is that Prime always tries to connect the points, even when you have selected a symbol and no line (the default setting is Symbol:none and a full line). So it must run into troubles if you provide just one single point in case the programmers have not considered this case.