plot(X,Y,Z,Data(temperature))
13 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
How can I plot the spatial points in matlab for the temperature? the file is -- X,Y,Z,temperature
2 Kommentare
Walter Roberson
am 25 Apr. 2018
Do your X and Y form a regular grid, with one Z for each X and Y combination, and a temperature associated with that X, Y, Z ? This is the easiest of the situations.
Are your X and Y scattered, with only one Z for any given X, Y combination, and a temperature associated with that X, Y, Z? This is not difficult but a bit more work than the first possibility.
Do your X, Y, Z form a volume? If so is it a regular volume like a cuboid? The difficulty of volume work depends upon the kind of plot needed.
Do your X, Y, Z just form a point cloud? This can be the most difficult to get useful plots out of.
Antworten (2)
Walter Roberson
am 25 Apr. 2018
In the case of rectangular grids of X, Y, with a Z corresponding, and a temperature for each location, then the easiest way is to reshape() the X, Y, Z, Temperature into 2D arrays so that the unique values of the X occupy either the rows or the columns, and the Y have the unique values going in the other direction. Once you have that arrangement, then
surf(xgrid, ygrid, zgrid, temperaturegrid)
4 Kommentare
Adalric Leung
am 4 Jul. 2020
Sorry, I'm still learning how to use Matlab, but I have a 4-D matrix that contains temperature values in x y and z, as well as a function of time. My main objective is to be able to plot an animation of the 3D temperature values in x y and z as my time variable increases, but my first step would be to learn how to plot the temperature in three dimensions.
This may be redundant, but essentially I'm trying to plot my discrete values of temperature in a 3D graph.
Here's a link to my question with more detail:
Image Analyst
am 25 Apr. 2018
Another way is to use scatter3() and adjust the color and/or size of the marker depending on the temperature of the 3-D point. This would not be good though if you had a solid volume, like every possibility of x, y, and z has a temperature. If you have that, you might try the Volume Viewer app on the Apps tab of the tool ribbon, if you have the Image Processing Toolbox. Or you can view slices through the volume with slice() for older versions of MATLAB.
1 Kommentar
Image Analyst
am 25 Apr. 2018
Siehe auch
Kategorien
Mehr zu Surface and Mesh Plots finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!