How to know the value on the coordinates that i circled at MATLAB Function? Like (0,Y)=3.57

조회 수: 1 (최근 30일)

답변 (2개)

MJFcoNaN
MJFcoNaN 2022년 5월 1일
Interpolation on x=0 and y=0 (or any number you need); You may change the method from linear (default) to someone else.
x=0:0.1:pi/2;
y=-sin(x-1);
plot(x,y)
hold on
y0=interp1(x,y,0)
y0 = 0.8415
x0=interp1(y,x,0)
x0 = 1
plot(0,y0,'ro')
plot(x0,0,'bo')
grid on
  댓글 수: 1
Dimas Lugia Hardianto
Dimas Lugia Hardianto 2022년 5월 1일
In my case, i want to know the value of coordinates that i circled to Display with MATLAB Function. I still don't understand the code in the MATLAB Function

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


Walter Roberson
Walter Roberson 2022년 5월 1일
You have a voltage vs current plot. Those are independent unless being forced by something external. The values are only going to be 0 if the inputs are 0.
If you have more complicated inputs you could test for the coordinates being exactly zero or for there to be a change in sign() of the coordinates. If you had something like a sine wave you would not be able to just interp1 on the coordinates, as interp1 requires that the coordinates be monotonic.
  댓글 수: 2
Dimas Lugia Hardianto
Dimas Lugia Hardianto 2022년 5월 1일
In my case, i want to know the value of coordinates that i circled to Display with MATLAB Function. I still don't understand the code in the MATLAB Function
Walter Roberson
Walter Roberson 2022년 5월 1일
Incorrect. Look at the plot: it is labeled I-V. Look at the plot: it is labeled as being an X-Y plot.
Look above the MATLAB Function in the diagram. Do you see the Product block? Do you see the Product block feeds into a rectangular block that has a circle inside it, and is labeled P-V? That is an X-Y chart.
In your original diagram there is another X-Y chart block above that which is plotting I-V using the I and V signals out of the PV module . It is that plot that you are looking at.
The Short Circuit Current block and the Open Current block in your diagram are numeric display blocks, not plots! And if they were plots then they would be labeled with the block name! Notice that those display blocks only have a single input, so even if they were plots they would only be able to plot the input versus time, not I vs V.
The code in the MATLAB Function Block is quite simple: at any given time, the outputs are the maximum of the first input that it has seen so far, and the value of the second input at that maximum, and the product of those two.

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

카테고리

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

태그

Community Treasure Hunt

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

Start Hunting!

Translated by