MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

# Thread Subject: Multiline suplabel with latex

 Subject: Multiline suplabel with latex From: Anthony Hopf Date: 14 Oct, 2010 13:34:04 Message: 1 of 2 I can't seem to get this to work. I have a combination of variables and latex in a title I would like to put over several subplots. I can't seem to get it to work, any ideas? here is my code: [supax, suph] = suplabel({'Reflectivity, Velocity and Spectrum Width';...%line one     ['for a ',RADtype,' with \theta_{az}=',AZdeg,'^{o} and \theta_{el}=',ELdeg,'^{o}'];...%line two     ['Rankine Profile V12 used with Reflectivity Ze_{max}= ',num2str(Zmax),...     ' Vortex V_{mag} = ',num2str(vmag),' m/s and Core diameter = ',num2str(vdonut*2),' m']},'t');%line three AZdeg and ELdeg are strings. This looks a little messy because of the wrapping in this text box. Thank you
 Subject: Multiline suplabel with latex From: Anthony Hopf Date: 14 Oct, 2010 14:38:03 Message: 2 of 2 Saw this in the FEX comments by Lars: Quite useful and simple to use. You might consider to change the argument checking to allow for cell strings (multi-line) labels: if ~(ischar(text) || (iscell(text) && all(cellfun(@ischar,text))))   error('text must be a string or a cell string') end if ~ischar(whichLabel)   error('whichLabel must be a string') end Modified suplabel ->suplabel with this change and plotted very nicely. I hope this isn't a violation of license. "Anthony Hopf" wrote in message ... > I can't seem to get this to work. I have a combination of variables and latex in a title I would like to put over several subplots. > > I can't seem to get it to work, any ideas? > > here is my code: > [supax, suph] = suplabel({'Reflectivity, Velocity and Spectrum Width';...%line one > ['for a ',RADtype,' with \theta_{az}=',AZdeg,'^{o} and \theta_{el}=',ELdeg,'^{o}'];...%line two > ['Rankine Profile V12 used with Reflectivity Ze_{max}= ',num2str(Zmax),... > ' Vortex V_{mag} = ',num2str(vmag),' m/s and Core diameter = ',num2str(vdonut*2),' m']},'t');%line three > > AZdeg and ELdeg are strings. This looks a little messy because of the wrapping in this text box. > > Thank you