首页 / 操作系统 / Linux / Matlab数据处理快速学习教程
本篇内容集合了MATLAB中的基本操作、数据存储与计算、数据的直线与曲线拟合与画图、for-if-while语句的使用方法对一般matlab的操作进行了基本和详细的应用举例,非常适合初学者进行matlab学习快速掌握。下面分四个模块分别进行讲述:
========================BasicOperations========================>> A=rand(3,2) A = 0.8147 0.9134 0.9058 0.6324 0.1270 0.0975 >> A=[1 2;3 4;5 6] A = 1 2 3 4 5 6 >> A(3,2) ans = 6 >> A(2,:) ans = 3 4 >> A([1 3],:) %select the 1st and 3rd row ans = 1 2 5 6 >> save test.mat A>> save testtext.txt A –ascii
>> A(:,2)=[10,11,12] A = 1 10 3 11 5 12 >> A=[A,[101;102;103]]%append another column vector A = 1 10 101 3 11 102 5 12 103 >> A(:)%put all elements of A into a single vector ans = 1 3 5 10 11 12 101 102 103 B=[11,12;13,14;15,16] B = 11 12 13 14 15 16 >> C=[A B] C = 1 10 101 11 12 3 11 102 13 14 5 12 103 15 16 A=[1 2;3 4;5 6] A = 1 2 3 4 5 6 >> C=[A;B] C = 1 2 3 4 5 6 11 12 13 1415 16