Raise the elements of a matrix to a power.
18 ビュー (過去 30 日間)
古いコメントを表示
Ricardo Gutierrez
2020 年 1 月 20 日
コメント済み: Ricardo Gutierrez
2020 年 1 月 21 日
Hello good day.
I have a power with a value of 3 with name b, ((b = 3)) and I have a "min" array:
min = [1 2 3 4 5
2 3 8 1 4
4 1 4 4 4];
How to raise each and every one of the elements of the "min" matrix to exponent 3?
to get this way:
1 8 27 64 125
8 27 512 1 64
64 1 64 64 64
I would appreciate your valuable help
Thank you
0 件のコメント
採用された回答
David Goodmanson
2020 年 1 月 20 日
編集済み: David Goodmanson
2020 年 1 月 20 日
Hi Ricardo,
min3 = min.^3
It's not a good idea to name a variable 'min' because that is the name of a built-in Matlab function.
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Logical についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!