hello i need to write script mathlab to make a matrix with vector v=[1 2 3 4]
1 ビュー (過去 30 日間)
表示 古いコメント
the output is [1 1 1 1;2 4 8 16;3 9 27 81;4 16 64 256]
採用された回答
Awais Saeed
2021 年 12 月 11 日
Seems you want to have powers from 1 to 4
v = 1:4;
bsxfun(@power,v(:),[1:4]) % poers ranging from 1 to 4
その他の回答 (0 件)
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!