Create a plot with values from matrices of many dimensions.

8 ビュー (過去 30 日間)
stelios loizidis
stelios loizidis 2022 年 1 月 14 日
コメント済み: stelios loizidis 2022 年 1 月 14 日
Hello,
I have the following matrices: A:10X10X10X10, B:10X10X10X10, C:10X10X10X10, D:10X10X10X10 and S:10X10
What I want is a contour plot that includes the values from all the matrices (A,B,C,D,S). I tried the commands contour and surfc but the following errors occur:
contour: "Input arguments must have at most 2 dimensions."
surfc: "Value must be a vector or 2D array of numeric type."
There is a way to make a corresponding plot such as a contour plot, with values from all the matrices?
Your help is important !!!

採用された回答

David Sanchez
David Sanchez 2022 年 1 月 14 日
Hi Stelios,
it seems you are trying to plug 4D matrices into the surfc function, and as you mention:
surfc: "Value must be a vector or 2D array of numeric type."
Grab a 2D portion of each matrix and plug it into surfc. On how to extract the first 2 dimension of matrix A, use for example the following:
A_2D = A(:,:, 1, 1);
  3 件のコメント
David Sanchez
David Sanchez 2022 年 1 月 14 日
Loop over those simensions (the 3rd and 4th argument).
The 2D matrix given by the 2nd element of the 3rd dimension and the 1st element of the 4th dimension is:
A_2D = A(:,:, 2,1);
stelios loizidis
stelios loizidis 2022 年 1 月 14 日
Thanks for the valuable help !!!!

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

その他の回答 (0 件)

カテゴリ

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

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by