Finding and displaying the intersection of two functions
Show older comments
I want my program to find the intersection between two functions. If there are multiple solutions for this, I want it to display multiple solutions.
My code is currently like this:
function polarisatiecurve
P = 600;
I = 0:1:30;
U1 = P./I;
U2 = 20*I.^2 - 2*I.^3;
plot(I,U1,I,U2);
axis ([0 30 0 200])
xlabel('Stroom (A)')
ylabel('Spanning (V)')
title('Polarisatiecurve')
grid on
end
I need to find the intersection of U2 and U1. I already tried this:
C = intersect(U1,U2)
But that gave me the following:
C =
Empty matrix: 1-by-0
How do I fix this?
Accepted Answer
More Answers (1)
Hasan Ballouk
on 17 Dec 2021
Edited: Hasan Ballouk
on 28 Jan 2022
0 votes
hi every body,
I have two functions here f(x1) and f(x2).
Can I add constrains in Matlab, so that I let them meet in (0,0)?
best regards
Ballouk

Categories
Find more on Creating and Concatenating Matrices 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!