about location and input
Mostra commenti meno recenti
Hi everyone.
What does this mean?
input = import3struct(location)
I couldn't understand the rule of "locaion" here.
13 Commenti
Rik
il 31 Ago 2020
It is a variable.
Have you done a basic Matlab tutorial?
Azam Besharat
il 1 Set 2020
Adam Danz
il 1 Set 2020
import3struct is either a variable or a function.
If it's a variable, "location" is likely indices used to select parts of the variable.
If it's a function, you could look into that function to determine what the first input is supposed to do.
It's the same as asking what "a" means here: b=f(a). No one could answer that without knowing what f and a are. Before you tell us what f and a are, what's your guess based on this advice?
Azam Besharat
il 1 Set 2020
Asad (Mehrzad) Khoddam
il 1 Set 2020
Is the input a binary file?
Azam Besharat
il 1 Set 2020
Asad (Mehrzad) Khoddam
il 1 Set 2020
So the function import3struct reads some structure from the binary file from location (offset) given by "location".
Azam Besharat
il 1 Set 2020
Asad (Mehrzad) Khoddam
il 1 Set 2020
location is a variable. it should be set as zero at the begining. The program will change it to read more data from the file
Azam Besharat
il 1 Set 2020
Modificato: Rik
il 9 Nov 2020
Asad (Mehrzad) Khoddam
il 1 Set 2020
Can I see the code for this function ? import3struct
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'];
Risposta accettata
Più risposte (1)
Walter Roberson
il 1 Set 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.
Categorie
Scopri di più su File Operations in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!