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

Community Tip - Need help navigating or using the PTC Community? Contact the community team. X

Why I can't add units

YA_10963798
14-Alexandrite

Why I can't add units

When I add units it shows this error . How to fix it and why it happens?

I attached the files used

YA_10963798_0-1727068790808.png

it works with the first column but not with the second and third: 

YA_10963798_1-1727077054450.png

 

YA_10963798_0-1727076980497.png

 

Thanks in advance

9 REPLIES 9

Capture.JPG

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

StuartBruff
23-Emerald III
(To:YA_10963798)


@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.

 

2024 09 23 A.png

 

Stuart

Hi,

There is a problem with the data that means you cannot multiply by MPa for the entire matrix.  Some elements are text.

Capture.JPG

Capture2.JPG

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 

StuartBruff
23-Emerald III
(To:YA_10963798)


@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.

Capture.JPG

StuartBruff
23-Emerald III
(To:StuartBruff)

Attempt to load images and worksheet

 

2024 09 23 B.png2024 09 23 C.png

 

Images loaded OK, but worksheet still won't play ball.

Announcements

Top Tags