當前位置:首頁 » 操作系統 » matlab源碼

matlab源碼

發布時間: 2022-01-08 09:23:43

Ⅰ matlab源代碼是什麼樣子的

一般來說,較大型的軟體,通常都是由若干種語言和開發技術共同完成的。他們的開發也是由多個小組分別使用不同技術開發不同的組件,最後組合而成。

他的大多數文件使用 VC++ 書寫,你可以看到他的安裝包包含 vcredist_x86,這是典型的VC++的運行時庫。

另外,matlab 還使用了 Perl,Python 等開發語言或技術。當然還有 Java。你也可以在安裝目錄發現類似的支持文件,例如 JavaAccessBridge.dll

甚至不止是桌面程序,matlab 還使用了很多瀏覽器和伺服器端的開發工具和架構。

最後,還有一大堆的工具箱,是 matlab 自身腳本書寫的。

如果你想看某個函數的腳本,可以在命令窗中輸入:edit 函數名 ,再按回車。

Ⅱ matlab源代碼

hrollfcoef這個函數不是matlab自帶的

function [xh] = hrollfcoef(irfn,ipoint,sr,alfs,ncc)

%****************** variables *************************
% irfn : Number of symbols to use filtering
% ipoint : Number of samples in one symbol
% sr : symbol rate
% alfs : rolloff coeficiense
% ncc : 1 -- transmitting filter 0 -- receiving filter
% *****************************************************

xi=zeros(1,irfn*ipoint+1);
xq=zeros(1,irfn*ipoint+1);

point = ipoint;
tr = sr ;
tstp = 1.0 ./ tr ./ ipoint;
n = ipoint .* irfn;
mid = ( n ./ 2 ) + 1;
sub1 = 4.0 .* alfs .* tr; % 4*alpha*R_s

for i = 1 : n

icon = i - mid;
ym = icon;

if icon == 0.0
xt = (1.0-alfs+4.0.*alfs./pi).* tr; % h(0)
else
sub2 =16.0.*alfs.*alfs.*ym.*ym./ipoint./ipoint;
if sub2 ~= 1.0
x1=sin(pi*(1.0-alfs)/ipoint*ym)./pi./(1.0-sub2)./ym./tstp;
x2=cos(pi*(1.0+alfs)/ipoint*ym)./pi.*sub1./(1.0-sub2);
xt = x1 + x2; % h(t) plot((1:length(xh)),xh)
else % (4alphaRst)^2 = 1plot((1:length(xh)),xh)
xt = alfs.*tr.*((1.0-2.0/pi).*cos(pi/4.0/alfs)+(1.0+2.0./pi).*sin(pi/4.0/alfs))./sqrt(2.0);
end % if sub2 ~= 1.0
end % if icon == 0.0

if ncc == 0 % in the case of receiver
xh( i ) = xt ./ ipoint ./ tr; % normalization
elseif ncc == 1 % in the case of transmitter
xh( i ) = xt ./ tr; % normalization
else
error('ncc error');
end % if ncc == 0

end % for i = 1 : n

%******************** end of file ***************************

網上找的,你看看能不能拼到你那個程序里去

Ⅲ matlab 源代碼

%後邊不都是已經加註釋了嗎?
不了解應用情況,解答這個代碼很難的。
推薦:
www.ilovematlab.com!
論壇版主很強!

Ⅳ matlab源程序可以在哪裡下載

不知道你需要什麼問題的,一般情況下你可以在下面兩個網站碰碰運氣。第一個中文,第二個英文。
http://bbs.matwav.com/
http://www.mathworks.com/matlabcentral/fileexchange/loadCategory.do

Ⅳ MATLAB中strfind函數是怎麼實現的其源代碼是什麼

>> type strfind
'strfind' is a built-in function.
就是說該函數是解釋器內建的函數,就像qr等一樣,所以你找不到源文件的……
你試試早期的版本吧

Ⅵ MATLAB BP源代碼

你到這里找找吧,應該有你想要的:

歡迎你把這個帖子放到論壇上來, http://www.5iai.com/bbs
論壇有很多資源不過要找就需要一些耐心。
此外這里有電子書和源碼中心,你瞧一下: http://www.5iai.com/

下面那裡有很多Q群呢,你也可以加入一下,以後學習也有用。

Ⅶ matlab中一個源代碼,幫我解釋一下這些代碼每一句的意思唄,急用

clf reset%清除圖形內容並重置圖形特性
H=axes('unit','normalized','position',[0,0,1,1],'visible','off');%生成坐標軸圖柄H
set(gcf,'currentaxes',H);%設置當前圖形坐標軸
str='\fontname{隸書}歸一化二階系統的階躍響應曲線';%生成一個隸書字串,用於後面命名
text(0.12,0.93,str,'fontsize',13);%在圖中寫上面的字串
h_fig=get(H,'parent');%獲得H的特性並生成圖h
set(h_fig,'unit','normalized','position',[0.1,0.2,0.7,0.4]);%設置圖形h的位置及大小
h_axes=axes('parent',h_fig,...
'unit','normalized','position',[0.1,0.15,0.55,0.7],...
'xlim',[0 15],'ylim',[0 1.8],'fontsize',8);%生成圖形h的坐標軸
h_text=uicontrol(h_fig,'style','text',...
'unit','normalized','position',[0.67,0.73,0.25,0.14],...
'horizontal','left','string',{'輸入阻尼比系數','zeta ='});%在圖h中生成一個文本控制項,要求輸入zeta值
h_edit=uicontrol(h_fig,'style','edit',...
'unit','normalized','position',[0.67,0.59,0.25,0.14],...
'horizontal','left',...
'callback',[...
'z=str2num(get(gcbo,''string''));',...
't=0:0.1:15;',...
'for k=1:length(z);',...
's2=tf(1,[1 2*z(k) 1]); ',...
'y(:,k)=step(s2,t);',...
'plot(t,y(:,k));',...
'if (length(z)>1) ,hold on,end,',...
'end;',...
'hold off,']);%生成一個編輯控制項,根據zeta值畫圖
h_push1=uicontrol(h_fig,'style','push',...
'unit','normalized','position',[0.67,0.37,0.12,0.15],...
'string','grid on','callback','grid on');%生成一個按鈕控制項,用於在圖中畫網格
h_push2=uicontrol(h_fig,'style','push',...
'unit','normalized','position',[0.67,0.15,0.12,0.15],...
'string','grid off','callback','grid off');%生成一個按鈕控制項,用於消除圖中的網格

Ⅷ matlab中impseq,stepseq函數的源碼是什麼

就算你下載的代碼沒錯,也肯定運行不了。是你自己本身就沒有安裝DSP之類的工具包,你光下載一個函數的代碼,裡面要調用很多其他函數,當然運行不了了!你得去找到整個工具包,全下下來,然後才可以用。

PS:或者你看別人的MATLAB裡面有沒有現成的工具包,直接去根目錄下面COPY過來一般也能用。

Ⅸ 用MATLAB產生回聲的源代碼

clear all
close all
%channel system order
sysorder = 5 ;
% Number of system points
N=2000;
inp = randn(N,1);
n = randn(N,1);
[b,a] = butter(2,0.25);
Gz = tf(b,a,-1);
%This function is submitted to make inverse Z-transform (Matlab central file exchange)
%The first sysorder weight value
%h=ldiv(b,a,sysorder)';
% if you use ldiv this will give h :filter weights to be
h= [0.0976;
0.2873;
0.3360;
0.2210;
0.0964;];
y = lsim(Gz,inp);
%add some noise
n = n * std(y)/(10*std(n));
d = y + n;
totallength=size(d,1);
%Take 60 points for training
N=60 ;
%begin of algorithm
w = zeros ( sysorder , 1 ) ;
for n = sysorder : N
u = inp(n:-1:n-sysorder+1) ;
y(n)= w' * u;
e(n) = d(n) - y(n) ;
% Start with big mu for speeding the convergence then slow down to reach the correct weights
if n < 20
mu=0.32;
else
mu=0.15;
end
w = w + mu * u * e(n) ;
end
%check of results
for n = N+1 : totallength
u = inp(n:-1:n-sysorder+1) ;
y(n) = w' * u ;
e(n) = d(n) - y(n) ;
end
hold on
plot(d)
plot(y,'r');
title('System output') ;
xlabel('Samples')
ylabel('True and estimated output')
figure
semilogy((abs(e))) ;
title('Error curve') ;
xlabel('Samples')
ylabel('Error value')
figure
plot(h, 'k+')
hold on
plot(w, 'r*')
legend('Actual weights','Estimated weights')
title('Comparison of the actual weights and the estimated weights') ;
axis([0 6 0.05 0.35])

% RLS 演算法
randn('seed', 0) ;
rand('seed', 0) ;

NoOfData = 8000 ; % Set no of data points used for training
Order = 32 ; % Set the adaptive filter order

Lambda = 0.98 ; % Set the forgetting factor
Delta = 0.001 ; % R initialized to Delta*I

x = randn(NoOfData, 1) ;% Input assumed to be white
h = rand(Order, 1) ; % System picked randomly
d = filter(h, 1, x) ; % Generate output (desired signal)

% Initialize RLS

P = Delta * eye ( Order, Order ) ;
w = zeros ( Order, 1 ) ;

% RLS Adaptation

for n = Order : NoOfData ;

u = x(n:-1:n-Order+1) ;
pi_ = u' * P ;
k = Lambda + pi_ * u ;
K = pi_'/k;
e(n) = d(n) - w' * u ;
w = w + K * e(n) ;
PPrime = K * pi_ ;
P = ( P - PPrime ) / Lambda ;
w_err(n) = norm(h - w) ;

end ;

% Plot results

figure ;
plot(20*log10(abs(e))) ;
title('Learning Curve') ;
xlabel('Iteration Number') ;
ylabel('Output Estimation Error in dB') ;

figure ;
semilogy(w_err) ;
title('Weight Estimation Error') ;
xlabel('Iteration Number') ;
ylabel('Weight Error in dB') ;

Ⅹ 如何查看matlab自帶函數源代碼

1、在命令窗口中輸入:type 函數名(例如type rgb2gray等),就會在命令窗口出現該函數的相關說明及源代碼;
2、在命令窗口中輸入:open 函數名(例如open rgb2gray等),就會打開該函數的m文件;
3、在命令窗口中輸入:edit函數名(例如edit rgb2gray等),同樣會打開該函數的m文件;
4、還有一種方法就是故意將原函數的參數類型或者個數寫錯,就會出現出錯提示,點擊提示出錯處,也可以打開該函數的m文件;
很多大型的函數都能獲得源代碼,但是MATLAB裡面有一些built-in函數是看不到源代碼的,sort就是其中之一。這些函數是預編譯好的,運行效率非常好,比如像find、min、max等頻繁用到的一些函數還有很多矩陣運算函數都是built-in函數。
自帶函數,用type+函數名。比如,type dwt2可以顯示dwt2函數的代碼
但是,好像沒有qpsk這個函數.

熱點內容
蘋果連接id伺服器出錯是怎麼回事 發布:2024-09-20 08:01:07 瀏覽:502
編程鍵是什麼 發布:2024-09-20 07:52:47 瀏覽:651
學考密碼重置要求的證件是什麼 發布:2024-09-20 07:19:46 瀏覽:477
電腦主伺服器怎麼開機 發布:2024-09-20 07:19:07 瀏覽:728
2022款瑞虎升級哪些配置 發布:2024-09-20 06:59:07 瀏覽:264
資料庫與asp 發布:2024-09-20 06:55:25 瀏覽:727
python解釋編譯 發布:2024-09-20 06:52:57 瀏覽:648
舞蹈豐收腳本 發布:2024-09-20 06:36:26 瀏覽:595
linux進程埠號 發布:2024-09-20 06:36:11 瀏覽:80
派派怎麼改密碼忘了 發布:2024-09-20 06:25:49 瀏覽:780