Rank: 234186 based on 0 downloads (last 30 days) and 0 file submitted
photo

max

E-mail

Personal Profile:

 

Watch this Author's files

 

Comments and Ratings by max View all
Updated File Comments Rating
14 Nov 2013 Ulam spiral Natural numbers are plotted on a spiral and the primes are marked: diagonals emerge. Author: Ebrahim Mousavi

Good script. I would suggest changing your variable 'length' to a different name, as matlab has a built-in function, length, and it is no longer able to be used if you override it with a variable. But other than that, nice job!

And Andras is right... This is much easier to do:

function Ulam_Spiral(n)

s=flipud(spiral(n));
t=isprime(s);
imagesc(t);
axis('equal')
axis('off')

end

And thats it. Call in command window by Ulam_Spiral(n) where n is the size of the matrix.

05 Sep 2013 export_fig Exports figures nicely to a number of vector & bitmap formats. Author: Oliver Woodford

Oliver,

I have just downloaded your code and it seems to be receiving great reviews. I can't seem to get it to work though... All i want to do is to save a figure window to my desktop.

I have a figure that is displaying an image. How would I use export_fig to save this figure under the name 'test' in png format?

This is what I am seeing: (H is set to be the figure handle)

>>export_fig('/Users/maxnorris/Desktop/test','png',H)
Error using print
Too many input arguments.

Error in print2array (line 140)
print(fig, renderer, res_str, '-dtiff', tmp_nam);

Error in export_fig (line 334)
[A, tcol] = print2array(fig, magnify, renderer);

Contact us