Can anyone help me to plot these data by scatter3 ploting?
Mostra commenti meno recenti
I have 41 values of temperature starting from 350,351,352,353...........,390 and 30 values of radius starting from 0.001, 0.002, 0.003......,upto 0.03.Now from 41 values of temperature and 30 values of radius , i obtained 41*30 =1230 values of PPDF. Now i have to plot surface graph (with the help of scatter3) between Temperature (let's on x co-ordinate ), radius (let's on y co-ordinate) and PPDF (on z co-ordinate ). How can i plot this ? please help me with the code. Here i am attaching my code which is giving me error.
for reference i am attaching scatter3 graph.
% x co-ordinate data
temp1=350:1:390;
temp=temp1';
% y co-ordinate data
rad1=.001:.001:.03;
rad=rad1';
% z co-ordinate data (for this i have attached PPDF.csv file.)
test=csvread('temp_rad_graph_data.csv'); % here 'temp_rad_graph _data.csv is the file which consist x ,y and z coordinate data
x=test(:,1);
y=test(:,2);
z=test(:,3);
scatter3(x,y,z,'filled')
colormap jet
4 Commenti
Riccardo Scorretti
il 11 Apr 2022
Hi. Which error is obtained? In case it is "File not found" it is enough to provide the correct file name (= PPDF.csv), but I guess it is a more fundamental problem.
Riccardo Scorretti
il 11 Apr 2022
That's being said, there is a problem: the file PPDF.csv you provided contains only 1230 values, so I guess it contains temperature only. I can plot data in the following way, but I cannot know if it is what you want to do:
% x coordinate data
temp1=350:390;
% y coordinate data
rad1=.001:.001:.03;
% z coordinate data (for this i have attached PPDF.csv file.)
test = csvread('PPDF.csv'); % here 'temp_rad_graph _data.csv is the file which consist x ,y and z coordinate data
% x=test(:,1);
% y=test(:,2);
% z=test(:,3);
[t, r] = meshgrid(rad1, temp1);
figure
scatter3(t(:), r(:), test(:),'filled')
colormap jet
figure
mesh(t, r, reshape(test, size(t)))
I get these figures, which seem to make sense (= not to display random data):

Deepesh Kumar Gupta
il 12 Apr 2022
Deepesh Kumar Gupta
il 15 Apr 2022
Risposte (1)
Walter Roberson
il 11 Apr 2022
0 voti
You file only has one column of data. It has 1230 rows, which consists of periods of zeros mixed with periods of non-zero data. The length of the bursts of data is not consistent, so this does not appear to be a case where a 2D array of data accidentally gets written as multiple rows instead of multiple columns.
Categorie
Scopri di più su Surface and Mesh Plots in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!