Implementation of a matrix
古いコメントを表示
Hello!
I want to implement a function, which has n as an input an outputs the following matrix:

Can someone help me please?
2 件のコメント
madhan ravi
2020 年 6 月 18 日
Huh... why waste others time by asking a question if it’s going to be deleted anyway??
Rena Berman
2020 年 10 月 12 日
(Answers Dev) Restored edit
採用された回答
その他の回答 (2 件)
Vishal Gaur
2020 年 6 月 16 日
Code to generate the mentioned output is:
for i=x
for j=1:n
matCos(i,j) = cos(j*x(i)*exp(1));
end
end
David Hill
2020 年 6 月 16 日
If x and e are symbolic
syms x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 e;
x=[x1 x2 x3 x4 x5 x6 x7 x8 x9 x10];
for k=1:n
y(k,:)=cos((1:n)*k*x(k)*e);
end
カテゴリ
ヘルプ センター および File Exchange で Entering Commands についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!