Borrar filtros
Borrar filtros

Cleve Moler's mandelbrot.m gives errors in Matlab R2019b

1 visualización (últimos 30 días)
In the book "Experiments with Matlab" of Cleve Moler (free ebook)
with source code
is an experiment mandelbrot.m.
When you run it, you should get a graphical menu.
It worked fine in R2017a, but now in R2019b there seem to be checks that are more strict:
>> mandelbrot
Error:File: mandelbrot.m Line: 54 Column: 14
Identifier 'depth' is not a function or a shared variable. To share 'depth' with nested function,
initialize it in the current scope. For more information, see Sharing Variables Between Parent and Nested Functions.
I have no clue where and what to change.
Do you know / have experience in what changed recently in matlab R2019b?
  1 comentario
Bert RAM Aerts
Bert RAM Aerts el 28 de Oct. de 2019
Well in fact I was investigating how to use my nVIDIA GPU for Mandelbrot fractals. And I just found:
Very nice improvement factors.

Iniciar sesión para comentar.

Respuesta aceptada

Bert RAM Aerts
Bert RAM Aerts el 29 de Oct. de 2019
Editada: Bert RAM Aerts el 29 de Oct. de 2019
Solution is very simple, just add following global variables to mandelbrot.m:
% to make R2019b happy (global variables)
depth = 0;
width = 0;
z = 0;
kz = 0;
center = 0;
cmapidx = 0;
% Switchyard.
...

Más respuestas (0)

Categorías

Más información sobre Startup and Shutdown en Help Center y File Exchange.

Productos


Versión

R2019b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by