Breaking Quotes for Printmat

4 ビュー (過去 30 日間)
Ann Mendoza
Ann Mendoza 2012 年 12 月 19 日
So my code is trying to label a Matrix using printmat. The problem I'm running into is that my rows vary based on the the number inputted by the user. Is there any way I can break quotes so I can display the rows and put them back in quotes?
This is what my code looks like so far (in the briefest terms)
PERTCPM=[mini mode maxi mea stdv ES EF LS LF slack];
disp (' PERT-CPM TABLE'), disp(''), printmat(PERTCPM, 'My Matrix','?','Min Mode Max Mean St.Dv. ES EF LS LF Slack')

回答 (2 件)

Walter Roberson
Walter Roberson 2012 年 12 月 19 日
編集済み: Walter Roberson 2012 年 12 月 19 日
printmat() is no longer supported and does not appear to be available from Mathworks. I gather it was part of a quite old demo, in the 1990 - 1993 timeframe.
I am not sure what you mean about "break quotes". Are you perhaps talking about columns rather than rows? And want to be selective about which of the columns you put in? If so, then construct an appropriate string and use it. For example,
H = {'mean', 'std', '1st'};
chosen = [1 3];
headers = sprintf('%s ', H{chosen});
printmat(PERTCPM, 'My Matrix', '?', headers)

Matt Fig
Matt Fig 2012 年 12 月 19 日
If I were you I would just use FPRINTF to print your array. I would offer you an example, but I don't know what you mean by "Is there any way I can break quotes so I can display the rows and put them back in quotes?" What does it mean to break quotes? I have no clue.

カテゴリ

Help Center および File ExchangeShifting and Sorting Matrices についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by