Hi,(adsbygoogle = window.adsbygoogle || []).push({});

I'm trying to help my sister with a Matlab work, but I'haven't work with matlab for a long time so I'm having some difficulties.

I'm trying to run this code but it gives me an error : Undefined function or method 'F' for input arguments of type 'double'. F(x)=(1-T)*F(x-1);

the purpose of the work is calculate the value for EA(x) and EP(x).Code (Text):

x=input('Number of years:');

D=input('loaned value:');

T=input('growing rate:');

F(0)=input('First year payment:');

K(0)=input('First year rate:');

EA(0)=D;

EP(0)=D;

for i=1:n

F(x)=(1+T)*F(x-1);

FA(x)=0.5*F(x);

EA(x)=(EA(x-1)-FA(x))*(1+0.01);

EP(x)=(EP(x-1)-F(x))-(1+K(x));

K(x)=K(x-1)*EP(x)/EP(x-1);

end

thanks

**Physics Forums - The Fusion of Science and Community**

Join Physics Forums Today!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

# Help with function in Matlab

Loading...

Similar Threads for Help function Matlab | Date |
---|---|

Help: MATLAB time step function | Jan 11, 2015 |

MATLAB help: Interpolating an array of data to create a function | Dec 29, 2012 |

Matlab help! User defined function! | Nov 7, 2012 |

Matlab help error : Undefined function or method 'rcpulse' for input arguments of typ | Mar 21, 2012 |

Matlab transfer function help | Jan 26, 2012 |

**Physics Forums - The Fusion of Science and Community**