Lots of MATLAB functions want strings as inputs. Very often MATLAB users want to use the value of a variable in that string. This video tutorial shows how to do that.
By
Doug Hull
Doug first used MATLAB in 1994, could not figure it out until he got some help in 1995. He is now dedicated to making sure that no one else wastes a year of their life not knowing MATLAB like he did.
Instead of using string concatenation, one could use the sprintf command as well. E.g. replace the titleString line with
titleString = sprintf('mode number: %d',modeShape);sprintf is more flexible especially when you want a lot of variables to appear in the string:
You got a really useful blog I have been here reading for about an hour. I am a newbie and your successNike Force is very much an inspiration for me.