matlab数学实验1

本文展示了MATLAB中的一些基本数学操作,包括创建数组如x=1:2:9和a=linspace(-1,1,30),以及使用三角函数如sind, cosd和tand。此外,还演示了矩阵A的创建,以及一些数组错误处理的示例,例如尝试使用'zero'函数和不正确的下标赋值。最后,给出了复数、绝对值和角度等函数的使用例子。" 111088614,10418530,Spring Cloud Stream与Spring Cloud Bus深度解析,"['java', 'spring cloud', '消息队列', '分布式系统']
摘要由CSDN通过智能技术生成

x=1:2:9

x =

 1     3     5     7     9

a=linspace(-1,1,30)

a =

1 至 11 列

-1.0000 -0.9310 -0.8621 -0.7931 -0.7241 -0.6552 -0.5862 -0.5172 -0.4483 -0.3793 -0.3103

12 至 22 列

-0.2414 -0.1724 -0.1034 -0.0345 0.0345 0.1034 0.1724 0.2414 0.3103 0.3793 0.4483

23 至 30 列

0.5172    0.5862    0.6552    0.7241    0.7931    0.8621    0.9310    1.0000

b=2*a.^2

b =

1 至 11 列

2.0000    1.7337    1.4863    1.2580    1.0488    0.8585    0.6873    0.5351    0.4019    0.2878    0.1926

12 至 22 列

0.1165    0.0595    0.0214    0.0024    0.0024    0.0214    0.0595    0.1165    0.1926    0.2878    0.4019

23 至 30 列

0.5351    0.6873    0.8585    1.0488    1.2580    1.4863    1.7337    2.0000

A=[1 2 3
4 5 6]

A =

 1     2     3
 4     5     6

x=linspace(0,pi,11)

x =

     0    0.3142    0.6283    0.9425    1.2566    1.5708    1.8850    2.1991    2.5133    2.8274    3.1416

*>> x=zero(5,6)
未定义与 ‘double’ 类型的输入参数相对应的函数 ‘zero’。

x=zeros(5,6)*

x =

 0     0     0     0     0     0
 0     0     0     0     0     0
 0     0     0     0     0     0
 0     0     0     0     0     0
 0     0     0     0     0     0

u=(1:3;
u=(1:3;
|
错误: 圆括号或方括号不对称或异常。

是不是想输入:

u=(1:3);
u=[1:3;
4:6
7:9
]

u =

 1     2     3
 4     5     6
 7     8     9

u(4,;0=[10:12]
u(4,;0=[10:12]
|
错误: 圆括号或方括号不对称或异常。

u(4,;0)=[10:12]
u(4,;0)=[10:12]
|
错误: 圆括号或方括号不对称或异常。

u(4,;)=[10,11,12]
u(4,;)=[10,11,12]
|
错误: 圆括号或方括号不对称或异常。

u(4,:)=[10,11,12]

u =

 1     2     3
 4     5     6
 7     8     9
10    11    12

u(4,:)=[1,1,1]

u =

 1     2     3
 4     5     6
 7     8     9
 1     1     1

u(:,4)=[1,1,1]
带有下标的赋值维度不匹配。

u(:,4)=[1,1,1,1]

u =

 1     2     3     1
 4     5     6     1
 7     8     9     1
 1     1     1     1

help
帮助主题:

matlabhdlcoder\matlabhdlcoder - (没有目录文件)
matlab\testframework - (没有目录文件)
matlabxl\matlabxl - MATLAB Builder EX
matlab\demos - Examples.
matlab\graph2d - Two dimensional graphs.
matlab\graph3d - Three dimensional graphs.
matlab\graphics - Handle Graphics.
graphics\obsolete - (没有目录文件)
matlab\plottools - Graphical plot editing tools
matlab\scribe - Annotation and Plot Editing.
scribe\obsolete - (没有目录文件)
matlab\specgraph - Specialized graphs.
matlab\uitools - Graphical user interface components and tools
uitools\obsolete - (没有目录文件)
hardware\stubs - (没有目录文件)
matlab\images - (没有目录文件)
toolbox\local - General preferences and configuration information.
matlab\optimfun - Optimization and root finding.
matlab\codetools - Commands for creating and debugging code
matlab\datafun - Data analysis and Fourier transforms.
matlab\datamanager - (没有目录文件)
matlab\datastoreio - (没有目录文件)
matlab\datatypes - Data types and structures.
matlab\elfun - Elementary math functions.
matlab\elmat - Elementary matrices and matrix manipulation.
matlab\funfun - Function functions and ODE solvers.
matlab\general - General purpose commands.
matlab\guide - Graphical user interface design environment
matlab\helptools - Help commands.
matlab\iofun - File input and output.
matlab\lang - Programming language constructs.
matlab\mapreduceio - (没有目录文件)
matlab\matfun - Matrix functions - numerical linear algebra.
matlab\ops - Operators and special characters.
matlab\polyfun - Interpolation and polynomials.
matlab\randfun - Random matrices and random streams.
matlab\sparfun - Sparse matrices.
matlab\specfun - Specialized math functions.
matlab\strfun - Character strings.
matlab\timefun - Time and dates.
matlab\verctrl - Version control.
matlab\winfun - Windows Operating System Interface Files (COM/DDE)
winfun\NET - Using .NET from within MATLAB
simulink\components - Simulink components.
simulink\dee - Differential Equation Editor
asap2\asap2 - (没有目录文件)
asap2\user - (没有目录文件)
can\blocks - (没有目录文件)
common\tgtcommon - (没有目录文件)
rtw\misra - (没有目录文件)
coder\simulinkcoder - Simulink Coder
targets\pil - (没有目录文件)
AUTOSAR\AUTOSAR - (没有目录文件)
rtw\accel - (没有目录文件)
coder\simulinkcoder_core - (没有目录文件)
rtw\rtwdemos - Simulink Coder Demos
rtwdemos\rsimdemos - (没有目录文件)
blocks\library - (没有目录文件)
library\simulinkcoder - (没有目录文件)
blocks\obsolete - (没有目录文件)
simulink\blocks - Simulink block library.
simulink\simulink - Simulink
simulink\MPlayIO - (没有目录文件)
simulink\simdemos - Simulink examples
simdemos\aerospace - (没有目录文件)
simdemos\automotive - (没有目录文件)
automotive\powerwindow - (没有目录文件)
simdemos\simfeatures - (没有目录文件)
simfeatures\modelreference - (没有目录文件)
automotive\fuelsys - (没有目录文件) <

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

东海一闲人

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值