Filter löschen
Filter löschen

about location and input

2 Ansichten (letzte 30 Tage)
Azam Besharat
Azam Besharat am 31 Aug. 2020
Kommentiert: Rik am 9 Nov. 2020
Hi everyone.
What does this mean?
input = import3struct(location)
I couldn't understand the rule of "locaion" here.
  13 Kommentare
Rik
Rik am 9 Nov. 2020
Bearbeitet: Rik am 9 Nov. 2020
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'];
Rik
Rik am 9 Nov. 2020
And here is a backup copy of your other question, in case you try anything there:
Fourier transform of a current data file
Hi everyone I have to get fourier transform of a current data file. It's about calculating the high harmonic generation. How can I do it? Thanks for your guide

Melden Sie sich an, um zu kommentieren.

Akzeptierte Antwort

Asad (Mehrzad) Khoddam
Asad (Mehrzad) Khoddam am 1 Sep. 2020
Bearbeitet: Asad (Mehrzad) Khoddam am 1 Sep. 2020
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 Kommentare
Asad (Mehrzad) Khoddam
Asad (Mehrzad) Khoddam am 2 Sep. 2020
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
Adam Danz
Adam Danz am 2 Sep. 2020
Also see f = filesep

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (1)

Walter Roberson
Walter Roberson am 1 Sep. 2020
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.

Kategorien

Mehr zu Search Path 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