Function definitions are not permitted in this context.

cd E:\MATLAB\Data
function out = iri2016(time, latitude, longitude, height, utc, coord, ...
curldir, Rz12, IG12, f10_7_daily, f10_7_81day, tec_hmax, ne_top, ...
fpeak, f2storm, fpeak_height, bottom, f1_prob, auroral_boundary, ...
foE_storm, Ne_Dreg, Te_top, ioncomp, NmF2_foF2, hmF2_M3000F2, ...
NmE_foE, hmE, B0)
% IRI2016 International Reference Ionosphere 2016 output parameters.
%
[edit Rik: rest of file moved to attachment]

1 件のコメント

Walter Roberson
Walter Roberson 2020 年 5 月 5 日
iri2016 code is copyrighted. it cannot be posted without permission of the author.

サインインしてコメントする。

回答 (1 件)

Rik
Rik 2020 年 5 月 4 日

0 投票

You put a line of code before the first function. You can only do that if you intend your file to work as a script, and if you close all functions with the end keyword. You seem to be doing neither.
You should remove the cd line from your file.

10 件のコメント

Arun Kumar Singh
Arun Kumar Singh 2020 年 5 月 4 日
i removed but then it shows this error Curl command did not work. It returned status:1,
'"E:\MATLAB\Data\curl"' is not recognized as an internal or external command,
operable program or batch file.
Arun Kumar Singh
Arun Kumar Singh 2020 年 5 月 4 日
http://curl.haxx.se/download.html. here is the website to download CURL. if you could fix the code and make it in working mode.
Rik
Rik 2020 年 5 月 4 日
If I install curl on my computer that will not fix the issue on your computer. Judging from that error message I would suggest you install curl in E:\MATLAB\Data\.
Arun Kumar Singh
Arun Kumar Singh 2020 年 5 月 4 日
i already did it and important thing is when i remove cd line from file it shows this error Curl command did not work. It returned status:1,
'"E:\MATLAB\Data\curl"' is not recognized as an internal or external command,
operable program or batch file.
but when i enter that line in code it shows
Function definitions are not permitted in this context.
Rik
Rik 2020 年 5 月 4 日
Does the file E:\MATLAB\Data\curl.exe exist?
Arun Kumar Singh
Arun Kumar Singh 2020 年 5 月 4 日
yes it does
Arun Kumar Singh
Arun Kumar Singh 2020 年 5 月 4 日
https://curl.haxx.se/download.html you can also try downloading from here, kindly do it i need it for my research purpose.
Thanks in advance
Arun Kumar Singh
Arun Kumar Singh 2020 年 5 月 4 日
Thank you it worked
Rik
Rik 2020 年 5 月 4 日
What does this line return?
system('"E:\MATLAB\Data\curl" -h')
  • If it returns an error, then your system can't actually find curl. That is something you need to fix.
  • If it doesn't return an error there is something wrong with the function. Contact the author of the function.
Rik
Rik 2020 年 5 月 5 日
If this helped you, please consider marking my answer as accepted.

サインインしてコメントする。

カテゴリ

ヘルプ センター および File ExchangeCommunications Toolbox についてさらに検索

タグ

質問済み:

2020 年 5 月 4 日

コメント済み:

2020 年 5 月 5 日

Community Treasure Hunt

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

Start Hunting!

Translated by