Effacer les filtres
Effacer les filtres

Hi, i’m new in Matlab and i can’t understand what is the problem using integral, the error occured is First input argument must ne a function handle, thanks for the help.

1 vue (au cours des 30 derniers jours)
C1=zeros(1,np);
For j=1:np
x1=0;
x=delta; %delta just defined
R_px=@(x) sqrt((dxxp-(c*x+dxx)).^2+(dyyp-(d*x+dyy)).^2+(dzzp-(f*x)+dzz)).^2);
C1(j)=integral((exp(-R_px(x)*ck)./(R_px(x).^3)),x1,x2);

Réponse acceptée

Shrestha Kumar
Shrestha Kumar le 31 Mai 2018
Hi,
You cannot directly give a expression as a parameter to the integral function.
So you need to define a new function with definition (exp(-R_px(x)*ck)./(R_px(x).^3)) and then provide the handle(name) of the function to the integral function.
  3 commentaires
Antonio Sunseri
Antonio Sunseri le 31 Mai 2018
Modifié(e) : Antonio Sunseri le 31 Mai 2018
Thanks for the answer but i think i made also a mistake because it gives me the same error
Antonio Sunseri
Antonio Sunseri le 31 Mai 2018
Ok thanks a lot i founded the other problem, now is Ok

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Programming dans Help Center et File Exchange

Produits


Version

R2017a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by