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

Community Tip - You can Bookmark boards, posts or articles that you'd like to access again easily! X

Error : the value must be a real number

YA_10963798
12-Amethyst

Error : the value must be a real number

I need to draw this plot for the effective stress. However, this error occur ..How can I fix it?

YA_10963798_0-1727181818601.png

 

ACCEPTED SOLUTION

Accepted Solutions
Werner_E
25-Diamond I
(To:YA_10963798)

The reason for the error is that your vector sigma'v;top is a nested vector. Each element of this vector is a 8x1 vector on its own, so you actually have 64 values stored in that vector.

For every value of the range variable k you get a full vector at the abscissa and not just a single scalar as it is needed.

Werner_E_0-1727184591211.png

Because I don't know what the correct values for this vector should be and because your sheet is full of red errors right from the start, its impossible for me to help with a problem an page 11, sorry.

 

View solution in original post

6 REPLIES 6
Werner_E
25-Diamond I
(To:YA_10963798)

The reason for the error is that your vector sigma'v;top is a nested vector. Each element of this vector is a 8x1 vector on its own, so you actually have 64 values stored in that vector.

For every value of the range variable k you get a full vector at the abscissa and not just a single scalar as it is needed.

Werner_E_0-1727184591211.png

Because I don't know what the correct values for this vector should be and because your sheet is full of red errors right from the start, its impossible for me to help with a problem an page 11, sorry.

 

Actually I think I did it wrong. Because it should be one vector. but accumlated . For example if sigma is = ( 0,1,2,3)    .... 0+1=1 then 1+2=3, then 2+3=5....... and the result of the last should be the sum of all previous results = (1,2,5,..). And that will produce one vector not 8 vectors with 64 values. 

StuartBruff
23-Emerald III
(To:YA_10963798)


@YA_10963798 wrote:

Actually I think I did it wrong. Because it should be one vector. but accumlated . For example if sigma is = ( 0,1,2,3)    .... 0+1=1 then 1+2=3, then 2+3=5....... and the result of the last should be the sum of all previous results = (1,2,5,..). And that will produce one vector not 8 vectors with 64 values. 


.

A cumulative sum is such a common need that I'm surprised that Mathcad doesn't have a built-in cumulative sum function.  I note you've found your probem and therefore one of the many possible solutions, but it can be useful to have a cumsum function in your Mathcad toolbox

 

2024 09 24 A.png

 

Stuart

That's brillant . Thank you so much

I think I solve it. Thank you for trying 

YA_10963798_0-1727189918758.png

 

Werner_E
25-Diamond I
(To:YA_10963798)

You are welcome!

Announcements

Top Tags