Not enough input arguments.
Mostra commenti meno recenti
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 Commenti
Dyuman Joshi
il 27 Lug 2022
What is the full error? How are you calling your function?
Federico Paolucci
il 27 Lug 2022
Risposte (1)
David Hill
il 27 Lug 2022
function [A,B,C,D]=flexsspf(V,PF,FREQ,CSI,type)%missing ')'
PF1=isempty(PF);%recommend using isempty
1 Commento
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)
Categorie
Scopri di più su Logical in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!