Plotting of data into an image

5 Ansichten (letzte 30 Tage)
David
David am 20 Okt. 2011
I'm looking for a solution for visualizing my data. I computed some electrophysiological data, which represent the correlation of two signals at seven different levels (heights) and five locations within one height.
The data is saved in one matrix (7x5) for every patient where the significant data is highlighted as 1, while the not-significant ones consist of a 0.
Now I would like to plot this data as different colored dots in a jpg-image, which consists of an idealized model of the 7 levels (seven rectangles at different heights). But since I haven't done this before, I don't even know what to search for. Could anybody just give me a hint, what resembles in some way my problem? Or is there any alternative that you could recommend me for plotting the data?
Thanks in advance

Akzeptierte Antwort

Walter Roberson
Walter Roberson am 20 Okt. 2011
A sample image would help us.
Is each patient to be done separately, or is all the data to appear on the one graph?
If you were to create four column vectors, where H(K), L(K), C(K) P(K) is a Height / Location / Correlation / Patient combination, then you can
pointsize = 15; %adjust as needed
scatter3(H(:), L(:), P(:), pointsize, C(:), 'Marker', 's')
with your height and locations being a fixed small number of values, and your patient IDs being known at the time of executation, you could use
[H, L, P] = ndgrid(heights_vec, locations_vec, patientids_vec);
to construct H, L and P, and then you would build your correlation 3D array C to be indexed by (height, location, patientid), and then C(:) would be in the right order to match everything the unraveled H, L, P.
It might not make much sense the first several times you run one of these but it doesn't take long before it is easier than putting your right leg over your left shoulder.

Weitere Antworten (2)

David
David am 20 Okt. 2011
Thank you for the fast answer. I have a very simple model of what I want to do but I don't know who to upload it.
But I guess what you proposed could work, I will try it right now. Thanks again

David
David am 21 Okt. 2011
ok I tried the way you proposed and I think this is a bit too complicated right now, because what I was looking for, is a simple solution where I can just visualize the data on a 2D-model consisting of a jpg image. Once I know what all data look like, I will come back to your solution ...
I attached an example of what it could look like at http://imageshack.us/photo/my-images/805/modelcoherence.jpg/
The seven rectangles show the heights and the vertical lines the locations. If my matrix shows a certain value, its supposed to sho an orange dot.
Is there somebody who has done something similar. I guess its not very complicated, but I don't know how to do it and I don't even know what to look for.
Thanks

Community Treasure Hunt

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

Start Hunting!

Translated by