[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How to create automatically the variable name
From: |
Andreas Weber |
Subject: |
Re: How to create automatically the variable name |
Date: |
Sun, 24 Jun 2018 19:39:43 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 |
Am 24.06.2018 um 09:50 schrieb Leloup:
> Hello,
> I should like creating automatically the variable name. I tried :
> >>for K = 1:3,name = ["A",num2str(K)],endfor
You've got many solutions so far but I think you shouldn't do it in the
first place.
You really should work with vectors, matrices or cell arrays instead.
This question comes up on stackoverflow every two weeks but there is no
sane reason to create variables dynamically with a index.
Just my two cents, Andy