Results 1 to 3 of 3

Math Help - Saving data (Matlab Question)

  1. #1
    Newbie
    Joined
    Jun 2008
    Posts
    4

    Saving data (Matlab Question)

    I apologize for multiple posts in one day.

    I'm sure there is a simple fix to my problem.

    I am using the uigetfile function to load in a .txt file. Following a few operations I would like to save a new variable with the filename obtained with the uigetfile function but add a small extension to the name.

    Currently I open the file - [filename, pathname, filterindex] = uigetfile('*.txt', 'Pick file');

    I do a few things to the file I select. Now have a new matrix (lets call it A). I would like to save this file as the filename obtained from the uigetfile function plus a (-A) or (-new) appended to it.

    I would greatly appreciate any help or suggestions to lead me in the right direction.

    Thanks kindly!
    Follow Math Help Forum on Facebook and Google+

  2. #2
    Grand Panjandrum
    Joined
    Nov 2005
    From
    someplace
    Posts
    14,972
    Thanks
    4
    Quote Originally Posted by rancediddy View Post
    I apologize for multiple posts in one day.

    I'm sure there is a simple fix to my problem.

    I am using the uigetfile function to load in a .txt file. Following a few operations I would like to save a new variable with the filename obtained with the uigetfile function but add a small extension to the name.

    Currently I open the file - [filename, pathname, filterindex] = uigetfile('*.txt', 'Pick file');

    I do a few things to the file I select. Now have a new matrix (lets call it A). I would like to save this file as the filename obtained from the uigetfile function plus a (-A) or (-new) appended to it.

    I would greatly appreciate any help or suggestions to lead me in the right direction.

    Thanks kindly!
    try this

    Code:
    >> fln='fileneame'
    fln = fileneame
    >> 
    >> xx=[fln,'.more']
    xx = fileneame.more
    >>
    RonL
    Last edited by CaptainBlack; June 22nd 2008 at 09:50 PM.
    Follow Math Help Forum on Facebook and Google+

  3. #3
    Newbie
    Joined
    Jun 2008
    Posts
    4
    Thanks kindly - I've gotten this to work....found some silly mistakes
    Follow Math Help Forum on Facebook and Google+

Similar Math Help Forum Discussions

  1. extracting data from matlab data structures
    Posted in the Math Software Forum
    Replies: 4
    Last Post: May 19th 2010, 05:12 PM
  2. 3D surface from data points in matlab
    Posted in the Math Software Forum
    Replies: 3
    Last Post: December 25th 2009, 08:43 AM
  3. Loading Data in Matlab
    Posted in the Math Software Forum
    Replies: 3
    Last Post: May 7th 2009, 09:06 PM
  4. Saving Matlab movie
    Posted in the Math Software Forum
    Replies: 0
    Last Post: March 24th 2009, 12:53 PM
  5. importing data into octave/matlab
    Posted in the Math Software Forum
    Replies: 0
    Last Post: November 5th 2008, 10:20 AM

Search Tags


/mathhelpforum @mathhelpforum