what is the problem in this code because when i use hold on command in my code but It does not work ,what is my problem ?
조회 수: 1 (최근 30일)
이전 댓글 표시
clc
clear
x = 36 ;
y = 10^16 ;
n = -25:-15 ;
f_1 = ( y .^ n ) ./ ( ( exp( x .*n)) ) ;
f_2 = ( y / exp ( x ) ).^n;
plot(n,f_1,"r")
hold on
plot(n,f_2,"b")
legend('f_1','f_2')
xlabel("n")
hold off
댓글 수: 0
채택된 답변
Jon
2021년 10월 22일
hold on is working but except for some NaN's which aren't plotted your functions f_1 and f_2 produce the same values as a function of n so the two curves are on top of each other
댓글 수: 0
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 NaNs에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!