- #1

imsolost

- 18

- 1

Code is the following :

Error is the following :

"Undefined function 'mubeton' for input arguments of type 'double'."

Why the hell MATLAB thinks this is a function wile its clearly expressed as a vector ?

Thx for any help guys :)

Matlab:

```
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
xiter=[0.7 20 10];
mubeton=[0.100 0.80 0.70 0.60 0.50 0.25];
muair=[0.05 0.042 0.04 0.032 0.021 0.011];
zl=[5 30 70 100];
fnorm1 = @(d,a0,dmax) (a0*(1-exp(-(0.5*log(d./dmax)).^2))+exp(-(0.5*log(d./dmax)).^2));
fnorm2 = @(d,dmax,DRL) exp(-(d-dmax)./DRL);
integ=integral(@(r)((r<xiter(2)).*fnorm1(r,xiter(1),xiter(2))+(r>=xiter(2)).*fnorm2(r,xiter(2),xiter(3))),0,inf); %xiter manquant en input
funny=@(r,xiter)((r<xiter(2)).*fnorm1(r,xiter(1),xiter(2))+(r>=xiter(2)).*fnorm2(r,xiter(2),xiter(3)))./integ;
eps=@(r)(integral2(@(R,phi)(exp(-mubeton(1).*(sqrt((zl(1)+r).*(zl(1)+r) + R.*R) - zl(1).*sqrt((zl(1)+r).*(zl(1)+r) + R.*R)./(zl(1)+r))-muair(1).*(zl(1).*sqrt((zl(1)+r).*(zl(1)+r) + R.*R)./(zl(1)+r))).*R./(2.*sqrt(R.*R+(zl(1)+r).*(zl(z1)+r)))),0,inf,0,2*pi));
%produit=@(y)((eps(y)).*((funny(y,[0.7 20 10]))));
integral(@(y)((eps(y)).*((funny(y,[0.7 20 10])))),0,inf,'ArrayValued',true)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
```

"Undefined function 'mubeton' for input arguments of type 'double'."

Why the hell MATLAB thinks this is a function wile its clearly expressed as a vector ?

Thx for any help guys :)

Last edited by a moderator: