How to get the square root sign inside a xlabel?

Discussion in 'MATLAB' started by Lars Olav Vestland, Mar 9, 2008.

  1. Hello
    A am having difficulties putting the square root sign inside
    a xlabel, the greek symbols a working though. What am i
    doing wrong? I sure it can be done!?

    figure
    plot(xData,yData,'*'),
    ylabel('\Delta\theta','HorizontalAlignment','center','FontSize',13),
    xlabel(' \square{f}','FontSize',13)


    The \Delta\theta sign works great (however it would be nice
    to have horisontal text), but i cannot figure out how to get
    square sign inside the figure, Matlab just replies: Warning:
    Unable to
    interpret TeX string
    "\square{f}"

    Any help would be greatly appreciated.
     
    Lars Olav Vestland, Mar 9, 2008
    #1
    1. Advertisements

  2. Lars Olav Vestland

    Yi Cao Guest

    Try this

    xlabel('$$\sqrt{f}$$','Interpreter','latex','FontSize',13)

    hth

    Yi
     
    Yi Cao, Mar 9, 2008
    #2
    1. Advertisements

  3. Oh, sweet its works perfect.

    Thanks a bunch Yi!
     
    Lars Olav Vestland, Mar 9, 2008
    #3
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.