When I add units it shows this error . How to fix it and why it happens?
I attached the files used
it works with the first column but not with the second and third:
Thanks in advance
Is it possible to multiple MPa with the general CPT not only one matric (CPT2) .. they are 29 and it won't be effecient to do them one by one
@YA_10963798 wrote:
Is it possible to multiple MPa with the general CPT not only one matric (CPT2) .. they are 29 and it won't be effecient to do them one by one
Try multiplying CPT by MPa. Multiplication by a scalar seems to operate over a nested array.
Stuart
Hi,
There is a problem with the data that means you cannot multiply by MPa for the entire matrix. Some elements are text.
I see. Thank you for your help .
I will solve this
Curse you, Terry! Posting the same information I did! 😈
The "posting a reply just after someone else made the same point" gremlin must be hard at work, today. 😎
Stuart
@YA_10963798 wrote:
Is it possible to multiple MPa with the general CPT not only one matric (CPT2) .. they are 29 and it won't be effecient to do them one by one
Ignore my previous reply. I've got network problems and couldn't download your worksheet, and so I was guessing how CPT was structured.
However, I've now managed to download your worksheet and created a function to run through each row of CPT and apply the intended units.
I've alse renamed your rows and cols to nrows and ncols - it's a dangerous practice to give a variable the same name as useful & common Mathcad functions!
All went well with apply the until the function applyUnits hit CPT row 8. Column 2 of that worthy seems to have a problem. Somewhare around row 500 of Column 2, the data switches to text (strings) rather than numbers. It's easy to skip over text, but the problem might indicate a problem with your original data or how you read it.
Stuart
I'll try to post the modified worksheet or images later ... my network baulks at adding them at the moment.
Just eliminate the text inputs.
Attempt to load images and worksheet
Images loaded OK, but worksheet still won't play ball.