필터 지우기
필터 지우기

Point out a specific value in a plot.

조회 수: 2 (최근 30일)
Devdatt Thengdi
Devdatt Thengdi 2017년 12월 6일
댓글: KSSV 2017년 12월 6일
Following is the code to minimize a Sol over Q. The minimized value is obtained at Qmin. I want to plot Qmin on the plot for Q vs Sol. At the least tell me how to determine how look for its data point in the Q array.
x1 = 5900000;
x2 = 8800000;
Qmin = fminbnd(@Sol, x1, x2);
Qmin
disp(Qmin);
Q = 5900000:10000:8800000;
diff = Sol(Q);
diffQ = Sol(Qmin);
plot (Q,diff)
xlabel('Assumed Flux(Q)');
ylabel('Assumed Flux(Q) - Obtained Flux(qr)');

답변 (1개)

KSSV
KSSV 2017년 12월 6일
Easy no...use plot and hold on
  댓글 수: 2
Devdatt Thengdi
Devdatt Thengdi 2017년 12월 6일
Sorry. I am a newb. I've tried plot hold on but, we need a specific data point number of Qmin to point it out in the plot.
KSSV
KSSV 2017년 12월 6일
Read about find and logical indexing.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Structures에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by