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

Operations with matrice array

SOLVED
Highlighted
Newbie

Operations with matrice array

Hello PTC community, thanks for taking your time to check this post out. I dont know if mathcad can do this but im pretty sure it can for what Ive seen. I want to make the sum of multiplying a component of a vector with a component of a matrice in an especific column, then with the next component of the vector with the second row in the same column and so on. Details are attached in the document. Thanks for all!

 

PS. If you are familiarized with chemical engineering, the problem I want to solve is a multicomponent destilation tower with the rigorous method ( I think its the Amundson-Pointnen method)

1 ACCEPTED SOLUTION

Accepted Solutions

Re: Operations with matrice array

Look at my comments in the attached sheet.

33 REPLIES 33

Re: Operations with matrice array

A few points...

If you're going to index from 1 to n, then you need to set ORIGIN = 1, otherwise the Mathcad default of 0 for indexing will mean that i:=1..3, K[i:=something will result in a 4 element vector with K[0 = 0.

The second is that you have defined Z by Z[i,j:=[matrix]. This will create a 3x5 array each element of which contains your [matrix]. (I'm guessing) you just need to write Z:=[matrix].

Stuart

Message was edited by: Stuart Bruff Corrected stupid error on my part ...

Re: Operations with matrice array

Look at my comments in the attached sheet.

Re: Operations with matrice array

Hello Werner, im almost done with the problem but i want to do the last operation and calculate the L matrix. The results should be

L1=100
L2=100
L3=200

L4=200

L5=50

The general form of the eq is

Lj=(Vj+1)+(SUM(m=1 until 5) Fm-Um-Wm)-V1
I want to keep using the vector notation as you told me and not the Lj

Re: Operations with matrice array

I hope you can help me again, thanks a lot

Re: Operations with matrice array

Hey Stuart, thanks for taking your time to check out my document. You expanded my vision on how could I have solved the problem. I hope you have a great day!

Re: Operations with matrice array

The sum is a constant 50, V1 is zero! So all you do is adding 50 to your vector V which has 6 elements and then you just want the last five elements of that result?? This would yield (200; 200; 200; 200; 50). Where do the two 100's in your suggested solution come from?

Furthermore i is not defined!?

Re: Operations with matrice array

Alexander Alvarez wrote:

I hope you can help me again, thanks a lot

As long as you can explain what you are trying to do and how you would get the results you mentioned!?

Maybe this helps

1.png

Re: Operations with matrice array

I tried to be as especific and clear as possible. This is what im trying to do, sorry for bothering, I hope you guys can help me.

Re: Operations with matrice array

I think the question about how to calculate L was already answered in my last replay and I showed two ways of doing it.

The result is not what you expected but you didn't answer the question why you think that (200; 200; 200; 200; 50) is the result and how you would calculate to get that result.

The formula given in your file is a bit different from the one you gave in your question above (the upper sum index is variable in the formula of your fle), so I think you have to clear things up for yourself first.

Anyway, the attached sheet may help as it shows much easiers ways to calculate your matrix K.