How to generate this matrices in MATLAB
1 view (last 30 days)
Show older comments
0 Comments
Answers (1)
Ameer Hamza
on 26 Oct 2020
You can use ndgrid() to generate i and j matrices
[i, j] = ndgrid(1:8)
and then simply use the formula
ti = pi/16 + (i-1)*pi/8;
C = cos((j-1).*ti)
Important thing is to use element-wise operator (.*).
0 Comments
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!