Hello,
I have a problem with caltulating and plotting a tangent to a specified point from data given by two arrays. I know i'm supposed to use spline function to estimate the function of the data points I have and then calculate the derivative and slope to plot a tangent, but unfortunately i'm not very experienced with MATLAB. I would greatly appreciate any help of how to get from teoretical idea to matlab code. So far, i have created a script that uses movmean function to filter any noise i got from the source of the data and got a plot like shown below:
load trzy.csvA=zeros(1906,2);A=trzy;x=A(:,2)*1000;B=zeros(1906,1);C=zeros(1906,1);B(:,1)=movmean(A(:,1),7);A(:,1)=B(:,1);C(:,1)=movmean(x,7);for k = 2:20 B(:,k)=movmean(B(:,k-1),7) ;endfor y = 2:20 C(:,y)=movmean(C(:,y-1),7);endplot(B(:,20),C(:,20))
Best Answer