フィルターのクリア

Reading variable names from a loop

3 ビュー (過去 30 日間)
wesso Dadoyan
wesso Dadoyan 2015 年 7 月 16 日
編集済み: Stephen23 2019 年 6 月 19 日
I have a long list of variable names that I want to create in my loop. For example,
A={'BHCK0081'
'BHCK0276'
'BHCK0277' etc...};
on the other hand I have vector B which is a double vector that has the same size of A. if I want to select these variable in a loop and assign a certain computation to get them. For example,
for i=1:length(A)
I want to get BHCK0081 as variable 1=B(j)^2
BHCK0276 as variable 2=B(j)^2
and BHCK0277 as variable 3=B(j)^2 etc...
end
How can I assign these variable names using vector A ?

回答 (1 件)

Stephen23
Stephen23 2015 年 7 月 16 日
編集済み: Stephen23 2019 年 6 月 19 日

カテゴリ

Help Center および File ExchangeLoops and Conditional Statements についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by