×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

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

[Programming] This values can not be compared

[Programming] This values can not be compared

[Programming] This values can not be compared

(OP)
I've got a program that defines d.nom`[i if W.p`[i < 0,02 and if u.w2`[i > 2m/s.

The values W.p` cannot be compared with 0,02... that is what mathcad responds with.

I checked that the problem could be with the array of W.p`, cos it contains the complex numbers.

Does anyone know how to create a function that substracts array as so to have only REAL numbers in the final array? By the way, the complex numbers are not placed in the array one after another so any substract can not be used.   

RE: [Programming] This values can not be compared

Can you use Mathcad's "re" function applied to your array to extract the real pars?

RE: [Programming] This values can not be compared

(OP)
I didn't try it as I've read that it extract only the real parts from a complex, whereas I need to extract all the complex values from the array, which contain both the real and the complex numbers.

Thanks for a prompt answer anyways, any other suggestions?

RE: [Programming] This values can not be compared

Quote:

Does anyone know how to create a function that substracts array as so to have only REAL numbers in the final array?
Why not IFRs suggestion?  You can use:

MR:=Re(M) and use the vectorize operator _ to make it apply to each element in matrix M.

Quote:

I didn't try it as I've read that it extract only the real parts from a complex, whereas I need to extract all the complex values from the array, which contain both the real and the complex numbers.
If you want the imaginary part, use Im instead of Re.

I can't load your example because I have Mathcad 13.
 

RE: [Programming] This values can not be compared

I got that message in a program last week because I was trying to compare a value with units to a number (200 psig > 100 is undefined).

I didn't open your sheet, but that was the fix for that message in one of my programs.

David

RE: [Programming] This values can not be compared

(OP)
Well,
I can of course give you all my stuff, but it has 80 pages in Mathcad. The problem concerns creating a program to select proper heat exchanger from heat exchangers' standard.

All the data for this program is located in excel or come from excel and has been converted a couple of times in Mathcad. There are 10 documents in excel with different data for this project. So there is why i don't have defined rest of variables.

I will copy those final data needed for this program and enclose here.

I will try with Re function afterwards.

RE: [Programming] This values can not be compared

You have yet to describe what you really want to do with the complex quantities.  What's the significance?  Do you want to zero out the imaginary parts?  Do you want the absolute magnitude of the complex values?  Do you want to zero out the entire value?  Just what do you want to do ?

Obviously, you cannot directly compare a complex value to a real value.  

Why are there complex values at all?

TTFN

FAQ731-376: Eng-Tips.com Forum Policies
Chinese prisoner wins Nobel Peace Prize

RE: [Programming] This values can not be compared

(OP)
Thanks for your help.

I've fixed the problem on my own.

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


Resources

Low-Volume Rapid Injection Molding With 3D Printed Molds
Learn methods and guidelines for using stereolithography (SLA) 3D printed molds in the injection molding process to lower costs and lead time. Discover how this hybrid manufacturing process enables on-demand mold fabrication to quickly produce small batches of thermoplastic parts. Download Now
Design for Additive Manufacturing (DfAM)
Examine how the principles of DfAM upend many of the long-standing rules around manufacturability - allowing engineers and designers to place a part’s function at the center of their design considerations. Download Now
Taking Control of Engineering Documents
This ebook covers tips for creating and managing workflows, security best practices and protection of intellectual property, Cloud vs. on-premise software solutions, CAD file management, compliance, and more. Download Now

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