필터 지우기
필터 지우기

Passing one value at a time

조회 수: 3 (최근 30일)
Sugar Mummy
Sugar Mummy 2021년 12월 30일
댓글: Sugar Mummy 2022년 1월 4일
Hi,
I need to pass one value at a time from matrix. For example, first value would be 0.0087 the loop execute and display that, then 0.0074 and so on...
Any help is appreciated. Thanks in advance.

답변 (1개)

KSSV
KSSV 2021년 12월 30일
A = rand(5,1)
A = 5×1
0.0300 0.1842 0.7141 0.0645 0.4457
for i = 1:length(A)
A(i)
end
ans = 0.0300
ans = 0.1842
ans = 0.7141
ans = 0.0645
ans = 0.4457
  댓글 수: 14
Walter Roberson
Walter Roberson 2022년 1월 3일
Store the names of the variables in an array, and use a loop to call find(simOut, NAME) for each of the variables.
Sugar Mummy
Sugar Mummy 2022년 1월 4일
Thank you for the help!

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

카테고리

Help CenterFile Exchange에서 Simulink Functions에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by