Vector element replacement by specified variables
1 回表示 (過去 30 日間)
古いコメントを表示
I am currently having issues with this code. I want to replace each entry of a vector with specified values.
for i=1:3
x=[1 2 5];
y=zeros(1,3);
y(1:1:3)=1+log(x(i));
end
That is I want y=[0 0 0] replaced by y=[1+log(x(1)) 1+log(x(2)) 1+log(x(3))].
Thanks in anticipation.
0 件のコメント
採用された回答
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Graphics Object Programming についてさらに検索
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!