필터 지우기
필터 지우기

What is the meaning of the following expression

조회 수: 2 (최근 30일)
Nouha Amine
Nouha Amine 2022년 12월 20일
답변: C B 2022년 12월 20일
I have this expression,
FirstBand(Xloopcount,Yloopcount)=Energies(1);
what is it exactly and what does these means?
What are Xloopcount and Yloopcount standing for here

답변 (1개)

C B
C B 2022년 12월 20일
This expression appears to be assigning a value to an element in an array.
The array is called FirstBand and it is being indexed using Xloopcount and Yloopcount. These variables are used as indices to specify the element in the array that is being modified. For example, if Xloopcount is 2 and Yloopcount is 3, the element FirstBand(2,3) is being modified.
The value that is being assigned to the element is the first element of the array Energies, which is Energies(1).
It is possible that Xloopcount and Yloopcount are loop variables that are being used to iterate over the elements of FirstBand. For example, you might have a loop structure like this:
for Xloopcount = 1:size(FirstBand,1)
for Yloopcount = 1:size(FirstBand,2)
FirstBand(Xloopcount,Yloopcount)=Energies(1);
end
end
This would assign the value Energies(1) to every element in the FirstBand array.

카테고리

Help CenterFile Exchange에서 Matrix Indexing에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by