How to combine two trendline from two figures and find the angle?
Show older comments
Halo, i have asked about the same thing before and also i have searched for the solution on Google but still havent found it yet. I have some 117*1 data. Time, x, and y. I make plot for time-x and time-y. So i get two plots and also two trendlines which i get from polyfit. Now im so confused about how to combine these trendlines until i get the intersection and calculate the angle between them. Let's say time=z, x=x, and y=y. So then the plots are z-x and z-y. My teacher told me to look for a solution if z-x and z-y become x-y. Do i need to do some rotation and tranformation? Please help me. Thankyouu.
aa=polyfit(time,x,1); bb=polyval(aa,time); figure plot(time,x) hold on plot(time,bb) cc=polyfit(time,y,1); dd=polyval(cc,time); figure plot(time,y) hold on plot(time,dd)
Accepted Answer
More Answers (0)
Categories
Find more on Creating, Deleting, and Querying Graphics Objects 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!