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

Easy Question -range values

Easy Question -range values

Easy Question -range values

Problem: Analyzing crank torque, load is applied for 1/2 rotation

thetari:= converts thetai to radians

Now I need the following conditional statement for the compression stroke:
ag(thetar):= 1 if pi>thetar>0
0 otherwise

Po= Pp*ag(thetar)
I get an error message that states ag(theta) must be a scalar.

What am I doing wrong? I am new to Mathcad.


RE: Easy Question -range values


is one approach


RE: Easy Question -range values

OK - Now I am getting ag(thetar[i) is undefined.

Wouldn't the conditional statement define the variable?


RE: Easy Question -range values

did you define thetari as thetar[i?  Otherwise, you have no subscripts


RE: Easy Question -range values

How can I include a snap shot of my sheet?

thetar[i= theta[i*pi/180

I have a results table -but it is listed as thetar=


RE: Easy Question -range values


>How can I include a snap shot of my sheet?

You may store your snapshot at http://www.directupload.net an post the link in the forum like this:

"[I M G http:// www .directupload.net/images/050304/EZhgiprl.gif]" (without spaces)

looks like:

If you want to calculate the pressure and the froces in the crankshaft (even of more-cylinder-engines), I uploaded a 7-page-calulation in PDF. I stored it at the GMX-page:


You've to chose: "GMX Mediacenter starten" and you can download the file. Next week I will publish it at my homepage: http://mitglied.lycos.de/Chr_Meissner in the section "Studium".


RE: Easy Question -range values

OK - That part is working now.

If I have a data table with two columns - when charted I get a shape that looks like two sine curves slightly off phase of one another.

I need to determine the area under the curve (integrate).  I don't have an equation of curve but I have data to generate the curve.

Is there a way to determine this with Mathcad?

And I guess if it isn't a .gif if won't display?


[I M G http://http://server3.uploadit.org/files/jackboot-Torque.JPG]

RE: Easy Question -range values

Brute force numerical integration, which you can do as a summation


RE: Easy Question -range values

Hi jackboot,

1) posting pictures: The link you used include the "http://"-expression two times; AND you wrote "I M G" with spaces, it should be "IMG" (when I copied the right part of the link, I saw your picture)

2) integrate: the first solution, posted by IRstuff (numerical  integration), is the easiest one, but there is another more precise possibility: (e.g. spline) interpolation.


RE: Easy Question -range values

Christian - Thanks - You can't imagine how much time you just saved me.


RE: Easy Question -range values

One more question:

I am getting a number for my area under the curve that doesn't seem correct.  For instance, I am integrating from 0 to 360.  If I change the limits to 0 to 120 - I should get 1/3 the value - but I don't.  Can anyone explain what I am doing wrong?

RE: Easy Question -range values

The 3 curves don't look identical to me.


Greg Locock

Please see FAQ731-376 for tips on how to make the best use of Eng-Tips.

RE: Easy Question -range values


I can't find a mistake in your MathCAD-sheet jet. You should get the same value for "Anum" and "O". I only noticed, that "O" ist nearly 180 times greater then "Anum" (a half cycle?).


RE: Easy Question -range values

@IRstuff: OK, I see the file,
but I can't open *.xmcd-Files (only *.mcd); I've MathCAD 2001.

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


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