Skip to main content
Best answer by terryhendicott

Hi

All three variables are one column vectors. 

sigma0 is 11 high

hdash is 9 high

phi is 11 high 

They by matrix multiplication cannot be multiplied together.

I do not know the context of the equation in the scheme of things so there is two options.

 

multiply h'dash x (sigma0 transposed) to get a 9 x 11 matrix multiplied by phi  for a nine row column vector.

 

add some elements to hdash to get it to a 11 x 1 column vector to match size of sigma0 and phi then use vectorized element x element multiplication across the three matrices0

 

The ctrl equal signs in the example below should be changed to the consignment equals ":="

 

terryhendicott_0-1711907720810.png

1 reply

21-Topaz II
March 31, 2024

Hi

All three variables are one column vectors. 

sigma0 is 11 high

hdash is 9 high

phi is 11 high 

They by matrix multiplication cannot be multiplied together.

I do not know the context of the equation in the scheme of things so there is two options.

 

multiply h'dash x (sigma0 transposed) to get a 9 x 11 matrix multiplied by phi  for a nine row column vector.

 

add some elements to hdash to get it to a 11 x 1 column vector to match size of sigma0 and phi then use vectorized element x element multiplication across the three matrices0

 

The ctrl equal signs in the example below should be changed to the consignment equals ":="

 

terryhendicott_0-1711907720810.png

14-Alexandrite
March 31, 2024

I can't add or delete values it will effect the result

12-Amethyst
April 1, 2024

I think you misunderstood what terryhendicott is saying.  You have vectors of different lengths.  The only way that you can multiply them is if their dimensions agree.  h' has only 9 elements, while the other two vectors have 11.  By definition, you're missing two elements in h'. 

 

The equation you have written implies that you're trying to solve for Fs.  If you take the 10th element of sigma_0, and multiply by the 10th element of h', there's nothing there.  h'(10) doesn't exist.  

 

As terryhendicott said, you need to use the ":=".  This assigns the values to the variable "Fs". Otherwise, when you use the "Fs = ",  you're asking Mathcad to give you the value of Fs.