Hi everyone, how to use modalfit command to estimate modal vectors from a frf matrix?
Show older comments
Hi everyone, how to use modalfit command to estimate modal vectors from a frf matrix?
4 Comments
KALYAN ACHARJYA
on 21 Sep 2018
Ayisha Nayyar
on 21 Sep 2018
Ayisha Nayyar
on 22 Sep 2018
Walter Roberson
on 23 Sep 2018
You have not posted your code or a copy of the error message.
Answers (1)
Ayisha Nayyar
on 23 Sep 2018
Edited: Walter Roberson
on 23 Sep 2018
5 Comments
Walter Roberson
on 23 Sep 2018
Edited: Walter Roberson
on 23 Sep 2018
You wrote
frf=b1;
Where are you expecting that the value of b1 will be found?
Note that this code will call itself recursively until it hits about 500 levels and then will fail as MATLAB decides you are probably in an endless loop (which you are.) When you design recursive routines (routines that call themselves) it is crucial that before calling yourself again, that you have a test deciding whether you have reached a case you can solve directly without calling yourself again.
In other words...
You seem to be trying to define a routine named "modalfit" that will intercept MATLAB's "modalfit" routine and provide values for some of the parameters, and then call MATLAB's "modalfit". But you are not calling MATLAB's "modalfit": you are calling your own modalfit since you used the same name.
Do not try to define your own function to intercept a MATLAB function of the same name. You can define, for example,
function [fn,dr,ms] = modalfit_b(b1)
frf=b1;
f=1:2500;
fs=6400;
mnum=6;
[fn,dr,ms] = modalfit(frf, f, fs, mnum, 'FitMethod', 'lsce');
end
as this routine does not call itself.
Ayisha Nayyar
on 23 Sep 2018
Ayisha Nayyar
on 23 Sep 2018
Edited: Walter Roberson
on 23 Sep 2018
Walter Roberson
on 23 Sep 2018
I suspect that you are using
function [fn,dr,ms] = modalfit(b1)
instead of what I wrote,
function [fn,dr,ms] = modalfit_b(b1)
Ayisha Nayyar
on 24 Sep 2018
Categories
Find more on Vibration Analysis in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!