unable to input using filename (dxf)
조회 수: 1 (최근 30일)
이전 댓글 표시
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
댓글 수: 0
채택된 답변
Mischa Kim
2014년 2월 26일
편집: Mischa Kim
2014년 2월 26일
Ellen, use
'my_dxf_file.dxf'
with the primes (to make it a string input).
댓글 수: 0
추가 답변 (1개)
Wayne King
2014년 2월 26일
편집: Wayne King
2014년 2월 26일
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'
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Bodies에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!