Hello
I would like to plot a slice of the pdeplot3D(model,'ColorMapData',U) at a certain y-Coordinate, so that the plot has a x-z-View and the results U are still defined by the ColorMap.
I have tried the slice-function, but this results in an error (Maximum variable size allowed by the program is exceeded.) This is what I tried with interp3:
YCross=2;
Xgrid=linspace(1,10,50);
Zgrid=Xgrid;
UCross=interp3(p(1,:),p(2,:),p(3,:),U,Xgrid,YCross,Zgrid);
But I got the error: The grid vectors must contain unique points. I understand, that my p-vectors are not unique, but how to solve the Problem?

 採用された回答

Alan Weiss
Alan Weiss 2018 年 4 月 23 日

0 投票

Did you look at the examples in the documentation? There is one example showing how to save memory by evaluating only where needed. I think, too, that those examples show how to avoid the problem of non-unique points.
Alan Weiss
MATLAB mathematical toolbox documentation

2 件のコメント

MarionJ
MarionJ 2018 年 4 月 24 日
編集済み: MarionJ 2018 年 4 月 25 日

I had not found this documentation. Thanks for that. But still: How can I suppress the solution/result to be the 3rd Dimension and plot the solution in a 2D-plot and the value of the solution/result is defined by the Color? I have the x- and z-Coordinate. y-Coordinate is fixed (since slice-view) and the value of the interpolate data, e.g. temperature, is defined by the Color.

The same view as pdeplot gives

MarionJ
MarionJ 2018 年 4 月 26 日
Any idea Mr Weiss?

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

その他の回答 (1 件)

Ravi Kumar
Ravi Kumar 2018 年 4 月 23 日

0 投票

Take a look at the examples in Contour Slices Through a 3-D Solution documentation page.
Particularly the function interpolateSolution might be relevant to you.

カテゴリ

質問済み:

2018 年 4 月 23 日

コメント済み:

2018 年 4 月 26 日

Community Treasure Hunt

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

Start Hunting!

Translated by