About calculation time of mathcad prime 10
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
About calculation time of mathcad prime 10
Even though it's the same program, calculations take longer in Mathcad Prime than in Mathcad.
I used a converter from Mathcad to Mathcad Prime, but does anyone know what functions take longer to calculate?
Also, if there is a way to improve this, what functions should I use?
If anyone has any idea, please let me know.
Translated by the moderation using Google Translate
-----------------------------------------------------------------------------------------------
同じプログラムでもmathcadよりもmathcad primeの方が計算に時間がかかります。
mathcadからmathcad primeにコンバーターを使用したのですが、どのような関数が計算に時間がかかるかわかりますか?
また、改善策があるならばどんな関数を使用するとよいのでしょうか。
少しでもわかる方がいましたら教えてほしいです。
- Labels:
-
Mathcad Usage
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi
Continually increasing memory for one matrix or vector progressively takes time. Predeclare matrices and vectors at full size first.
Text processing takes a long time in Prime.
You need to upload your file for more information.
1 つの行列またはベクトルのメモリを継続的に増加させると、時間がかかります。 最初に行列とベクトルをフルサイズで事前宣言します。
Prime ではテキスト処理に時間がかかります。
詳細については、ファイルをアップロードする必要があります
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
返答ありがとうございます。
下の図は私が解析で使用しているプログラムの一部です。あなたの意見を聞いたところ、私はこの計算が時間がかかる原因の1つだと考えています。
私の解析では時間のサンプリング数を増やしたいです。数値で言うと"nsam=2^20"ほどのサンプリング数を扱いたいと考えています。
何かアドバイスがありましたら教えてもらえませんか?
Translated by the moderation using Google Translate
-----------------------------------------------------------------------------------------------
Thank you for your reply.
The figure below is a part of the program I use for analysis. After hearing your opinion, I think this calculation is one of the reasons why it takes time.
I would like to increase the number of time samples in my analysis. In numerical terms, I would like to handle a sampling number of about "nsam=2^20".
Do you have any advice?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Sometimes, the order in which one carries out calculations or the method used can significantly affect performance. One particular example is that predefining the maximum size of an array can speed up calculations by avoiding the need to increase the memory allocation every time a new item is added to that array. This was the case in Legacy Mathcad (ie, Mathcad 15 and prior) on older PCs. In addition, some operations may benefit from the implicit vectorization of arithmetic operations.
However, while there is an apparent difference in the time taken for each of the four versions shown below, I would not regard it as significant. Still, every little bit helps, and it may be that one of the techniques helps.
All timings are in seconds but should be regarded as an indication of relative performance, not absolute timings.
Stuart
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
ありがとうございます。
検討してみます。
Translated by the moderation using Google Translate
-----------------------------------------------------------------------------------------------
Thank you. I'll look into it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Prime need no time. Only less than 1 second 2^20 finish.
Use if function then you can Time value if you use it in the program or worksheet.
Plot 2^20 data needs 1 or 2 seconds
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
@ttokoro wrote:
Prime need no time. Only less than 1 second 2^20 finish.
Use if function then you can Time value if you use it in the program or worksheet.
Plot 2^20 data needs 1 or 2 seconds
A good point, Tetsuro. The timings I get for 220 data points average < 0.5 s (10 repetitions for each method shown).
However, such timings depend on the PC's other activities and specifications. In addition, Mathcad starts to slow down markedly when it approaches 4 GiB RAM usage.
My laptop's specs are:
Device name DellPrecision5540
Windows 11 Pro
Processor Intel(R) Core(TM) i7-9850H CPU @ 2.60GHz 2.59 GHz
Installed RAM 32.0 GB (31.7 GB usable)
Stuart
PS. We can now more easily add superscripts and subscripts in the Community using the new superscript and subscript buttons.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
一般的に数値計算エンジンは高速で、シンボリックエンジンやソルブブロックは、場合により時間が長くかかりますが、具体的にprime 10 シートを試してみないと、何とも言えません。
Prime 9 では普通であった、局所的最大値をソルブブロックで求める場合は、大変時間がかかりました。
解決策は、デジタルなx,y座標とその値f(x,y)でデジタルに補間データを作成し、localmax関数で、局所の大体の位置を確認し、その局所最大値回りでソルブブロックで最大値を求めます。この作戦で瞬時に最適解を得ることができます。
よく分かりませんが、Prime 6 からの新しいシンボリックエンジンは15桁などの有効数字範囲を超えて演算可能なので、30桁とか10^500なども取り扱えるようです。そのため、展開式のより高次までの演算が必用な場合など、積分的な演算で時間がかかる可能性があります。
可能性として、数値計算エンジンで配列を予め定義するなど、可変長モードの利用を避けるのが良いようです。
ソーティングなどでも、Werner_E等による優れたプログラミング関数を用いると、劇的に高速化されます。
Mathcadの利点はこのSNSのMathcad愛に溢れるプロユーザー達が、気軽に解決策を検討し、回答してくれることがあります。
電気回路関係であれば私が答えます。
In general, math engines are fast, and symbolic engines and solve blocks can take a long time, but you can't really say that until you try out the Prime 10 seats. Finding the local maximum with a solve block, which was usual in Prime 9, was very time-consuming. The solution is to digitally create interpolated data with digital x,y coordinates and their values f(x,y), use the localmax function to check the approximate position of the locality, and find the maximum value with a solve block around the local maximum. With this strategy, you can get the optimal solution instantly. I'm not sure, but the new symbolic engine from Prime 6 can calculate beyond the range of significant digits such as 15 digits, so it seems that it can handle 30 digits and 10^500. Therefore, integral operations can take a long time, such as when operations up to a higher order of expansion expressions are required. As a possibility, it is better to avoid using variable-length mode, such as predefining arrays with a numeric engine.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
返答ありがとうございます。
残念ながら今行っている解析では電気回路関係でなく、レーザー関係の解析をしています。
似ている部分もあると思うので、あなたの意見も参考に取り組んでみます。
Translated by the moderation using Google Translate
-----------------------------------------------------------------------------------------------
Thank you for your reply.
Unfortunately, the analysis I'm currently doing is not related to electrical circuits, but rather to lasers.
I think there are some similarities, so I'll take your opinion into consideration.
