Creating a table with syms

15 ビュー (過去 30 日間)
José Manuel Romo
José Manuel Romo 2020 年 2 月 2 日
コメント済み: José Manuel Romo 2020 年 2 月 3 日
Hi I am trying to display a table with a 2x2 sym matrix that is the following:
% matrix = [I4_1,I4_2;I4_3,I4_4];
Captura de pantalla 2020-02-02 a la(s) 17.36.56.png
When I create a table with the matrix, it displays as follows:
% table([I4_1;I4_3],[I4_2;I4_4]);
Captura de pantalla 2020-02-02 a la(s) 17.39.38.png
The only way I came arround is to convert syms to char arrays:
% t1 = table([cellstr(char((I4_1)))],[[cellstr(char((I4_2)))]],'RowNames',["Enable = 5V"]);
% t1.Properties.VariableNames = ["Q2_VBE = min","Q2_VBE = max"];
% t2 = table([[cellstr(char((I4_3)))]],[[cellstr(char((I4_4)))]],'RowNames',["Enable = 0V"]);
% t2.Properties.VariableNames = ["Q2_VBE = min","Q2_VBE = max"];
% VR3 = [t1;t2]
Captura de pantalla 2020-02-02 a la(s) 17.40.01.png
I want to know if there is a better way to display syms on tables, because personally I don't how functions look in plain text

採用された回答

Walter Roberson
Walter Roberson 2020 年 2 月 2 日
Unfortunately, No, there is not. table() is not designed for display purposes. The interior methods to display the contents build strictly character information, not graphics like would be needed to show the fractions and subscripts.
Livescript can display sym in nicer format, but not inside a table .
Livescript also has a bunch of built-in Latex support. Unfortunately I have not yet found any way to get it to display dynamically generated latex, such as might result from applying latex() to a sym object: the latex support that I have found so far for Livescript is strictly for static text such as an equation "inserted" into the worksheet.
  1 件のコメント
José Manuel Romo
José Manuel Romo 2020 年 2 月 3 日
Thanks for the information Walter, I think I will be doing these tables in Word or something like that.

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

その他の回答 (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