ask to an user a *.txt file

Good Afternoon, i'm trying to make a program that ask to the user the name of the file, and the program edit that file, i don´t know what i have to do, because when use this code: file=input('file name','s'); tamiz=importdata('file.txt'); i get this >> proyectosuelos file nameTamiz1 Error using importdata (line 137) Unable to open file.
Error in proyectosuelos (line 2)
tamiz=importdata('file.txt');
Thanks.

Answers (1)

file=input('file name','s');
tamiz=importdata([file '.txt']);

Categories

Asked:

on 18 Sep 2013

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!