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

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

Plotting vectors and matrices

asharif
1-Newbie

Plotting vectors and matrices

Can anyone help with this error in the attached file? Does Mathcad 3.1 allow plotting vectors or matrices?

@

1 ACCEPTED SOLUTION

Accepted Solutions
RichardJ
19-Tanzanite
(To:asharif)

I can't make the file to be 3.0 readable.

I know. It's ridiculous that version 3.1 can't share data with version 3.0, but that's the way it is.

You have a vector within a vector (note the double braces on each side). Nested arrays like that are allowed in Mathcad, but you can't plot them against each other. Delete one set of braces.

View solution in original post

13 REPLIES 13
RichardJ
19-Tanzanite
(To:asharif)

Does Mathcad 3.1 allow plotting vectors or matrices?

Yes. Unfortunately I can't tell what is wrong because Prime 3.0 can't read a Prime 3.1 file.

Richard,

Thanks for answering part of my question.

As for what is wrong, I can't make the file to be 3.0 readable. Anyway, I inserted a screen shot for those who can't open the version 3.1 files.

Untitled1.jpg

RichardJ
19-Tanzanite
(To:asharif)

I can't make the file to be 3.0 readable.

I know. It's ridiculous that version 3.1 can't share data with version 3.0, but that's the way it is.

You have a vector within a vector (note the double braces on each side). Nested arrays like that are allowed in Mathcad, but you can't plot them against each other. Delete one set of braces.

Richard,

Right on! Removing one of the brackets solved the problem.

I definetely did not notice the double brackets.

Adam

It's hard to tell from the picture, but it looks like you might have created two vectors of single element vectors. The square [brackets] define an array (matrix or vector), you've got X = [[234]] double square brackets, this would stop the attempt to plot.

Thanks Fred. You correctly pointed out the problem too.

Although the plot is generated correctly, I still have a minor error with the Y axis.

RichardJ
19-Tanzanite
(To:asharif)

I don't know what the problem is this time. Based on the image, it looks like it should plot fine. I would need to look at the Mathcad worksheet, but unfortunately I can't.

Richard,

It plots fine but there is an error on the Y axis placeholder. The error says "These array elements must be scalars. They cannot be vectors or matrices". I replaced the expression with a real number but the error persists.

But thanks a lot for solving hte original problem.

StuartBruff
23-Emerald II
(To:asharif)

Adam Sharif wrote:

Richard,

It plots fine but there is an error on the Y axis placeholder. The error says "These array elements must be scalars. They cannot be vectors or matrices". I replaced the expression with a real number but the error persists.

But thanks a lot for solving hte original problem.

I denested your original vectors and it seems to work for me in the Prime 3.1 trial version.

Stuart

Hi Stuart,

I think I must have a flackey installation. Actually I had several other issues that I surely cannot explain at this time. Like I have other files that would work fine on another computer, but on mine it would give all sorts of errors for every thing. I tired to get help from the support team but received no reply. I think there is something related to Mathcad 15 which I had installed first (and it did not seem to work smoothly) before learning about 3.1 which I installed the next day or so. 3.1 also behaved very strangely. So I decided to uninstall Mathcad 15 hoping the problem would go away. 3.1 operation did improve; but, obviously still there are issues.

Anyway, I greatly appreciate taking the time to try and share your result.

VladimirN
24-Ruby II
(To:asharif)

Please find in attachment your edited worksheet. Now it works fine in your Prime version?

Vladimir,

It does work.

Thanks.

Top Tags