Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6563323
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T13:49:03+00:00 2026-05-25T13:49:03+00:00

I have a matlab function that returns results in a uitable. There are 2

  • 0

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?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T13:49:04+00:00Added an answer on May 25, 2026 at 1:49 pm

    If you read the discussion carefully, you’ll find out that UITABLE supports HTML content…

    Here is an example:

    X = rand(100,2);
    
    %# convert matrix of numbers to cell array of strings (right aligned)
    XX = reshape(strtrim(cellstr(num2str(X(:)))), size(X));
    
    %# find cells matching condition
    idx = ( X(:,1) > X(:,2) );
    
    %# use HTML to style these cells
    XX(idx,1) = strcat(...
        '<html><span style="color: #FF0000; font-weight: bold;">', ...
        XX(idx,1), ...
        '</span></html>');
    
    %# create table
    f = figure;
    h = uitable('Parent',f, 'Units','normalized', 'Position',[0.05 0.05 0.9 0.9]);
    
    %# set table data
    set(h, 'Data',XX)
    

    screenshot

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Basically i have a function that returns a column vector of size Z(100,1) of
I have discovered through trial and error that the MATLAB engine function is not
Does MATLAB have a function/operator that indicates the type of a variable (similar to
I know that there is the possibility of Matlab of pausing a Matlab function
I have a function in Matlab that has some variables in it. I need
I have a function in MATLAB which takes another function as an argument. I
Is it possible to have default arguments in MATLAB? For instance, here: function wave(a,
I have a Matlab program that generates a list x = 6.1692 8.1863 5.8092
I have a Matlab program that is running longer than I'd like it to.
I have to write a Matlab script that does this: The input is 2

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.