15-Moonstone
June 5, 2024
Solved
invalid index
- June 5, 2024
- 1 reply
- 3878 views
How to solve this , the result should have the same values in z and qcza...
Why Qcpt has different quantities it should have more than (6X1) l...ike the one in z and qcza

If you make the changes I had shown and replace the wrong q.... you should get a result and your expression for Q.CPT should be a vector with 5 (not 6 because your range i.n runs only from 1 to 5) large vectors.
Did you notice the remarks i made at the end of my last answer?
Any value between 12 MPa and 15 MPa would be set to zero. If thats not your intention but you rater want that value to be unchanged, you cold add the green highlighted statement.
The result vectors still will have one element less than the input and its first element will always be zero because q[1 never gets assigned a value.

Maybe its an option for you not to use the range i.n at all and use vectorization. That way all six vectors in q...anchors are used and not only the first five.

No account yet? Create an account
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.