Not enough input arguments.
Afficher commentaires plus anciens
Hi, this error is occurred
Not enough input arguments.
Error in flexsspf (line 34)
PF1=strcmp(PF,'');
this is the script
function [A,B,C,D]=flexsspf(V,PF,FREQ,CSI,type
PF1=strcmp(PF,'');
if PF1==0;
pf=load('pffe.mat');
pf=[pf(:,2:end)];
fiinp=pf;
[m,c]=size(pf);
B2=[zeros(m,c);fiinp];
D2=[zeros(m,c)];
end
FREQ1=strcmp(FREQ,'');
if FREQ1==0;
freq=load('freq_prop.mat');
end
k1=exist('B1');
k2=exist('B2');
if k1==1 & k2==1
B=[B1 B2];
D=[D1 D2];
else
if k2==1
B=B2;
D=D2;
else
if k1==1
B=B1;
D=D1;
end
end
end
[Br,Bc]=size(B);
[Dr,Dc]=size(D);
omo=zeros(m,m);
for i=1:m,
omo(i,i)=2*pi*freq(i);
end
A=[[zeros(m,m),eye(m)];[-omo.^2,-2*0.0024*omo]];
if type ==1
C=[eye(m),zeros(m,m)];
elseif type ==2
C=[-omo.^2,-2*0.0024*omo];
if k1==1 & k2==1
D=[fiin fiinp];
else
if k2==1
D=[fiinp];
else
if k1==1
D=[fiin];
end
end
end
end
save matlab_a A -ascii
save matlab_b B -ascii
save matlab_c C -ascii
save matlab_d D -ascii
2 commentaires
Dyuman Joshi
le 27 Juil 2022
What is the full error? How are you calling your function?
Federico Paolucci
le 27 Juil 2022
Réponses (1)
David Hill
le 27 Juil 2022
function [A,B,C,D]=flexsspf(V,PF,FREQ,CSI,type)%missing ')'
PF1=isempty(PF);%recommend using isempty
1 commentaire
I was going to comment the same but I tried some things out, strcmp does work what it is intended to
y='';
strcmp(y,'')
z='ab';
strcmp(z,'')
isequal(y,'')
isempty(y)
Catégories
En savoir plus sur Environment and Settings dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!