您的位置:首页 > 编程语言 > MATLAB

MATLAB Linear Algebra 读书笔记

2014-12-08 08:34 274 查看
contents

1 MATLAB Linear Algebra

2 MATLAB编程(第二版)-菜鸟入门教材

3 MATLAB GUI设计学习手记 罗华飞

MATLAB Linear Algebra

Springer & Apress

2014

此书只是罗列matlab函数而已,不值得细读!

1 MATLAB Introduction and Working Environment

Bessel function (贝塞尔函数)

besselj(0,11.5)


Symbolic Calculations

//展开袋鼠表达式
syms x; expand(((x + 1) *(x + 2)-(x + 2) ^ 2) ^ 3)


x = linspace(-pi/4,pi/4,300);   %生成等间距数组
y = x.*sin(1./x);
plot(x,y)
grid;
xlabel('Independent variable X');
ylabel('Dependent variable Y');
title('The function y=xsin(1/x)')




x = -7.5: 0.5:7.5;
y = x;
[X, Y] = meshgrid(x,y); //meshgrid用于从数组a和b产生网格
Z = sin(sqrt(X.^2+Y.^2))./sqrt(X.^2+Y.^2);
surf(X, Y, Z)   //三维曲面(色)图




2 Variables, Numbers, Operators and Functions

The following table presents some alternative ways of defining a vector variable without explicitly bracketing all

its elements together, separated by commas or blank spaces.



Elementary Functions that Support Complex Vector Arguments



matlab中cumsum函数通常用于计算一个数组各行的累加值。在matlab的命令窗口中输入doc
cumsum或者help cumsum即可获得该函数的帮助信息。

Logical Operators



3 Curves in Explicit, Parametricand Polar Coordinates. Surfaces

t=0:0.05:2*pi;r=sin(t).*cos(t); polar(t,r,'*r')




4 Algebraic Expressions, Polynomials, Equations and Systems

poly2sym (vector) Converts a vector of coefficients into the corresponding symbolic polynomial

( from highest to lowest power).

poly2sym([3 5 0 8 9])


5 Matrices, Vector Spaces and Linear Applications

2 MATLAB编程(第二版)-菜鸟入门教材

第三章 分支语句和编程设计



程序设计的基本步骤如下:

1.清晰地陈述出你要解决的问题。

2.确定程序所需地输入量和程序所产生的输出量。

3.为你的程序设计算法

4.将算法转化为MATLAB 语句

5.调试MATLAB 程序

第九章 句柄图形

句柄是在MATLAB 中的一个独一无二的整数或实数,用于指定对象的身份

MATLAB 提供了四个专门的函数,用来帮助寻找对象的句柄。

3 MATLAB GUI设计学习手记 罗华飞

chapter 4 句柄

%h0 = figure('menubar','none',...            %创建窗口
h0 = figure(...
'position',[200 60 450 450],...
'numbertitle', 'off',...
'name','例4.4.1:设置曲线的形状与颜色');
h1 = axes('parent',h0,...                   %创建坐标轴
'position',[0.15 0.45 0.75 0.45],...
'visible','on');
xlabel('自变量x');                          %x轴标签
ylabel('函数值y');                          %y轴标签
title('y=sin(x)');                          %标题
x = 0 : 0.1 : 2 * pi;                       %x轴数据
k = line(x,sin(x));                           %绘制数据曲线
set(0,'DefaultUicontrolfontsize',12)        %设置控件默认的字体大小
p1 = uicontrol('parent',h0,...                %创建【加号】按钮
'string','加号',...
'position',[80 120 50 30],...
'callback','set(k,''marker'',''+'')');
p2 = uicontrol('parent',h0,...                %创建【圆圈】按钮
'string','圆圈',...
'position',[200 120 50 30],...
'callback','set(k,''marker'',''o'')');
p3 = uicontrol('parent',h0,...                %创建【星号】按钮
'string','星号',...
'position',[320 120 50 30],...
'callback','set(k,''marker'',''*'')');
c1 = uicontrol('parent',h0,...                %创建【红色】按钮
'string','红色',...
'position',[80 80 50 30],...
'callback','set(k,''color'',''r'')');
c2 = uicontrol('parent',h0,...                %创建【绿色】按钮
'string','绿色',...
'position',[200 80 50 30],...
'callback','set(k,''color'',''g'')');
c3 = uicontrol('parent',h0,...                %创建【蓝色】按钮
'string','蓝色',...
'position',[320 80 50 30],...
'callback','set(k,''color'',''b'')');
s1 = uicontrol('parent',h0,...                %创建【实线】按钮
'string','实线',...
'position',[80 40 50 30],...
'callback','set(k,''LineStyle'',''-'')');
s2 = uicontrol('parent',h0,...                %创建【虚线】按钮
'string','虚线',...
'position',[200 40 50 30],...
'callback','set(k,''LineStyle'',''--'')');
s3 = uicontrol('parent',h0,...                %创建【无线】按钮
'string','无线',...
'position',[320 40 50 30],...
'callback','set(k,''LineStyle'',''none'')');

内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: