# Function handle doesn't work as intended

7 views (last 30 days)

Show older comments

Karsten Gros
on 15 Jun 2017

Commented: Karsten Gros
on 28 Jun 2017

##### 2 Comments

### Accepted Answer

Walter Roberson
on 15 Jun 2017

Q = @(r, deltaT) pi.*r.^2.*(deltaT-(2.*T_sat.*sigma)./(H_fg.*r.*rho_l)).*((1+cos(Theta)./(2.*h_i)+delta./(lamda_coat.*sin(Theta).^2)+(r.*Theta)./(4.*lamda_l.*sin(Theta)))).^(-1)

needs to be

Q = @(r, deltaT) pi.*r.^2.*(deltaT-(2.*T_sat.*sigma)./(H_fg.*r.*rho_l)).*((1+cos(Theta)./(2.*h_i(deltaT))+delta./(lamda_coat.*sin(Theta).^2)+(r.*Theta)./(4.*lamda_l.*sin(Theta)))).^(-1)

##### 4 Comments

James Tursa
on 19 Jun 2017

Not a "major programming language", but MS Excel uses ln() for natural log.

### More Answers (2)

James Tursa
on 15 Jun 2017

Just quickly looking though what was posted, this line:

grid onq_tot2 = @(deltaT) integral(@(r) stopp(r), r_c, r_max)

looks like it should be two separate lines:

grid on

q_tot2 = @(deltaT) integral(@(r) stopp(r), r_c, r_max)

##### 0 Comments

### See Also

### Categories

### Community Treasure Hunt

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

Start Hunting!