Contact US

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Paramatising a solve block with multiple unit types

Paramatising a solve block with multiple unit types

Paramatising a solve block with multiple unit types

Hi there,

I have set of equations that I need to solve numerically (colebrook-white, darcy, and bernouli equations). I express these equations in a solve block and use find to solve. Explicit matrix form works fine:
{x, y, z} = find(x,y,z)

However, I want to paramatise this solve block i.e:

f(x,y,z) = find(x,y,z)

but, x,y, and z, have the dimensions (m/s), (1) and (m) and mathcad doesnt support matricies of differing types as mentioned in the help page for find.

Mathcad must have a good reason for maintaining data in homogeneous matricies but I guess there must be a way to do what I need.

Any ideas how to achieve this?

I tried getting just one variable from the solve block, since this can be used to identify the state of all others but mathcad needs all three variables specified in the find function in order to solve (not sure why this is).

Thanks for reading.

RE: Paramatising a solve block with multiple unit types

No, Mathsoft didn't have a particularly good reason to restrict arrays to single data type. From Mathcad 12 onwards it was disallowed because the newly introduced static data type checking couldn't guarantee the result type if mixed units were allowed. Allowing mixed data types (and a return to allowing functions and values to be mixed in an array, as in Mathcad 11) was a long-standing feature request from many users. For some reason, Mathsoft and, subsequently, PTC stubbornly refused to do anything about it. However, I believe PTC have lifted the restriction in Mathcad Prime.

As for getting round it, I'm afraid the only method I know of is to remove units from the variables and add them back afterwards (look up the SIUnitsOf function).

RE: Paramatising a solve block with multiple unit types


This approach occurred to me but I like my units and thought I was missing something fundamental!

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members! Already a Member? Login


Close Box

Join Eng-Tips® Today!

Join your peers on the Internet's largest technical engineering professional community.
It's easy to join and it's free.

Here's Why Members Love Eng-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close