Info

Cette question est clôturée. Rouvrir pour modifier ou répondre.

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

4 vues (au cours des 30 derniers jours)
MD SHAHNAWAZ RAZA
MD SHAHNAWAZ RAZA le 7 Avr 2018
Clôturé : Stephen23 le 18 Mai 2021
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 = [];
....

Réponses (1)

KALYAN ACHARJYA
KALYAN ACHARJYA le 7 Avr 2018
Modifié(e) : KALYAN ACHARJYA le 7 Avr 2018
for i=1:10
fprintf('\n arr%i',i);
fprintf('=[]');
end

Cette question est clôturée.

Community Treasure Hunt

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

Start Hunting!

Translated by