Probability Programs

Probability Programs - Probability Programs Conversion from MC15 - 消息

#1 已发布: 2022/12/28 23:00:30
Norm Schutzkus

Norm Schutzkus

9个赞,共90个帖子。

组: User

Hello SMATH Collaboratory. I attempt to convert an older MC15 worksheet, yet stumble on my poor programming skills. Attached please find my attempt in SMATH and the MC15 worksheet.

I welcome your recommendation(s) to get my SMATH worksheet program "P" working and I'll attempt to take it from there to finish the conversion.

Sincerely,

Norm未找到文件。未找到文件。
#2 已发布: 2022/12/29 03:28:10
Alvaro

Alvaro

1,139个赞,共1,805个帖子。

组: User

Hi Norm. SMath can't assign a column like Mathcad column operator, but you can emulate it with a range.
BTW, I don't have Mathcad 15 at home, and can't read your Mathcad file. Hope that this helps

Clipboard01.png

Best regards
Alvaro.
#3 已发布: 2022/12/29 11:35:11
Norm Schutzkus

Norm Schutzkus

9个赞,共90个帖子。

组: User

Happy Holidays Alvaro!

Thank you, for your recommendations. I updated my worksheet, but the "Requested matrix does not exist". I added a snip of the "P" matrix expected from the MC sheet. The updated SMATH worksheet is attached.

I printed the MC worksheet to pdf but it expands the page width, thus there are multiple cut-off pages.

Again, I welcome your review recommendation(s).

Sincerely,

Norm

未找到文件。未找到文件。
1位用户喜欢此帖子
Alvaro 2022/12/29 15:09:00
#4 已发布: 2022/12/29 11:42:27
overlord

overlord

600个赞,共1,381个帖子。

组: Moderator

I didn't revise all your functions.
Only P, but it results same as in mathcad.
Rest is up to you.

Regards

Probability Programs_overlord.sm (51.45 KiB)已下载 1336 次。

screenshot.png
#5 已发布: 2022/12/29 12:42:54
Norm Schutzkus

Norm Schutzkus

9个赞,共90个帖子。

组: User

Happy Holidays and many thanks!

I'll press on using your recommendations. I would have never gotten this far; given up without this forum's help.

Sincerely,

Norm
#6 已发布: 2022/12/29 15:09:11
Alvaro

Alvaro

1,139个赞,共1,805个帖子。

组: User

Hi. Happy new year and thanks for the pdf. Here some full vectorized versions.

Clipboard01.png

Probability Programs.sm (50.3 KiB)已下载 1284 次。

Best regards.
Alvaro.
#7 已发布: 2022/12/29 21:13:51
Norm Schutzkus

Norm Schutzkus

9个赞,共90个帖子。

组: User

Ah-h! A bit closer thanks to Alvaro and Overlord!

My worksheet takes longer to calculate relative to MC15. Overlord's version worked well and I tried Alvaro's version for the "P" program to see if it calculated faster. The P2(n) program didn't work initially; I replace "i" with "P" in the first "for" command line, which worked, but may make the routine take longer.

Anyway, thanks again for your help.

Sincerely,

Norm

Probability Programs.sm (74.83 KiB)已下载 1369 次。

#8 已发布: 2022/12/29 21:18:49
Norm Schutzkus

Norm Schutzkus

9个赞,共90个帖子。

组: User

By the way, how do you post your screen snips in the Forum?

Thank you,

Norm
#9 已发布: 2022/12/29 22:39:13
overlord

overlord

600个赞,共1,381个帖子。

组: Moderator

Wrote

By the way, how do you post your screen snips in the Forum?


Use attachment button, and select a picture file.
In your case, a screenshot file.

2022-12-30_04-33.png

Wrote

My worksheet takes longer to calculate relative to MC15.


I have tried some variations for your function.
I found this to be fastest, actually 3 times faster than my previous.
I used an amalgam of Razonar's and my functions.

Regards

Probability Programs_overlord_v2.sm (37.25 KiB)已下载 1363 次。

2022-12-30_04-36.png

#10 已发布: 2022/12/30 11:46:03
Norm Schutzkus

Norm Schutzkus

9个赞,共90个帖子。

组: User

Very nice!

Thank you!

Sincerely,

Norm
#11 已发布: 2022/12/30 22:36:18
Norm Schutzkus

Norm Schutzkus

9个赞,共90个帖子。

组: User

Just a follow up...

Both versions attached; the faster calculated version (V.1) posts some big percentages, e.g. T4 relative to T3. Don't know what significance that poses.

Are the "P" programs structured random number generators? It appears to me that the "time(1)" relative to "t0" provides how long the program took to complete it's routine. Those outputs are compared for probability percentage?

The last page in V.1, "fcompare()" fails. I welcome your recommendation(s); looking to create row 1 of the matrix.

Thanks in advance.

Norm
未找到文件。未找到文件。
  • 有新帖
  • 无新帖