How to know the value on the coordinates that i circled at MATLAB Function? Like (0,Y)=3.57
2 views (last 30 days)
Show older comments
0 Comments
Answers (2)
MJFcoNaN
on 1 May 2022
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)
x0=interp1(y,x,0)
plot(0,y0,'ro')
plot(x0,0,'bo')
grid on
Walter Roberson
on 1 May 2022
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 Comments
Walter Roberson
on 1 May 2022
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.
See Also
Categories
Find more on Axis Labels in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!