필터 지우기
필터 지우기

what will be the multiplication of all c values in loop (in given example), i.e. c1*c2*c3*c4*c5?

조회 수: 1 (최근 30일)
a=[1 2 3 4 5];
b=[0 1 0 6 4];
for i=1:5
c=[1 2+a(i); 1*b(i) 5]
end

채택된 답변

Torsten
Torsten 2022년 9월 12일
편집: Torsten 2022년 9월 12일
a = [1 2 3 4 5];
b = [0 1 0 6 4];
c = eye(2);
for i = 1:5
c = c*[1 2+a(i); 1*b(i) 5];
end
c
c = 2×2
3090 7853 4025 10235

추가 답변 (0개)

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by