Results 1 to 1 of 1

Math Help - MATLAB - GUI Input

  1. #1
    Newbie
    Joined
    May 2008
    Posts
    3

    MATLAB - GUI Input

    Hello everyone!

    I try to make an input in MATLAB using a GUI..
    Here's the code:

    Code:
    box=inputdlg({'Height1: ','Height2: '},'Title',1,{'4000','750'})
    
    height1=box(1);
    height2=box(2);
    If I run it, I see the box and enter the values.
    But the value is saved as a "text variable".

    This means I can't calculate this:
    height3=height1-height2

    Because height1 is '4000' and height2 is '750'. The problems are the ' ', so I can't use them as normal numbers.

    Is there a way to make them into normal numbers?
    I hope you can help me

    Best regards,
    unique

    EDIT: I think I already solved the problem using str2num
    Last edited by unique; June 3rd 2008 at 11:21 AM.
    Follow Math Help Forum on Facebook and Google+

Similar Math Help Forum Discussions

  1. how to input this on a ti-89?
    Posted in the Calculus Forum
    Replies: 1
    Last Post: November 1st 2010, 09:07 AM
  2. Replies: 1
    Last Post: March 5th 2010, 03:11 AM
  3. input
    Posted in the Math Topics Forum
    Replies: 1
    Last Post: March 24th 2009, 11:54 AM
  4. Tables and input
    Posted in the Pre-Calculus Forum
    Replies: 1
    Last Post: January 24th 2009, 07:26 PM
  5. C++ input
    Posted in the Math Software Forum
    Replies: 2
    Last Post: June 28th 2008, 02:19 PM

Search Tags


/mathhelpforum @mathhelpforum