This program have to calculate the numbers of partitions of a number using the euler formula(adsbygoogle = window.adsbygoogle || []).push({});

So, here is the program i have done, i don't know where is the mistakes, and I would greatly appreciate to help me.

http://mathworld.wolfram.com/PartitionFunctionP.html#eqn11

function fn = euler(n)

if n == 0

fn = 1;

return

else

for i = 1 : 1 : n

fn = ((-1)^ (i + 1)) * euler(n - i * (3 * i - 1) / 2 ) + euler(n - i * (3 * i + 1 ) / 2);

return

end

end

end

**Physics Forums | Science Articles, Homework Help, Discussion**

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 in this program in matlab

Can you offer guidance or do you also need help?

Draft saved
Draft deleted

Loading...

Similar Threads for Help program matlab |
---|

Help with Excel graph please |

MATLAB How to program this in Matlab |

MATLAB MATLab: Not enough inputs for nlinfit |

MATLAB Help needed to fix a matlab code |

LaTeX Help with page dimensions in latex |

**Physics Forums | Science Articles, Homework Help, Discussion**