how to compress 15x15x8 dobule to 15x15?

1 回表示 (過去 30 日間)
Sierra
Sierra 2022 年 11 月 12 日
編集済み: John D'Errico 2022 年 11 月 12 日
I want to 15x15x8(X,Y,Z) dobule to 15x15.
the file 15_15_8 consist of 0 and 1.
and 15_15 file consist of the sum of X and Y value.
please let me know how to do this.
I uploaded the example file for clarification.
Thanks.

採用された回答

John D'Errico
John D'Errico 2022 年 11 月 12 日
編集済み: John D'Errico 2022 年 11 月 12 日
How long have you been using MATLAB? You have asked 51 questions on Answers. But just today, you asked two trivial questions in a row. You SERIOUSLY need to learn MATLAB. The gods of MATLAB gave us manuals for a reason. Spend some time doing the MATLAB Onramp tutorial. Or there are surely free tutorials to be found, perhaps look on YouTube.
If you want to form the sum, then use sum.
E = sum(E3d,3);
In this case, the sum operates on the third dimension of E3d.
Had you read the help for sum, it would tell you that.

その他の回答 (0 件)

カテゴリ

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

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by