×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

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

This value must be a scalar
2

This value must be a scalar

This value must be a scalar

(OP)
Hi,
Please find the attached image:

I'm not aware how this could be solved.
Any help would be highly appreciated.
Replies continue below

Recommended for you

RE: This value must be a scalar

Is lamba pw a vector as well?

You may want to write a for loop to make this happen. Example from mathcad 15:

S&T - www.re-tug.com

RE: This value must be a scalar

(OP)

Quote (sticksandtriangles)

Is lamba pw a vector as well?
Hi,
I'm sorry if I didn't provide whole data.
Please find the attached image:

RE: This value must be a scalar

So, you can't compare lambda _w directly to lambda_pw directly, because mathcad doesn't know which value in lambda_w (your vector) to lambda_pw (a scaler).

I imagine that line would work if you did the "vectorization" operator, as per your other thread. In the "Math" tab of the ribbon, click on "Operators" (has a cube root symbol on my version of mathcad), and at the bottom of the drop-down are the Vector and Matrix operators. The one you're looking for is a "V" with an arrow above it.

Make sure to highlight " lambda_w <= lambda_pw " and the apply the operator. Let us know if that fixes your problem.

RE: This value must be a scalar

(OP)

Quote (winelandv)

I imagine that line would work if you did the "vectorization" operator, as per your other thread. In the "Math" tab of the ribbon, click on "Operators" (has a cube root symbol on my version of mathcad), and at the bottom of the drop-down are the Vector and Matrix operators. The one you're looking for is a "V" with an arrow above it.

Make sure to highlight " lambda_w <= lambda_pw " and the apply the operator. Let us know if that fixes your problem.
Please find the attached image:
I'm sorry, but that doesn't fix the problem.
If you note the right side of the image, the comparison is OK. But when dealing with If statement, the problem comes.

RE: This value must be a scalar

If you stop and think about it, the example you show is actually a programmatic behavior embedded within the "=" functionality, but a program, as shown on the left side, does not use that functionality and must be explicitly programmed for it.

TTFN (ta ta for now)
I can do absolutely anything. I'm an expert! https://www.youtube.com/watch?v=BKorP55Aqvg
FAQ731-376: Eng-Tips.com Forum Policies forum1529: Translation Assistance for Engineers Entire Forum list http://www.eng-tips.com/forumlist.cfm

RE: This value must be a scalar

I don't use programming when I use mathcad, so LPS for IRstuff for filling in the missing knowledge.

RE: This value must be a scalar

Hoshang,

I would make a for loop for your situation, compare lambda w [i] to lambda pw in your for loop.

My example up above should be enough to make you dangerous.

S&T - www.re-tug.com

RE: This value must be a scalar

(OP)

Quote (IRstuff)

the example you show is actually a programmatic behavior embedded within the "=" functionality, but a program, as shown on the left side, does not use that functionality and must be explicitly programmed for it.
I tried several tricks but I couldn't catch this.
I removed the lower two If statements.
I tried with other comparison operators.
I tried also If and else statement instead of lower two If statements.
I tried If( , , , , , ) statement.
But with no success.
Any help will be highly appreciated.

RE: This value must be a scalar

Just make a vector equal in length to the comparison vector that has the same value in each row.

RE: This value must be a scalar

(OP)

Quote (IRstuff)

If you stop and think about it, the example you show is actually a programmatic behavior embedded within the "=" functionality, but a program, as shown on the left side, does not use that functionality and must be explicitly programmed for it.
Hi,
I know you have so many contribution in PTC Mathcad. So, I hope you be able to give a solution for this problem.

RE: This value must be a scalar

try something like this:

RE: This value must be a scalar

(OP)

Quote (structSU10)

try something like this:
Accepted as solution. Highly appreciated.

RE: This value must be a scalar

(OP)
Hi,
This time I've stuck with this:

Any help would be highly appreciated.

RE: This value must be a scalar

If I'm reading the flow of your program correctly, aren't you checking the compact limit before you check the non-compact limit? If so, you don't need to check if lambda_f is greater than the compact limit. Try and remove the "lambda_pf <" from that line and see if it gets it moving.

RE: This value must be a scalar

you use the i designation to define the function but none of the parameters have an i attributed to them. your lambda_rf should have an i and the i must be defined for the appropriate range.

RE: This value must be a scalar

(OP)
Hi, structSU10
Your help is highly appreciated and accepted as solution.
P.S., By accepted as solution, I mean I tried your approach and the problem is solved.

RE: This value must be a scalar

(OP)
Now another thought came into mind. Please find the attached image:

Is there any way combining these two steps into one step when calculating R_pc2 ?

RE: This value must be a scalar

(OP)
Hi, I'm sorry if I haven't been clear.
I meant the inclusion of the R_pc2<=M_p2/M_y2 condition into the If statement. How this can be done?

RE: This value must be a scalar

(OP)
Hi
Can anyone share thoughts with my query?

RE: This value must be a scalar

So, you're checking Rpc2 to see if it's less than the ratio between its plastic moment and yield moment (the shape factor, if I recall correctly).

So, what happens if Rpc2 exceeds that ratio? I assume you need to check all your Rpc values against the moment ratio?

RE: This value must be a scalar

(OP)

Quote (winelandv)

what happens if Rpc2 exceeds that ratio? I assume you need to check all your Rpc values against the moment ratio?
Thanks, if Rpc2 exceeds that ratio, then R_pc2=M_p2/M_y2.

RE: This value must be a scalar

It appears to me that you're already (essentially) doing that check with your first statement.

UNLESS, is there ever a case where lambdaw is less than lambdarw, but you could still end up with a value that is greater than your Mp/My? If the answer to this is "no", then you don't need to perform the check separately.

RE: This value must be a scalar

(OP)
Hi,
Please find the attached image for more clarification.
P.S
Lambda_w=h_c/t_w

RE: This value must be a scalar

(OP)
Hi
Any input would be highly appreciated.

RE: This value must be a scalar

(OP)
Hi,
Can't my issue be solved?

RE: This value must be a scalar

if that is correct you can use the max(1.0,Mp/Myc) in the last statement to force this to work.

RE: This value must be a scalar

(OP)
Hi structSU10,
Thanks. Should it be max or min function?
Please find the attached image. Am I doing it correctly?

RE: This value must be a scalar

I think it is min in this case as you are limiting the left side of the inequality to be less than or equal to the right side.

RE: This value must be a scalar

(OP)
Hi structSU10,
Thanks, I highly appreciate your help.

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



News


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