필터 지우기
필터 지우기

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

조회 수: 1 (최근 30일)
Bert RAM Aerts
Bert RAM Aerts 2019년 10월 28일
편집: Bert RAM Aerts 2019년 10월 29일
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
Bert RAM Aerts
Bert RAM Aerts 2019년 10월 28일
Well in fact I was investigating how to use my nVIDIA GPU for Mandelbrot fractals. And I just found:
Very nice improvement factors.

댓글을 달려면 로그인하십시오.

채택된 답변

Bert RAM Aerts
Bert RAM Aerts 2019년 10월 29일
편집: Bert RAM Aerts 2019년 10월 29일
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.
...

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Startup and Shutdown에 대해 자세히 알아보기

제품


릴리스

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by