I have a code but can't execute it. The code starts like this

2 Ansichten (letzte 30 Tage)
SREERAJ WARRIER
SREERAJ WARRIER am 6 Mai 2020
function GPcore(path)
if nargin<1
path=cd;
end
llii={};
lli=strsplit(ls(path));
for iio=1:length(lli)
if length(lli{iio})>4
if strcmpi(lli{iio}(end-3:end),'.ini')
llii = {llii{:} ,lli{iio}};
end
end
end
I think the problem lies in line 8 with strsplit(ls(path))
Do I need to change the code or install some libraries?
  3 Kommentare
Stephen23
Stephen23 am 6 Mai 2020
"Do I need to change the code..."
Yes: use dir rather than ls.
Arif Istiak Abeg
Arif Istiak Abeg am 6 Mai 2020
this is function generator.
You have to new script and then paste it there then save it
now you can use "GPcore()" as a customed function

Melden Sie sich an, um zu kommentieren.

Antworten (1)

Arif Istiak Abeg
Arif Istiak Abeg am 6 Mai 2020
this is function generator.
You have to new script and then paste it there then save it
now you can use "GPcore()" as a customed function

Kategorien

Mehr zu Characters and Strings finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by