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

Community Tip - Your Friends List is a way to easily have access to the community members that you interact with the most! X

This value must be a scalar

BT_10780541
4-Participant

This value must be a scalar

I am getting error this value must be a scalar what is wrong with the worksheet. 

6 REPLIES 6

Are you really expecting h.n to be a 3 x 3 matrix with a total of 9 values?

 

I guess you just want it to be a 3 x 1 matrix( vector), correct?

 

So you should do it that way (no need for the range j):

Werner_E_0-1694466534676.png

For the subsequent calculations I would not use the range variable(s) but rather use the vectors as function arguments and use vectorization (the arrow over the expression):

Werner_E_1-1694466641161.png

Modified Prime 9 sheet attached

 

 

After looking closer in your sheet I guess now, that you actually wanted hn to be a 3x3 matrix, covering all combinations of the three TQ values and the three LCp percentages.

To make it work you have to name the guess value differently from the result matrix, e.g.

Werner_E_2-1694467485660.png

Don't display the matrix using the ranges i, and j as it will look like a vector if you do so

Werner_E_3-1694467531525.png

Similar for the other subsequent calculations

Instead of displaying

Werner_E_4-1694467640177.png

you may rather assign the function result to a variable and display it

Werner_E_5-1694467699788.png

 

 

BT_10780541
4-Participant
(To:Werner_E)

Thank you Werner for the help. In here why  it is necessary to have hhn instead of hn also, the result output hnij how do I get 1 4 and 7 value as 1 2 and 3 value the hierarchy is mismatching any suggestions  


@BT_10780541 wrote:

Thank you Werner for the help. In here why  it is necessary to have hhn instead of hn also, the result output hnij how do I get 1 4 and 7 value as 1 2 and 3 value the hierarchy is mismatching any suggestions  


Sorry - if thats a question, I don't understand it 😞

BT_10780541
4-Participant
(To:Werner_E)

Sorry for not being clear enough. While evaluting the below variable can we have all values of i first in hnij In this matrix as its is getting evaluated at 1 , 4 and 7 row can I ahve it as 1 2 and 3? 

 

BT_10780541_0-1694614635177.png

 

Hmmm, are you looking for a a 3x1 matrix where every entry is a 3x1 matrix again?

Or are you looking for a table with sort of row and column headers

Werner_E_0-1694618496114.png

 

BTW, you should not use the ranges to display the results like you did with

Werner_E_1-1694618686124.png

What you see is NOT a vector bit the result of applied implicit loops (the ranges) and you will notice that you are not able to assign that to a variable

Werner_E_2-1694618780901.png

 

Maybe you are looking for a vector like this:

Werner_E_3-1694618908793.png

 

 

 

Top Tags