フィルターのクリア

3D plot using data from table

9 ビュー (過去 30 日間)
Bozza
Bozza 2022 年 10 月 18 日
回答済み: Cris LaPierre 2022 年 10 月 18 日
Hello,
I am trying to create a 3D plot from three data sets that I have in Matlab. Each data set is in it's own table with one column, and thousands of rows. I want the plot to start at the origin aswell.
This is my current code, but I don't know how to use all of the points from the table.
x = [data sets need to go here];
y = [''];
z = [''];
xlin = linspace(min(x), max(x), 100);
ylin = linspace(min(y), max(y), 100);
[X,Y] = meshgrid(xlin, ylin);
% Z = griddata(x,y,z,X,Y,'natural');
% Z = griddata(x,y,z,X,Y,'cubic');
Z = griddata(x,y,z,X,Y,'v4');
mesh(X,Y,Z)
axis tight; hold on
plot3(x,y,z,'.','MarkerSize',15)
  1 件のコメント
KSSV
KSSV 2022 年 10 月 18 日
Read about surf.

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

回答 (1 件)

Cris LaPierre
Cris LaPierre 2022 年 10 月 18 日
See the Access Data in Tables page. I recommend using dot notation: tblNm.varNm

カテゴリ

Help Center および File ExchangeGrid Lines, Tick Values, and Labels についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by