Community Tip - Did you get called away in the middle of writing a post? Don't worry you can find your unfinished post later in the Drafts section of your profile page. X
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.
> 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
Werner
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!
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
> 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
Werner
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
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!
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.
> Werner, I am so sorry for massacring your name.
No real problem 😉
Glad you got what you were looking for.
Please attach your Mathcad worksheet.
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.
Hi,
did you get the spreadsheet? I's is already published. Any suggestion concerning the last post?