help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[newbie] how to avoid a for-loop


From: Jean Dubois
Subject: [newbie] how to avoid a for-loop
Date: Thu, 18 Dec 2014 17:40:24 +0100

Can anyone here tell me how I could avoid the for-loop in the
following function:

function [result] = calp(m)
result=[];
for k=0:m;
result=[result nchoosek(2*m-k,k)];
endfor

thanks in advance
jean



reply via email to

[Prev in Thread] Current Thread [Next in Thread]