# Math Help - Saving data (Matlab Question)

1. ## 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!

2. Originally Posted by rancediddy
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

3. Thanks kindly - I've gotten this to work....found some silly mistakes