How to find points of intersections of graphs?
7 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Hi everybody. I need to find zeros of given functions of one (and the same) variable in given interval. f_k(t)=1-cos(a_k*t-b_k), -Pi<t<Pi, k=1,2,...,n (n is a given integer), a_k and b_k are known.
I thought to draw graphics of that functions and find the points of their intersections. But I could just draw graphics, and could not find that points. Could you help me with graphics or advice another way of solution?
2 Kommentare
Akzeptierte Antwort
Azzi Abdelmalek
am 15 Dez. 2012
Bearbeitet: Azzi Abdelmalek
am 15 Dez. 2012
pas=0.01
t=-pi:pas:pi;
n=length(t);
a_k=[1 2 3 4];
b_k=[1 2 3 4];
for k=1:numel(a_k)
f_k{k}=1-cos(a_k(k)*t-b_k(k));
[c,idx1]=findpeaks(-f_k{k})
tzeros{k}=t(idx1)
end
7 Kommentare
Azzi Abdelmalek
am 15 Dez. 2012
Bearbeitet: Azzi Abdelmalek
am 15 Dez. 2012
tzeros{1} is the vector time result for k=1
tzeros{2} is the vector time result for k=2
and so on
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Linear Algebra finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!