Info

이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.

can someone help me convert the for loop to a while loop

조회 수: 1 (최근 30일)
sam ham
sam ham 2016년 11월 9일
마감: Stephen23 2016년 11월 9일
function [ cumsum ] = q2(v) n = length(v); cumsum = zeros(1,n); for ii = 1:n if ii == 1 cumsum(ii) = v(ii); else cumsum(ii) = cumsum(ii-1)+v(ii); end end end

답변 (0개)

이 질문은 마감되었습니다.

태그

Community Treasure Hunt

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

Start Hunting!

Translated by