How can I create it?
1 次查看(过去 30 天)
显示 更早的评论
How can I create a 5x5 matrix with the following criterion: aij = 2cos(0.4(i-j)π)
0 个评论
采纳的回答
Star Strider
2016-2-12
A bit more efficiently, using meshgrid:
[i,j] = meshgrid(1:5);
a = 2*cos(0.4*(i-j)*pi);
2 个评论
Star Strider
2016-2-12
My pleasure!
The meshgrid function can make a number of matrix calculations easier.
更多回答(1 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Surface and Mesh Plots 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!