Help with for loop and indexing
정보
이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.
이전 댓글 표시
for k=1:length(x1)
q= l.*(x_prime).^2;
j= 110.*(x1-8);
i= 3.*(x_prime);
if x1(k) >= 0 && x1(k) <= 8
x_double_prime = (n-q)./z;
else
x_double_prime= (n-q-j-i)./z;
end
end
This is the for loop I have and recieved this feedback from professor: In addition to use the x1 index to check one element at a time from the x1 array, please also use each index of the x_prime to compute q and i and the x1 index to compute j. The x_double_prime in the for loop also needs an index to sav eone element at a time.
Can someone please help me with here request not understanding exactly what to do. Thank you in advance.
댓글 수: 0
답변 (1개)
madhan ravi
2018년 11월 15일
편집: madhan ravi
2018년 11월 15일
0 개 추천
I am not sure exactly what you want but
it should be with an index
x_prime(k)
and
x_double_prime(k)
댓글 수: 0
이 질문은 마감되었습니다.
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!