4D surface plot
    10 visualizaciones (últimos 30 días)
  
       Mostrar comentarios más antiguos
    
    Leonardo Barbosa Torres dos Santos
 el 29 de Oct. de 2019
  
    
    
    
    
    Respondida: Sebastian Bomberg
    
 el 29 de Oct. de 2019
            Dear, could someone help me, please?
I have a file with n-lines and 4 column, where the column 1, 2 and 3 are positions and 4 column is temperature.
I would like plot a graphic 4D surface, where the axis x, y and z are the column from 1 to 3, respectively, and the color code is the column 4.
I tried do it using mesh or surf, but the axis-z doesn't is a function.
Below is my algorithm
clc,clear all,format long
 point = load ('general_resultosA.dat')  ;                  % load data
 long = point(:,1);                              % longitude data
 lat = point(:,2);                               % latitude data
 rural = point(:,3);                             % percent rural data
 fatalities = point(:,4);                        % fatalities data
 xlabel('\Phi [deg]')
 ylabel('\mu [adim]')
 zlabel('k')
 xlim([0 75])
 ylim([0.5 0.9])
 zlim([1 9])
 mesh(long,lat,rural,fatalities);
This comand show a error:
"Error using mesh (line 71)
Z must be a matrix, not a scalar or vector."
0 comentarios
Respuestas (1)
  Sebastian Bomberg
    
 el 29 de Oct. de 2019
        You have scattered not gridded data. Have a look at this:
0 comentarios
Ver también
Categorías
				Más información sobre Surface and Mesh Plots en Help Center y File Exchange.
			
	Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

