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

Community Tip - If community subscription notifications are filling up your inbox you can set up a daily digest and get all your notifications in a single email. X

Plotting worksheet results

jbusch1
1-Visitor

Plotting worksheet results

How can I loop through pages of a worksheet and plot the results? I'd like to define a range varible at the beginning and plot a simple scalar.
18 REPLIES 18
RichardJ
19-Tanzanite
(To:jbusch1)

I see you found it, so you can ignore my posts over on the other forum. Can you post the worksheet?

Richard

Richard, How do I post a worksheet?
jbusch1
1-Visitor
(To:jbusch1)

Thank you Richard, I'll delete the worksheet, rename it and repost, Richard Oliver
ELSID
8-Gravel
(To:jbusch1)

I think the # sign is causing trouble. I can not download. Anyone else having the same issue?
RichardJ
19-Tanzanite
(To:jbusch1)

ElSid is correct. If you post files to this forum please avoid anything other than alphanumerics and - or _ in the filenames. Certain characters make it all but impossible for us to download the file. Could you post the file again (to do this you can edit your existing post, delete the old file and attach a new one).

As a tip, if you save it in compressed (.xmcdz) format the file will also be much smaller.

Richard

I have deleted the file with non-alphanumeric name and posted it as "Mathcad", Thanks, Richard, I have deleted the version 14 worksheet and posted the version 11 worksheet. Thanks for the help, Richard Oliver
StuartBruff
23-Emerald III
(To:jbusch1)

On 11/12/2009 11:58:09 AM, Richard_Oliver wrote:
>I have deleted the file with non-alphanumeric name and posted it as "Mathcad",

If possible, please post the worksheets in Mathcad 11 format (as well as M14 format) - you'll get a wider audience and most user problems aren't version dependent.

Stuart

(File/Save As to bring up the dialog box, then choose type (at the bottom of the dialog))



Thank you, I have replaced version 14 with version 11
StuartBruff
23-Emerald III
(To:jbusch1)

On 11/12/2009 1:23:30 PM, Richard_Oliver wrote:
>Thank you, I have replaced
>version 14 with version 11

Unfortunately, as Tom has chosed to save his worksheet as an M14 xmcdz file I can't read it to see what he's proposed.

However, looking at your worksheet, there would be a lot of work to rearrange it into a function. One possible way to get what you want is, as suggested earlier, to use animation.

I've chosen to use a master&reference worksheet approach. I've disabled Wing1CL and saved your worksheet as the 'reference' worksheet. I've then created a 'master' worksheet that generates an appropriate value of Wing1CL *prior* to 'referencing' your worksheet. I use the Animation FRAME variable to set the value of Wing1CL. You then need to run the Animation to create a file of results that Mathcad can then read back in - you may have to fiddle around with the values to get of the extraneous values.

You could have used the FRAME variable approach directly within your worksheet (example attached) - but I found it easier to muck around with a clean worksheet.

Stuart


>I'd like to define a range variable at the beginning and plot a simple scalar.<<br> ________________________

If your question makes sense, it does in fact.
... like this



jmG

YOu can't loop through a sheet. Mathcad reads like a newspaper, top to bottom, left to right, just once. If you want something evaluated for multiple cases, you have to make a function out of it. Then you can evaluate it for different values of the argument.
__________________
� � � � Tom Gutman

Thank you Tom, I'm kind of old and new to Mathcad. This tool is fantastic. I'm trying to solve problems and learn as I go. You mentioned creating a function to allow me to plot the worksheet? You are exactly correct in understanding my goal. How would I create a function for the entire worksheet? Richard Oliver
RichardJ
19-Tanzanite
(To:jbusch1)

On 11/12/2009 1:53:14 PM, Richard_Oliver wrote:
>Thank you Tom, I'm kind of old
>and new to Mathcad. This tool
>is fantastic. I'm trying to
>solve problems and learn as I
>go. You mentioned creating a
>function to allow me to plot
>the worksheet?

Looks like Tom beat me to it (and therefore saved me some work!). Tom's version of your worksheet shows you how to use functions to generate the plot at the end.

> You are
>exactly correct in
>understanding my goal. How
>would I create a function for
>the entire worksheet?

What do you mean by "a function for the entire worksheet"? You can't turn a worksheet into a function (at least, not in any practical way). Could you be more specific about what it is that you want to do that Tom's version of your worksheet does not do?

Richard

Richard, you are correct! I wrote the response to Tom before careful review of his solution. It works perfectly! I simply need to understand how and what he did. I am very impressed with the assistance from all. Sincerely, Richard Oliver
ELSID
8-Gravel
(To:jbusch1)

I think what he is after is a programed loop. Similar to what have been agonizing in greating (lack of programing expertise). It appears that he re-uses each equation and wants to loop through it and create values as it goes, until done.
Again, lack of programming expertise hinders me in posting a sheet.
Richard_Oliver, was I correct in my explanation?

On 11/12/2009 3:47:00 PM, ElSid wrote:
>I think what he is after is a programmed loop.<<br> _______________________

A function, whether a user defined function or a more advanced user algo, does simply "loop". It loops from wherever introduced in the work sheet. It's only needed to call the looping index on both sides of the "looped object", whether resulting in an export, a quickplot an MDA ...etc. Looping through a work sheet existed before the extended function definition was introduced, i.e: before programme was introduced.


jmG

On 11/12/2009 10:03:37 AM, Richard_Oliver wrote:
>How can I loop through pages
>of a worksheet and plot the
>results? I'd like to define a
>range varible at the beginning
>and plot a simple scalar.
_______________________________

Nothing to loop through. Read the qs tutorials and correct the definitions to make them scalar... "This is not scalar", i.e: the work sheet is not scalar. If you want to plot Cmcg, make the function "scalar", i.e: define the dependent as function of the independent(s).

jmG



On 11/12/2009 10:03:37 AM, Richard_Oliver wrote:
>How can I loop through pages
>of a worksheet and plot the
>results? I'd like to define a
>range varible at the beginning
>and plot a simple scalar.
_______________________________

Try to imitate/understand/read + the attached demo, designed especially for you in term of your "Looping". Read the qs and learn how scalar functions are defined/assigned/carried/executed.
If your work sheet would be scalar, it would be � page long c/w plot and export. Unfortunately, it has to be redone from A...Z on blank sheet. Mathcad is not a simple calculator like TI-58 or else similar. From recollection, this project is likely to be dependent on + than one independent. I'm not saying the dependency wrt only one variate is incorrect, no. Simply that it does not source to the underlying engineering formulation for project collaboration of interest.

jmG



Announcements

Top Tags