error in function that in my version work correctly but in another version work incorrect
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
amir reza
am 23 Apr. 2021
Kommentiert: amir reza
am 23 Apr. 2021
hi,
i write a function in matlab 2020b and run my function without no problems
but i send it to two of my friends and they can't run this function and this error come for them
'Function definitions are not permitted in this context.
and I should notice that their matlab version is 2015a
0 Kommentare
Akzeptierte Antwort
Rik
am 23 Apr. 2021
You didn't send them a function, but a script. Since R2016b you're allowed to put functions in a script file.
The solution is to convert your script to a function or put the script in one file and all the internal functions in separate files.
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Adding custom doc finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!