MATLAB: Simple calculations derivativeMATLABvectors I would like to find dn1/dn2 in matlab and I have two vectors n1 and n2. How can I find dn1/dn2 the simplest way? Are there any inbuilt functions for these kind of calculations? Best Answer Perhaps you're looking forres = diff(n1)./diff(n2); %? Related SolutionsMATLAB: How to decrease the number of points in a matrix I suggest http://www.mathworks.com/help/matlab/ref/spline.htmlx = 1 : length(psdn);x128 = linspace(x(1), x(end), 128);p128 = spline(x, psdn, x128);plot(x128, p128); MATLAB: Alternative to diff(X) x = 1:10; x(2:end)-x(1:end-1) Related QuestionAlternatives to accumarray for faster calculationsI cannot create that array in Matlab !How to speed up calculations
Best Answer