代码搜索结果
找到约 10,000 项符合
Q 的代码
q265.m
%循环的向量化q265
tic
i=0;
for t=0:0.01:100
y=sin(t);
end
time2=toc
q242.m
button = questdlg('要退出吗?', '退出MATLAB','是','否','否');
switch button
case '是',
disp('退出MATLAB');
%Save variables to matlab.mat
save;
case '否',
quit cancel;
end
q2515.m
%线型、点型和颜色q2515
echo off
x=0:2*pi/100:2*pi;
plot(x,sin(x),'m*','linewidth',2),hold on
pause,plot(x,sin(x-pi./6),'yo','linewidth',4)
q255.m
%example for stem3 and stairs
%chapter 5
th = (0:127)/128*2*pi;
x = cos(th);
y = sin(th);
f = abs(fft(ones(10,1),128));
stem3(x,y,f','d','fill')
view([-65 30])
alpha = .01;
beta = .5;
t
q41.m
%《MATLAB在电子信息课程中的应用》第四章第一节演示程序q41
% 数据处理函数库
% 电子工业出版社出版 陈怀琛 吴大正 高西全合著 2001年10月
format,echo off,disp(' ')
disp('十个学生的身高及三门课程分数列表如下:'),pause
data=[154,49,83,67;...
158,99,81,75;...
155,100,68,
q256.m
%example for 交互绘图
%chapter 5
% start with a clean slate
clf
axis([0 10 0 10])
hold on
% Initially, the list of points is empty.
x = [];
y = [];
n = 0;
% Loop, picking up the points.
dis
q263.m
%脚本文件
%求阵列的平均值和标准差
clear
x=0:12;
[y1,y2]=stat2(x)
q2521.m
%example for text
plot(0:0.05:2*pi,sin(0:0.05:2*pi))
xlabel('t = 0 to 2\pi','FontSize',8)
ylabel('sin(t)','FontSize',8)
title('\it{Value of the Sine from Zero to Two Pi}')
text(3*pi/4,sin(3*pi/4)
q2512.m
%数学函数的绘图q2512
figure(1)
subplot(2,2,1),fplot('h(x)',[-5,5]),grid on
subplot(2,2,2),fplot('h(x)',[-5,5 -10,25]),grid on
subplot(2,2,3),fplot('20*sin(x)',[-5,5]),grid on
subplot(2,2,4),fplot('[20
q253.m
%《MATLAB在电子信息课程中的应用》第二章第五节演示程序三q253
% 动画
% 电子工业出版社出版 陈怀琛 吴大正 高西全合著 2001年10月
echo on,clf,axis equal, % 因为产生的图形是圆形,故把坐标设成相等比例
M = moviein(16); % 为变量M预留16幅图的存储空间
for j=1:16 % 作16次循环
plot(fft