当前位置:首页 » 操作系统 » 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这个函数.

热点内容
如何提高三星a7安卓版本 发布:2024-09-20 08:42:35 浏览:658
如何更换服务器网站 发布:2024-09-20 08:42:34 浏览:305
子弹算法 发布:2024-09-20 08:41:55 浏览:283
手机版网易我的世界服务器推荐 发布:2024-09-20 08:41:52 浏览:811
安卓x7怎么边打游戏边看视频 发布:2024-09-20 08:41:52 浏览:157
sql数据库安全 发布:2024-09-20 08:31:32 浏览:88
苹果连接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