unable to input using filename (dxf)

6 Ansichten (letzte 30 Tage)
Ellen
Ellen am 26 Feb. 2014
Bearbeitet: Mischa Kim am 26 Feb. 2014
My code: % Reading the dxf-file.
filename = input('Type the name of the dxf-file:');
In command window I write
my_dxf_file.dxf
(saved in the same folder as the file) but get the response:
Error using input Undefined function or variable 'my_dxf_file'
Anyone know why?
Thanks

Akzeptierte Antwort

Mischa Kim
Mischa Kim am 26 Feb. 2014
Bearbeitet: Mischa Kim am 26 Feb. 2014
Ellen, use
'my_dxf_file.dxf'
with the primes (to make it a string input).

Weitere Antworten (1)

Wayne King
Wayne King am 26 Feb. 2014
Bearbeitet: Wayne King am 26 Feb. 2014
If you want this to be a string, you need to enclose it in single quotest
filename = input('Type the name of the dxf-file:','s');
User enters:
'my_dxf_file.dxf'

Kategorien

Mehr zu Deep Learning Toolbox finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by