From: Rajkumar R on
Hi All,

I have a piece of code like this.

s = input('Enter 10,12,15,18,20 ... ');
gs=input('Enter 2.5,2.7,3,3.2');

Now with the input the user gives, i need to load a text file. For example s=10 and gs=2.5, I need to load a file "10-2.5.txt"

Please help me with the code to keep the number as it is and fetch the file.

Thanks in advance..
Rajkumar R
From: James Tursa on
"Rajkumar R" <rrk_000(a)yahoo.co.in> wrote in message <hqsi5t$e92$1(a)fred.mathworks.com>...
> Hi All,
>
> I have a piece of code like this.
>
> s = input('Enter 10,12,15,18,20 ... ');
> gs=input('Enter 2.5,2.7,3,3.2');
>
> Now with the input the user gives, i need to load a text file. For example s=10 and gs=2.5, I need to load a file "10-2.5.txt"
>
> Please help me with the code to keep the number as it is and fetch the file.
>
> Thanks in advance..
> Rajkumar R

fname = [num2str(s) '-' num2str(gs) '.txt'];

James Tursa