如何自动读取变量。

2 vues (au cours des 30 derniers jours)
yegmjmr
yegmjmr le 21 Mai 2023
我用eval生成多个变量,如A1,A2。。。A100,请问如何去自动去读这些变量?
用['A' num2str(i)]做循环后产生的只是字符串‘A1’,‘A2’等,并不能读出这些变量,求助!

Réponse acceptée

jtugxjb
jtugxjb le 21 Mai 2023
继续用eval啊,eval(['A' num2str(i)]);

Plus de réponses (0)

Catégories

En savoir plus sur 变量 dans Help Center et File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!