フィルターのクリア

Plotting a giant surface exceeding array limitations

2 ビュー (過去 30 日間)
Robert Scott
Robert Scott 2023 年 12 月 3 日
コメント済み: Robert Scott 2023 年 12 月 4 日
Hi all
I have a need to plot a large surface.
Im trying to create a multi dimensional array.
Picture the following.
A typical X and Y plot that is a vector that has 40,000 data points. If you plot that you get a simple traditional XY graph.
Now, i have say 100 of the X and Y vectors and want to plot them all as a surface.
I tried something like this to build the array first. According to the matlab documentation the 3rd variable is like a page variable. Which is exactly what i need.
So to start i just tried
test = zeros(40,000,40,000,100)
And i got an error saying that my array will take 775 gig of space lol
So how does one go about doing this?
Thanks
  1 件のコメント
Robert Scott
Robert Scott 2023 年 12 月 3 日
I looked into that but there are very poor examples for tall arrays mostly using data that already exists in some file.

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

採用された回答

Matt J
Matt J 2023 年 12 月 3 日
編集済み: Matt J 2023 年 12 月 3 日
First of all, you should consider downsampling from 40000 points to perhaps 400. Having very dense data beyond a certain point will not help you better visualize the surface.
Aside from that, though, your surface will have 40000*100 points, so a trisurf plot would only require you to form 40000x100 arrays.
[Xsurf,Ysurf,Zsurf]=deal(zeros(4e4,100)); %pre-allocate
  20 件のコメント
Matt J
Matt J 2023 年 12 月 4 日
How can i get this to work with just a simple meshgrid.
I don't think you can, because in your original problem description, your X,Y data is scattered, not gridded. Ifthat's no longer the case, it would seem that you have a whole new problem and you should accordingly post a whole new question.
Robert Scott
Robert Scott 2023 年 12 月 4 日
Thanks, Matt
Well, i have no idea how it works but it works.
I basically just took 3 giant vectors X,Y and T and put them in the surf command and it worked.
This turned out to be a total waste of a day sadly. My misinterprestation of the data set really screwed me up and caused me to write many nonsensical scripts.
In the end, your original solution or my cell array solution would work for something like this.
I thank you for your persistance in helping me esepcailly on a sunday.

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeAnnotations についてさらに検索

製品


リリース

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by