I have a question regarding time dependent loop, as I want to have a variable changing with time in the loop from 0 to 30
조회 수: 1 (최근 30일)
이전 댓글 표시
gamma(t) =4-(6/90*t);
댓글 수: 0
채택된 답변
Ameer Hamza
2020년 4월 9일
편집: Ameer Hamza
2020년 4월 10일
Without loop:
t = linspace(0,30,100); % create 100 points between 0 and 30
gamma = 4-(6/90*t);
Using for loop:
t = linspace(0,30,100);
gamma = zeros(size(t));
for i=1:numel(t)
gamma(i) = 4-(6/90*t(i));
end
댓글 수: 10
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Geology에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!