Search All of the Math Forum:
Views expressed in these public forums are not endorsed by
NCTM or The Math Forum.


Jeff
Posts:
113
Registered:
11/22/09


How to improve this with Matlab vectors
Posted:
Oct 13, 2011 1:40 AM


Can someone give an example of how to write this using Matlab's vectorizing? I'm sure there's a better way than what I have, but I can't quite get it working. I tried fooling around with meshgrid and stuff, but I just keep getting wrong results or 'mtimes' and 'mpower' errors.
function xfrm=Fxfrm(N) % N is positive integer (usually a power of 2). omega=exp(2*pi*1i/N); xfrm=ones(N); for m=1:N for n=1:N xfrm(m,n)=omega^((m1)*(n1)); end end end



