Clear Filters
Clear Filters

how to preallocate a figure handle?

11 views (last 30 days)
zilai si
zilai si on 7 May 2019
Answered: KSSV on 7 May 2019
Hello everyone, I wonder how to preallocate the array G whose element is figure handle like this?
for i = 1 : 4
G(k) = plot(a, b);

Accepted Answer

KSSV
KSSV on 7 May 2019
h = gobjects(1,10) ;
for i = 1:10
h(i) = plot(rand(1,10)) ;
end

More Answers (0)

Categories

Find more on Graphics Object Programming in Help Center and File Exchange

Products

Community Treasure Hunt

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

Start Hunting!