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

조회 수: 2 (최근 30일)
SREERAJ WARRIER
SREERAJ WARRIER 2020년 5월 6일
댓글: Arif Istiak Abeg 2020년 5월 6일
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
Stephen23
Stephen23 2020년 5월 6일
"Do I need to change the code..."
Yes: use dir rather than ls.
Arif Istiak Abeg
Arif Istiak Abeg 2020년 5월 6일
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

댓글을 달려면 로그인하십시오.

답변 (1개)

Arif Istiak Abeg
Arif Istiak Abeg 2020년 5월 6일
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

카테고리

Help CenterFile Exchange에서 Characters and Strings에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by