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

Add matrix columns as vector

SOLVED
Highlighted
Visitor

Add matrix columns as vector

I've got a matrix with i rows and j columns.  I'd like to add all i scalars in column 0 as the 0th element in a new j-element vector, and add all i scalars in column 1 as the 1th element etc..

How?  The column operator seems to require an integer, not a range variable to select the column.

 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted

Re: Add matrix columns as vector

Its a long time ago I had MC14 installed but I am not aware of any difference in this respect.
Its strange as you wrote that the very same approach worked OK when you retyped it.

Anyway, you have some solutions now you can chose from.

View solution in original post

5 REPLIES 5
Highlighted

Re: Add matrix columns as vector

Like this...

LucMeekes_0-1584987782469.png

Success!
Luc

Highlighted

Re: Add matrix columns as vector

Hi, Luc,

I wrote that into my MathCAD 14, but it doesn't work, attached.  The column operator is flagged as an error, "this value must be an integer."

Any ideas?  Is it time for me to upgrade my version?

...Larry

Highlighted

Re: Add matrix columns as vector

Here is an approach without any ranges:

Werner_E_0-1584992129538.png

 

> Any ideas? Is it time for me to upgrade my version?

No, Luc is using good old Mathcad 11. I just opened his file and it works OK in Mathcad 15, so it should do so as well in MC14. You just have to manually recalculate the sheet because Luc turns off autocalc by default, but you should not get any error message.

Did you used Lucs attached file or did you retype what he did?

 

Highlighted

Re: Add matrix columns as vector

Hi, Werner,

I tried Luc's file directly, no joy, although autocalc was on. Nothing worked, even the simple range variables were not defined. I then typed it in, now everything works except the final summation. Something wrong with the column operator not accepting a vector in MC14? Your programmed solution does work (:<))

Thanks for your help...

...Larry

 

Highlighted

Re: Add matrix columns as vector

Its a long time ago I had MC14 installed but I am not aware of any difference in this respect.
Its strange as you wrote that the very same approach worked OK when you retyped it.

Anyway, you have some solutions now you can chose from.

View solution in original post

Announcements