How to create multiple array with different name in for loop?

for i=1:10
arr = strcat('arr',num2str(i));
arr[];
end
This code is not working. so how we can do?
I want make an array like this.
arr1 = [];
arr2 = [];
arr3 = [];
....

回答(1 个)

for i=1:10
fprintf('\n arr%i',i);
fprintf('=[]');
end

此问题已关闭。

关闭:

2021-5-18

Community Treasure Hunt

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

Start Hunting!

Translated by