For loop for hilb matrix

7 views (last 30 days)
Jade Henrichon
Jade Henrichon on 25 Feb 2021
Commented: Rena Berman on 23 Aug 2022
Hi!
I have to make 8 matrix hilb with different n. I tried to do a for loop, but each time, the result was always the matrix of n=40. Can someone help me on how to do it? Thank you
  3 Comments
Rena Berman
Rena Berman on 23 Aug 2022
(Answers Dev) Restored edit

Sign in to comment.

Accepted Answer

ANKUR KUMAR
ANKUR KUMAR on 26 Feb 2021
for i = 5:5:40
output_mat=hilb(i);
% if you wish to store in cell array, uncomment the below line
output_mat_cell{i/5}=hilb(i);
end

More Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!