Skip to main content
1 of 2
Stewie Griffin
  • 2.1k
  • 1
  • 18
  • 34

This is a very nice, well commented and well structured code!

Your comments in the start are exactly how they should be. You already know this, but writing a function like you've done, where help functionName gives you the information you need is very good practice.

There's is only one minor thing I would do differently.

Instead of calculating re_step and do reals = limits(1) : re_step : limits(2); you can use linspace:

reals = linspace(limits(1), limits(2), image_size(1));
imags = linspace(limits(4), limits(3), image_size(2));

I guess you know this, but your comment is technically incorrect: "% Transpose so that plot will have reals on the x axis"

You are working with complex numbers, and in those cases, ' is the complex conjugate transpose, not the transpose. I don't know if you want the transpose or the complext conjugate transpose, but it's nice to keep in mind.

Stewie Griffin
  • 2.1k
  • 1
  • 18
  • 34