Does matlab have data type of sym?

1 回表示 (過去 30 日間)
Giorgos Papakonstantinou
Giorgos Papakonstantinou 2013 年 2 月 4 日
I set a as symbolic. Then I check if a is a char and I get a false. If later I ask the class of a then its char. Suppose I make the check if a is symbolic then I get true. Since the outcome of class is char I would expect that the check for char would also be true. Please see the example below.
>> clear
>> syms a
>> isa(a,'char')
ans =
0
>> class a
ans =
char
I would appreciate if you explain me what's going on. Thank you.

採用された回答

Azzi Abdelmalek
Azzi Abdelmalek 2013 年 2 月 4 日
編集済み: Azzi Abdelmalek 2013 年 2 月 4 日
clear
syms a
class(a)
The class of a is sym, not char
  2 件のコメント
Giorgos Papakonstantinou
Giorgos Papakonstantinou 2013 年 2 月 4 日
But is there really a sym class because I haven't find it in the documentation?
Walter Roberson
Walter Roberson 2013 年 2 月 4 日
sym is part of the symbolic toolbox, and so is documented separately.

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeConversion Between Symbolic and Numeric についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by