Importdata problem
4 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Hello, I´d like to do a GUI thtat shows two differents lines. Each line is represented throw a file.dat.
First, I look for the library, and I have:
uigetdir --> library='C:\Users\Jhon\Desktop\';
handles.Library=library;
After, I must choose a file:
if hObject==handles.one
file='Data\file1.dat';
elseif hObject==handles.two
file='Data\file2.dat'
end
handles.File=file;
Then
Library=handles.Library
File=handles.File
Direction=strcat(Library,'\',File)
a=importdata(Direction)
m=a.data;
axes(handles.axes1);
plot(m(:,1),m(:,2),'bo-')
But I have a problem:
Direction=
'C:\Users\Jhon\Desktop\Data\file1.dat'
and importdata don´t works.
If I write: Direction='C:\Users\Jhon\Desktop\Data\file1.dat', matlab will show:
Direction= C:\Users\Jhon\Desktop\Data\file1.dat --> (there aren´t '')
and importdata works.
What can I do?
1 comentario
Oleg Komarov
el 24 de Mzo. de 2012
Please format the code: http://www.mathworks.com/matlabcentral/answers/13205-tutorial-how-to-format-your-question-with-markup
Respuestas (0)
Ver también
Categorías
Más información sobre Data Import and Analysis en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!