top of page

MATLAB Mandelbrot Series

June - July 2021

Context:

Was looking to practice using MATLAB a little more. Found a practice problem to create Mandelbrot Series sketches. 

Goal: To learn more ways to use MATLAB. 

Implementation: I basically just followed the directions while adding comments to the code as I figure out how it works. 

Result: A MATLAB function that can calculate and graph images of the Mandelbrot series. I tweaked the code a bit to be able to change the viewing window and see certain areas in more detail. Below are some screenshots of the windows I graphed. 

Lessons Learned: I learned how the Mandelbrot series is calculated, how certain changes to the code increased or decreased the quality of the images produced, how to use the MATLAB function "imshow" to create images. 

Next exploration: Can ChatGPT code this better?

  • In certain aspects it did better. In others it didn't. 

    • It provided the ability to zoom into the image using scroll wheel but could not adjust resolution simultaneously regardless of how many promptings I used​

    • I was also able to use my mouse to drag the image around and explore whereas my handwritten code couldn't do that

    • It also provided for increasing resolution but at exponential computation times

    • Overall, ChatGPT struggled with being able to zoom in while simultaneously increasing resolution for just the portion on-screen and got stuck in a few rabbit holes which I had to debug by hand

    • It was impressive to see it code a fully working prototype in just 5 minutes with another 15 minutes spent debugging compared to the 30 minutes it took me to code mine

bottom of page