如何根据表中的数据(在Matlab中)修改合适的单元格颜色?
我有一个 matlab 函数,它以 uitable.txt 形式返回结果。
该表有 2 列和很多行:第一列是“值”,第二列是某种“安全阈值/置信区间”。
我想格式化输出,以便某些单元格被涂成红色: 第 1 列中的“值”超过第 2 列中相应的“安全阈值”的那些。
有没有办法仅使用 Matlab 来做到这一点?
附: 我知道以下页面:
http://www.mathworks.de/matlabcentral/newsreader /view_thread/150507
但对我来说似乎有很多修改,我希望自从那篇文章发表以来,也许 Matlab 已经赶上了并带来了内置此功能?
I have a matlab function that returns results in a uitable.
There are 2 columns and lots of rows to the table: first column is "values" and second column is a "safety threshold/confidence interval" of sorts.
I'd like to format the output so that certain cells get painted red:
those for which the "value" in column 1 exceeds the corresponding "safety threshold" in column 2.
Is there a way to do this using just Matlab?
PS:
I am aware of the following page:
http://www.mathworks.de/matlabcentral/newsreader/view_thread/150507
but it seems like a lot of tinkering to me, and I'm hoping that since that post was made, maybe Matlab has caught up and brought this functionality built in?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果您仔细阅读讨论,您会发现UITABLE 支持 HTML 内容...
这是一个示例:
If you read the discussion carefully, you'll find out that UITABLE supports HTML content...
Here is an example: