Rotating shafts experience a an elliptical motion called whirl. It is important to decompose this motion into a forward and backward whil orbits. The current function makes use of two sensors to generate a bi-directional spectrogram. The method can be extended to any time-frequency distribution
%
% compute the forward/backward Campbell/specgtrogram
%
% INPUT:
% y (n x 2) each column is measured from a different sensor
% ///////
% __
% |s1| y(:,1)
% |__|
% __
% / \ ________|/
% | | | s2 |/ y(:,2)
% \____/ --------|/
%
% Fs Sampling frequnecy
%
% OUTPUT:
% B spectrogram/Campbel diagram
% x x-axis coordinate vector (time or Speed)
% y y-axis coordinate vector (frequency [Hz])
使用pso求最小化一函數
matlab程式碼,寫的非常簡潔(不到100行),且還包括了2維的圖形展示,和大家分享參考!!!
一起學習matlab和各種optimize methods
最小化:(x-15)^2+(y-20)^2
The swarm matrix is
swarm(index, [location, velocity, best position, best value], [x, y components or the value component])
Author: Wesam ELSHAMY (wesamelshamy@yahoo.com) MSc Student, Electrical Enginering Dept., Faculty of Engineering Cairo University, Egypt
本書第二部分講述的是在Wi n 3 2平臺上的Wi n s o c k編程。對于眾多的基層網絡協議,
Wi n s o c k是訪問它們的首選接口。而且在每個Wi n 3 2平臺上,Wi n s o c k都以不同的形式存在著。
Wi n s o c k是網絡編程接口,而不是協議。它從U n i x平臺的B e r k e l e y(B S D)套接字方案借鑒了
許多東西,后者能訪問多種網絡協議。在Wi n 3 2環境中,Wi n s o c k接口最終成為一個真正的
“與協議無關”接口,尤其是在Winsock 2發布之后。