assign value and plot outside the loop
조회 수: 1 (최근 30일)
이전 댓글 표시
function [call_value]=different_k(S, r, sigma, t, steps)
call_value=zeros(226,1);
for i=75:300
call_value(i-74,1) =european_call_binomial(S, i, r, sigma, t, steps);
%plot(call_value(i-74,1),i);
end
x=75:1:300;
y=call_value(1:1,1);
plot(x,y)
I 'm trying to assign the value to call_value. However, the result says call_value has not been defined. Did I made a in call_value(i-74,1)? how should I fix this ?
댓글 수: 0
답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Annotations에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!