I'm writing a MATLAB program that reads in a title from the user to set on a graph...
t = input('Please enter a title for the graph: ', 's');
I then want to set the title of my plot to t
. I can't seem to get it to work...
title(t) %# returns ??? Index exceeds matrix dimensions.
Many thanks for the help!
Make sure in your session you have no variable called title
masking the title()
function
» whos
Name Size Bytes Class Attributes
t 1x1 2 char
title 1x1 8 double <<<<---- you dont want this!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With