フィルターのクリア

Formating individual cells in uitable or equivalent

5 ビュー (過去 30 日間)
Edward
Edward 2013 年 3 月 22 日
I am using uitable to display a table of values in a figure. I need to be able to color each cell in the table, based on some threshold. For example, values that meet or exceed this threhold value can be red. Values below the threshold can be green. It does not appear from the documentation that one can format individual cells this way using uitable.
Excel can do this, but I'd rather not be jumping from one tool to another. FWIW, I do not need the interactive features of uitable, but it was the only means I found to display a table in a figure.
  1 件のコメント
Jing
Jing 2013 年 3 月 28 日
編集済み: Jing 2013 年 3 月 28 日
I don't think there's easy way to do that. It may be better if you use actxserver to create Excel instance in MATLAB, or the other way around by spreadsheet link EX.

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

採用された回答

Jan
Jan 2013 年 3 月 28 日
編集済み: Jan 2013 年 3 月 28 日
Another method is the Java level, e.g. http://undocumentedmatlab.com/blog/uitable-cell-colors/
A very good idea is to ask your favorite internet search engine for e.g. "Matlab uitable color" before asking the forum. You get a lot of helpful links. It should be mentioned, that Google needs 0.23 seconds to find more than 10'000 links. Although I really like and appreciate the competence of this forum, we cannot and should not compete with e.g. Google in cases of such standard problems. Ok?
The standard procedure for such questions is:
  1. Search in Matlab's documentation
  2. Search in the internet
  3. Search in the FileExchange and the Answers forum
  4. If not successful yet, ask the forum.
  1 件のコメント
Edward
Edward 2013 年 3 月 28 日
編集済み: Edward 2013 年 3 月 28 日
Jan, Thanks for the link. As for the advice:
  1. I always check the documentation first. Usually I find my answer there, but sometimes it's not very clear.
  2. I had assumed searching the Matlab Central would be better than searching the entire internet. Perhaps my assumption is wrong.
  3. I always search MatLab Central after step 1. I never ask a question without doing this. I often stop at this step because I find what I'm looking for. But in this case, I didn't. I came across multiple instances of "You can't do that in uitable," which supported what I thought I learned in step 1...
  4. ...which brings me to the forum and the way I phrased by question, by saying I'm not married to uitable, if there is an alternative.
Again, thanks for your help. The links provide the solution I was looking for.

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeEnvironment and Settings についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by