I want to plot a 2D matrix with a color contrast.

I've got a spreadsheet ( 2-D matrix ) which has got temperature readings of various points on a 2-D plane. How can I plot a color variation temp. profile plot for this matrix.
I have uploaded the csv file.

Answers (1)

Several possibilities:
imagesc(data)
contour(data)
contourf(data)
pcolor(data)
surf(data, 'edgecolor', 'none'); view(2);

5 Comments

I have imported this file. Then selected Output type as 'Table'. Then clicked on import selection, now I have a test123 name table in my workspace. What to do next ?
test123 is a 185x51 table. this error is showing up, when i gave the command pcolor(test123).
pcolor(test123)
Error using pcolor
(line 63)
Data inputs must be
real.
If the content is like what you have in the csv then,
data = test123{:,:};
and then proceed.
Thanks ! May you tell me about the theory for this !
When you have a table, then using {} indexing on it extracts values from the table into ordinary arrays.
You should probably have asked for selected output type as numeric array instead of table for this data, as it is a 2D array of data instead of being columns of data each with a different meaning.

Sign in to comment.

Categories

Tags

Asked:

on 18 Jun 2018

Commented:

on 18 Jun 2018

Community Treasure Hunt

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

Start Hunting!