how to print plot with title filename

1 view (last 30 days)
Hello,
I have 700+ plots from a for cicle and I distinguish them by the title (which states the conditions: head, neck, etc.)
I would like to save some plots with the command print, and I would like them to be called after the same conditions expressed in the title, how can I do this?
Thank you!
figure()
plot(time,BrACOM)
xlabel('Time [s]');
ylabel('Acc [g]');
legend('x','y','z');
title(['Acc Brain COM:' ' ' head ' ' neck ' ' helmet ' ' impact ' ' energy]);
print('???','-dpng','-r600');

Accepted Answer

KSSV
KSSV on 6 Jul 2021
figure()
plot(time,BrACOM)
xlabel('Time [s]');
ylabel('Acc [g]');
legend('x','y','z');
str = ['Acc Brain COM:' ' ' head ' ' neck ' ' helmet ' ' impact ' ' energy] ;
title(str);
print(str,'-dpng','-r600');

More Answers (0)

Categories

Find more on Creating, Deleting, and Querying Graphics Objects in Help Center and File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!