フィルターのクリア

A symbolic expression problem (different results in different version)

4 ビュー (過去 30 日間)
Tamura Kentai
Tamura Kentai 2020 年 4 月 22 日
編集済み: Walter Roberson 2020 年 4 月 25 日
Hi, :
May I ask, I have a m-file, the content is as below, but it ran out different result in different versions of Matlab, they are 2013b & 2019a, or say, it's originally built in 2013b, but while migrating to 2019a on the other platform, it failed.
Can anyone know why, and how to solve it ? I found the issue was caused by the simple(), and the ezsym.m provided by the mathwork contributor.
The complete URL is here :
Thank you very much.
The code is here:
syms t a
fun = sin(a*t)
laplace(fun)
fun = sin(t)^2
laplace(fun)
fun = sin(t^2)
laplace(fun)
fun= 1/2 * ( exp(i*t^2) - exp(-i*t^2) )
A = laplace(fun)
% ezsym() was from Mathwork community contributor
% refer to: https://www.mathworks.com/matlabcentral/fileexchange/51195-ezsym-display-symbolic-expression-in-blank-plot
ezsym(A,26)
% simple() in Matlab2013b is ok, but failed at 2019a
simple(A)
syms s y(s)
y(s) = A
Num_Y = y(2*pi*1e4)
N_Sol = simple(Num_Y)
N_abs = double(abs(N_Sol))
N_angle = double(angle(N_Sol))

採用された回答

Walter Roberson
Walter Roberson 2020 年 4 月 22 日
simple() was removed as of R2015a. Use simplify() instead.
  7 件のコメント
Walter Roberson
Walter Roberson 2020 年 4 月 23 日
編集済み: Walter Roberson 2020 年 4 月 25 日
Mathml is from W3C https://www.w3.org/Math/
it is implemented in Firefox and safari. Some work is underway to add it to Chrome
Tamura Kentai
Tamura Kentai 2020 年 4 月 24 日
Hi, Walter:
Thank you for the sharing.
Best regards.

サインインしてコメントする。

その他の回答 (0 件)

製品

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by