フィルターのクリア

How to stop a future modification in matlab sym function

2 ビュー (過去 30 日間)
Raphael Chinchilla
Raphael Chinchilla 2018 年 2 月 10 日
コメント済み: Walter Roberson 2018 年 2 月 10 日
Hi all,
I have been using the symbolic toolbox for a while. I needed to create a symbolic function for an expected value. As matlab does not, at least for now, allow defining properties of arbitrary functions such as:
E(a+b)=E(a)+E(b)
or
E(k*eps)=k*E(eps)
(nor it allows defining variables and constants separately)
I've decided to go and transform my symbolic variable into char, use regular expressions, and then bring it back to symbolic. As I was doing so (the whole process works pretty well), as I ran the code:
result_symbolic=sym(result_char)
I received the following message:
"Warning: Support of character vectors that are not valid variable names or define a number will be removed in a future release. To create symbolic expressions, first create symbolic variables and then use operations on them. "
How can I make them know that there are cases in which it is not possible to actually manually create symbolic, like in the cases there I have worked on?

採用された回答

Walter Roberson
Walter Roberson 2018 年 2 月 10 日
You create a Technical Support case and present your use case.
... Probably they will refer you to the new str2sym() function.
  2 件のコメント
Raphael Chinchilla
Raphael Chinchilla 2018 年 2 月 10 日
編集済み: Raphael Chinchilla 2018 年 2 月 10 日
Thanks! The function str2sym() was probably introduced in the 2017b and as I am running the 2017a I cannot check whether they have the same behavior.
Walter Roberson
Walter Roberson 2018 年 2 月 10 日
str2sym() was introduced in R2017b.
What you are doing will continue to work in R2017a and R2017b, but after that will likely fail.

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeAssumptions についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by