about location and input
조회 수: 4 (최근 30일)
이전 댓글 표시
Hi everyone.
What does this mean?
input = import3struct(location)
I couldn't understand the rule of "locaion" here.
댓글 수: 13
Rik
2020년 11월 9일
편집: Rik
2020년 11월 9일
Why did you remove much of your question? I could only recover this from Google cache:
about location and input
Hi everyone.
What does this mean?
input = import3struct(location)
I couldn't understand the rule of "locaion" here.
And your last comment:
So I just set input file and the program will work.
This is a part of code:
function dipole_solid_fourier(location,orbital_no)
input = import3struct(location);
fig_ending = '.pdf';
adach_str = sprintf('%1.5f',input.adach);
%FILE_NAME = [location,'/dipolesup.dat'];
FILE_NAME = [location,'/currentsup.dat'];
채택된 답변
Asad (Mehrzad) Khoddam
2020년 9월 1일
편집: Asad (Mehrzad) Khoddam
2020년 9월 1일
So, the location is path to the folder containing the data file, for example : location = 'c:/dipole_tess';
FILE_NAME will be the absolute location of the data file. In Windows system you should use '/' instead of '\'
댓글 수: 3
Asad (Mehrzad) Khoddam
2020년 9월 2일
Yes I meant using '\' instead of '/' in Windows. Fortunately, even in Windows systems, we can uses '/' in Matlab to address the location of a file
추가 답변 (1개)
Walter Roberson
2020년 9월 1일
function dipole_solid_fourier(location,orbital_no)
input = import3struct(location);
fig_ending = '.pdf';
adach_str = sprintf('%1.5f',input.adach);
%FILE_NAME = [location,'/dipolesup.dat'];
FILE_NAME = [location,'/currentsup.dat'];
Notice that in that final line, location has a character vector appended to it. location is very likely to be a character vector itself. In particular, it is a character vector representing a directory name. The file currentsup.dat will be looked for in the given directory.
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Search Path에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!