Thread Subject: Importing data, Programming

Subject: Importing data, Programming

From: M D

Date: 20 Nov, 2009 22:57:18

Message: 1 of 1

Hi
I am importing data from a text file and it always give me the same variable in workspace. If I import another file, it rewrite the variables.

How to add string to the name of variables present in the workspace. For example we have five variables in the workspace i.e. x1,x2,x3,x4,x5. i would like to rename all of them by adding a string ('_test1') so that variable name would become x1_test1, x2_test1 ........ x5_test1. This would help me to compare the data of same parameter of different tests.
One option is to do it manually by changing each variable one by one and then saving workspace but its a lengthy process as I have to analyse tons of data?

Other solution is to write an M-file which takes the user "string input" at the command prompt and rename all the variables accordingly in the workspace. (This is what I am looking for)

I would really appreciate if someone give me a clue about the command.

Regards

Tags for this Thread

Everyone's Tags:

Add a New Tag:

Separated by commas
Ex.: root locus, bode

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Tag Activity for This Thread
Tag Applied By Date/Time
variables Muhammmad Dawopd 20 Nov, 2009 17:59:07
import Muhammmad Dawopd 20 Nov, 2009 17:59:07
programming Muhammmad Dawopd 20 Nov, 2009 17:59:07
rename Muhammmad Dawopd 20 Nov, 2009 17:59:07
rssFeed for this Thread

Contact us at files@mathworks.com