Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

Showing results for

** Community Tip** - You can change your system assigned username to something more personal in your community settings.
X

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page

Mar 03, 2017
04:34 PM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator

Mar 03, 2017
04:34 PM

Programming a Z-score Table

Hi, I need assistance debugging a program to build a Z-score table with the intention to reproduce in Mathcad a z-score table very similar to the one that we could create with an excel spreadsheet. This just for fun!

See attached files.

Thank you

juan

Solved! Go to Solution.

1 ACCEPTED SOLUTION

Accepted Solutions

Mar 06, 2017
04:45 PM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator

Mar 06, 2017
04:45 PM

> I used the integral instead of the function pnorm because this is the only way that I can funnel the sum of the vectors X & Y into the limit of integration Z.

I see no problem in using that sum as argument of the pnorm function.

> Your suggestions of modifying T did not work for me

Additionally you have to use Z instead of T in the last line. After all you want a Z-table, not a T-table 😉

Regards

We**r**ner

10 REPLIES 10

Mar 03, 2017
05:41 PM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator

Mar 03, 2017
05:41 PM

Why do you post a pdf and not the worksheet itself??

Guess you should use T[r,c as upper limit of your integral in makeTable and not simply T.

Better way is to write T <-- a[r + b[c and then use T as upper limit as you have. No need to create a vector T.

Why do you program the integral yourself? Mathcad provides the "pnorm" function!

Mar 03, 2017
06:48 PM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator

Mar 03, 2017
06:48 PM

Hi Wegner,

Finally I could upload the Mathcad file now. I tried many times at the time of sending my post without success. Here is the file to be look at.

I used the integral instead of the function pnorm because this is the only way that I can funnel the sum of the vectors X & Y into the limit of integration Z.

If you can do it using both methods is excellent, then I could compare both of them

Your suggestions of modifying T did not work for me

thank you!

juan

Mar 06, 2017
04:45 PM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator

Mar 06, 2017
04:45 PM

> I used the integral instead of the function pnorm because this is the only way that I can funnel the sum of the vectors X & Y into the limit of integration Z.

I see no problem in using that sum as argument of the pnorm function.

> Your suggestions of modifying T did not work for me

Additionally you have to use Z instead of T in the last line. After all you want a Z-table, not a T-table 😉

Regards

We**r**ner

Mar 06, 2017
07:35 PM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator

Mar 06, 2017
07:35 PM

Hi Wegner!

Wow!!!!!

You are simply the BEST, like Tina Turner's song .

I posted a previous problem some weeks ago concerning debugging a long expression for calculating the alcohol density given some temperature and some alcoholic strength. Luckily, one of the user identified my error and I got the expected results. Back then, my idea was to build a table similar to the one that you have just elegantly programmed. I was working on that too, modifying your procedure to suit such a long expression. I tried many different ways without luck. Here I attach the Mathcad worksheet and the density table as guide for a fix. I worked with a small subset of a whole table, with temperature ranging from 10 to 20 and the alcohol strength from 0.50 to 0.59. Have a look please, and tell me if there is a solution. Thank you!

juan

Mar 09, 2017
01:47 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator

Mar 09, 2017
01:47 AM

juan suarez wrote:

Hi Wegner!

The "g" should still be an "r" 😉

I tried many different ways without luck. Here I attach the Mathcad worksheet and the density table as guide for a fix.

Two errors:

1) t is a range but it has to be a vector to be able to be processed by the program

2) Your table make program uses t an p but should use the appropriate elements of the input arguments a and b instead!

Mar 09, 2017
09:54 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator

Mar 09, 2017
09:54 AM

Werner, I am so sorry for massacring your name. It was unintentionally. Why did you let my errors run for such a long time without warning me? You made me realize that I was mistyping your name since the beginning of this thread. I apology for that. On the opposite side, I celebrate your expertise and know how. You are really a very smart guy, a genius! People @ PTC need to hire persons like you!!

Your fix and your trick, worked awesome. After your brilliant fix, I modified your code to turn the first row into a column vector and the first column into a row vector to simulate the arrangement like in the alcohol density table attached earlier.

Thank, thank you very much.

regards,

juan.

Mar 09, 2017
10:36 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator

Mar 09, 2017
10:36 AM

> Werner, I am so sorry for massacring your name.

No real problem 😉

Glad you got what you were looking for.

Mar 04, 2017
12:06 PM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator

Mar 04, 2017
12:06 PM

Please attach your Mathcad worksheet.

Mar 04, 2017
01:09 PM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator

Mar 04, 2017
01:09 PM

I attached in a previous post last night , but it is waiting for the moderator for approval (more than 16 hrs). I resubmit it again.

Mar 08, 2017
05:40 PM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator

Mar 08, 2017
05:40 PM

Hi,

did you get the spreadsheet? I's is already published. Any suggestion concerning the last post?