Recent content by kappa

  1. K

    MATLAB Matlab polynomial interpolation

    doesn t work it says something that matrix must be square
  2. K

    MATLAB Matlab polynomial interpolation

    I have this function (1-6*x^2)^-1 and i want to polynomial interpolation (lagrange and spline) in 21 equidistant points [-1,1] I made this function x =linspace(-1,1,21); y = (1-6*x^2)^-1; z=[-1:0.01:1] c=polyfit(x,y,20) p=polyval(c,z) s=spline(x,y,z) plot(z,(1-6*x^2)^-1, z, p, z, s)...
  3. K

    MATLAB Can I Find 21 Equidistant Roots Between [-1,1] of a Function in Matlab?

    I tried but didn`t work I managed to make a functions function test; f=inline('(1-6*x^2)^-1'); x_values =linspace(-1,1,21); for i= 1:21 y_values(1,i)=f(x_values(1,i)) end; thanks for the linspace code it helped me :]
  4. K

    MATLAB Can I Find 21 Equidistant Roots Between [-1,1] of a Function in Matlab?

    yes so if I define my function so: function y=f(x); y=(1-6*x^2)^-1; >> x_values = linspace(-1,1,21) >> y_values= subs(? ?
  5. K

    MATLAB Can I Find 21 Equidistant Roots Between [-1,1] of a Function in Matlab?

    yes i was rong i need the value of f(x)=... when x is from [-1,1] (for 21 values) I do it with fsolve?
  6. K

    MATLAB Can I Find 21 Equidistant Roots Between [-1,1] of a Function in Matlab?

    i have this function f(x) = (1 − 6x^2)^-1 and I need 21 roots between [-1,1] equidistant (the points to be at same distance from one to another) can i find the roots with some function in matlab? i found out just the polyval function for polynom
Back
Top