3D surface plot from 3 columns of excel data?

Total newbie here.
I have 3 columns of data and I want to create a 3D scatter plot. I was able to impot the columns as three 18 x 1 cell arrays in m y workspace. Can anyone help with some basic steps? Thanks!

6 件のコメント

Scott MacKenzie
Scott MacKenzie 2021 年 6 月 8 日
The first basic step is the enter doc scatter3 in the MATLAB command window. In the documentation presented, you'll find several examples that should help you get started. Good luck.
John Schneider
John Schneider 2021 年 6 月 8 日
thank you Scott. unfortunately, that is where I went first and could not find anything to help me.
KSSV
KSSV 2021 年 6 月 8 日
Attach your data. It depends on whether data is stuctured or unstructured.
Scott MacKenzie
Scott MacKenzie 2021 年 6 月 8 日
Well, in that case, it might help if you posted your data and any code you've written so far.
John Schneider
John Schneider 2021 年 6 月 8 日
thanks again. this is what I imported
I tried the following commands:
plot (a,b,c)
surface (a,b,c)
I know this must be trivial, but this is my first time using Matlab
John Schneider
John Schneider 2021 年 6 月 8 日
just attaching the file

サインインしてコメントする。

 採用された回答

Scott MacKenzie
Scott MacKenzie 2021 年 6 月 8 日

0 投票

Here you go...
T = readtable('https://www.mathworks.com/matlabcentral/answers/uploaded_files/645855/P3%20data.xlsx');
x = T{:,2}; % Speed
y = T{:,3}; % Range
z = T{:,4}; % Cost
scatter3(x,y,z);
xlabel('Speed');
ylabel('Range');
zlabel('Cost');

2 件のコメント

John Schneider
John Schneider 2021 年 6 月 8 日
that is awesome Scott, thanks!
darova
darova 2021 年 6 月 8 日

サインインしてコメントする。

その他の回答 (0 件)

製品

リリース

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by