Symbolic Matrix has extra blank row

1 回表示 (過去 30 日間)
Carol Hurwitz
Carol Hurwitz 2018 年 9 月 4 日
コメント済み: Walter Roberson 2018 年 9 月 5 日
When I do this:
>> syms b
>> C = [1 b; b 2]
C =
[1 b]
[ ]
[b 2]
The online example doesn't show this but I always get a blank row. What am I doing wrong? With all numbers, I get an ordinary matrix.

回答 (2 件)

madhan ravi
madhan ravi 2018 年 9 月 4 日
編集済み: madhan ravi 2018 年 9 月 4 日
OR TRY:
C = str2sym('[1 b; b 2]')
Edited after Sir walter‘s comment.
  10 件のコメント
madhan ravi
madhan ravi 2018 年 9 月 4 日
did it work @Carol Hurwitz?
madhan ravi
madhan ravi 2018 年 9 月 5 日
編集済み: madhan ravi 2018 年 9 月 5 日
If you find our (me and sir Walter‘s) answer useful please do accept my answer.

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


Carol Hurwitz
Carol Hurwitz 2018 年 9 月 4 日
I still get the same output, using your code. Is there a package I need to install?
  2 件のコメント
Carol Hurwitz
Carol Hurwitz 2018 年 9 月 5 日
編集済み: Walter Roberson 2018 年 9 月 5 日
I installed MATLAB at work today, with symbolic package, and it works perfectly. I reinstalled it at home and I get the same error as before.
C = [b 1 3 6; 2 4*b b 7; 0 3 5 1]
C =
[b 1 3 6]
[ ]
[2 4 b b 7]
[ ]
[0 3 5 1]
I am using different versions of Windows. At home I'm using 8.1, at work Win 10, both on 64 bit machines. It worked when I pulled it up on my iphone this afternoon.
Walter Roberson
Walter Roberson 2018 年 9 月 5 日
Is it possible that you have Maple installed on the system that has the problem?

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

製品


リリース

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by