accessing each item in one workspace variable

조회 수: 1 (최근 30일)
Mustafa Ahmed
Mustafa Ahmed 2021년 12월 17일
댓글: Rik 2021년 12월 17일
hi everyone
i have a code results in workspace, one of the variables name A has 6000 items , i need to go through each item in A , in order to use it in a mathmetical equation how can I do that
please help
  댓글 수: 1
Rik
Rik 2021년 12월 17일
What exactly do you mean? Do you mean you have a vector called A:
A=rand(1,6)
A = 1×6
0.7209 0.7683 0.3271 0.3102 0.2577 0.3456
Or do you mean you have 6000 variables whose name starts with A:
A1=rand,A2=rand,A3=rand,A4=rand,A5=rand,A6=rand
A1 = 0.7211
A2 = 0.3887
A3 = 0.9475
A4 = 0.0796
A5 = 0.9657
A6 = 0.6427

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Startup and Shutdown에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by