matlab实习报告
matlab学习心得体会(精选18篇)

matlab学习心得体会(精选18篇)matlab学习篇1matlab中有丰富的图形处理能力,提供了绘制各种图形、图像数据的函数。
他提供了一组绘制二维和三维曲线的函数,他们还可以对图形进行旋转、缩放等操作。
matlab内部还包含丰富的数学函数和数据类型,使用方便且功能非常强大。
本学期通过对matlab的系统环境,数据的各种运算,矩阵的分析和处理,程序设计,绘图,数值计算及符号运算的学习,初步掌握了matlab的实用方法。
通过理论课的讲解与实验课的操作,使我在短时间内学会使用matlab,同时,通过上机实验,对理论知识的复习巩固实践,可以自己根据例题编写设计简单的程序来实现不同的功能,绘制出比较满意的二维三维图形,在实践中找到乐趣。
matlab是一个实用性很强,操作相对容易,比较完善的工具软件,使用起来比较方便,通过操作可以很快看到结果,能够清晰的感觉到成功与失败,虽然课程中也会出现一些小问题,但是很喜欢这门课程。
matlab学习心得体会篇2MATLAB中有丰富的图形处理能力,提供了绘制各种图形、图像数据的函数。
他提供了一组绘制二维和三维曲线的函数,他们还可以对图形进行旋转、缩放等操作。
MATLAB内部还包含丰富的数学函数和数据类型,使用方便且功能非常强大。
本学期通过对MATLAB的系统环境,数据的各种运算,矩阵的分析和处理,程序设计,绘图,数值计算及符号运算的学习,初步掌握了MATLAB的实用方法。
通过理论课的讲解与实验课的操作,使我在短时间内学会使用MATLAB,同时,通过上机实验,对理论知识的复习巩固实践,可以自己根据例题编写设计简单的程序来实现不同的功能,绘制出比较满意的二维三维图形,在实践中找到乐趣。
MATLAB是一个实用性很强,操作相对容易,比较完善的工具软件,使用起来比较方便,通过操作可以很快看到结果,能够清晰的感觉到成功与失败,虽然课程中也会出现一些小问题,但是很喜欢这门课程。
matlab学习心得体会篇3这是我在学习的过程中的一些技巧,或许对你有帮助,可能字数不你能满足你的要求,但是绝对是精华。
matlab实训心得体会(通用23篇)

matlab实训心得体会(通用23篇)matlab实训篇1自己刚刚接触matlab有半个学期的时间,说实话我现在对MATLAB还是摸不着头脑,一方面是自己接触的时间太短,另一方面,就是自己在上机方面投入的时间有限,实践比较少。
现在,我对MATLAB的印象仅仅在解决习题和绘制图形上,但是我很喜欢MATLAB的简单的语法,易于绘制图形,编程也非常容易, 并且具有功能强大的开放式的toolbox。
因此,尽管我一直没有这方面的应用,但是我还是对它非常感兴趣,自己正打算暑假好好研究研究MATLAB。
下面是我学习MATLAB在理论和实践方面的一点心得与体会,可能有些地方自己理解的不是很正确,但是随着学习的深入,我想我可以发现自己的错误所在。
首先我想说的是,在理论方面,在学习MATLAB过程中,我感觉到它和c语言有许多相似之处,他有c语言的特征,但是比c语言编程计算更加简单,适合于复杂的数学运算。
但是MATLAB跟其他语言也有着很大的不同。
现在用的比较多的编程语言,除了MATLAB就应该是c、c++、VHDL,VB和Delphi也接触过,如果自己抱着“把其他语言的思想运用在MATLAB里面”的话,那么我想,即使程序运行不出错,也很难把握MATLAB的精髓,也就很难发挥MATLAB的作用了。
众所周知MATLAB是一个基于矩阵运算的软件,但是,真正在运用的时候,特别是在编程的时候,许多人往往没有注意到这个问题。
在使用MATLAB时,受到了其他编程习惯的影响,特别是经常使用的C语言。
因此,在MATLAB编程时,for循环(包括while循环)到处都是。
.这不仅是没有发挥MATLAB所长,还浪费了宝贵的时间。
我这里想说的一点是,往往在初始化矩阵的时候注意到这个问题,懂得了使用矩阵而不是循环来赋值,但是,在其他环节上,就很容易疏忽,或者说,仍然没有摆脱C++、C的思想。
MATLAB博大精深,涉及的内容很多,所以,我认为不要试图掌握MATLAB的每一个功能,熟悉和你专业最相关的部分就可以了,这也是老师在课堂上经常说的。
matlab入门 实验报告

matlab入门实验报告《Matlab入门实验报告》Matlab是一种强大的数学软件,被广泛应用于工程、科学和金融领域。
它具有丰富的功能和灵活的编程语言,适用于数据分析、图形绘制、模型建立等多种应用。
本实验报告将介绍Matlab的基本操作和应用,帮助读者快速入门并掌握基本技能。
首先,我们将介绍Matlab的基本界面和操作方法。
Matlab的界面分为命令窗口、编辑窗口和工作区等部分,用户可以通过命令窗口输入指令进行计算和操作。
编辑窗口则用于编写和编辑Matlab脚本文件,工作区则显示当前的变量和数据。
通过这些基本操作,用户可以快速上手Matlab并进行简单的计算和数据处理。
其次,我们将介绍Matlab的基本数据类型和运算。
Matlab支持多种数据类型,包括数值、字符、逻辑等,用户可以通过简单的指令进行数据的存储和处理。
此外,Matlab还支持各种数学运算和函数,用户可以通过这些函数进行复杂的数学计算和数据分析。
通过实际的例子和练习,读者可以掌握Matlab的基本数据操作和运算方法。
最后,我们将介绍Matlab的图形绘制和数据分析功能。
Matlab提供了丰富的绘图函数和工具,用户可以通过简单的指令绘制各种图形和图表。
同时,Matlab还提供了各种数据分析和统计工具,用户可以通过这些工具进行数据的分析和可视化。
通过实际的案例和练习,读者可以掌握Matlab的图形绘制和数据分析技能。
总之,Matlab是一种强大的数学软件,具有丰富的功能和灵活的编程语言,适用于多种应用领域。
通过本实验报告的介绍和练习,读者可以快速入门Matlab 并掌握基本技能,为今后的学习和工作打下坚实的基础。
Matlabe的学习是一个循序渐进的过程,需要不断的实践和练习,相信通过努力,读者一定能够掌握Matlab并运用于实际的工程和科学问题中。
matlab实习总结.(大全5篇)

matlab实习总结.(大全5篇)第一篇:matlab实习总结.MATLAB和Mathematica、Maple并称为三大数学软件。
它在数学类科技应用软件中在数值计算方面首屈一指。
MATLAB可以进行矩阵运算、绘制函数和数据、实现算法、创建用户界面、连 matlab开发工作界面接其他编程语言的程序等,主要应用于工程计算、控制设计、信号处理与通讯、图像处理、信号检测、金融建模设计与分析等领域。
MATLAB的基本数据单位是矩阵,它的指令表达式与数学、工程中常用的形式十分相似,故用MATLAB来解算问题要比用C,FORTRAN等语言完成相同的事情简捷得多,并且MATLAB也吸收了像Maple等软件的优点,使MATLAB成为一个强大的数学软件。
在新的版本中也加入了对C,FORTRAN,C++,JAVA的支持。
可以直接调用,用户也可以将自己编写的实用程序导入到MATLAB函数库中方便自己以后调用,此外许多的MATLAB爱好者都编写了一些经典的程序,用户可以直接进行下载就可以用Matlab是一个强大的数学工具,它的应用广泛,涉及到各个领域.它使用起来十分方便,不用麻烦去定义变量.它的绘图能力很强,甚至可以模拟出三维视图.矩阵是它应用的核心,许多工程繁琐的运算都需要靠矩阵来化简,这正是它的生命力所在.但是,他的函数很多,开始学时记的比较痛苦,我已经深深感觉到了.不过看多了也就熟了,感觉和学五笔差不多.它的语法简单,像我学过C语言的学起来还是蛮容易的.它的数组定义十分符合自然,是从1开始的,数组元素的调用也很接近数学的表达.此外,函数的名字也很符合英文规则,反正我用得很开心就是了.通过学习matlab,我又一次锻炼了自己的思维.它学起来得心应手也让我明白了学习一门语言(c语言对学习其他语言的帮助指导作用.同时,它也加强了我理论联系实际的能力.这是一个专业课的基础工具,学好它是必要的.在第一章中,讲的是一些matlab的入门技术,除了一些基本操作与介绍之外,还初步认识了简单指令的编制,认识了一些matlab 的特殊符号,例如运算用到的加减乘除。
MATLAB_实习报告范文大全

MATLAB_实习报告范文大全第一篇:MATLAB_实习报告实习报告实习题目:专业:学号:的设计与绘图MATLAB 一.概述MATLAB 作为一种高级科学计算软件,是进行算法开发、数据可视化、数据分析以及数值计算的交互式应用开发环境。
世界上许许多多的科研工作者都在使用 MATLAB 产品来加快他们的科研进程,缩短数据分析和算法开发的时间,研发出更加先进的产品和技术。
二.实验目的1.进一步熟悉MATLAB的软件环境和基本使用方法;2.巩固运用MATLAB、矩阵运算、多项式运算、字符串、单元数组、符号计算功能、绘图及句柄图形及它们的命令语句;3.学习和巩固数字图形图像处理在MATLAB中的知识和运用;4.培养我们独立自学、设计和撰写实验报告的能力;5.通过对MATLAB的进一步学习,是我们加深所学内容的认识,理解,掌握,能把所学知识运用到实际工作中;三.实习日记1.熟悉MATLAB的软件环境和基本使用方法(第一周)MATLAB的语言的基本功能和特点:它是一种高级科学计算语言,相对于传统的C、C++ 或者FORTRAN 语言,MATLAB 提供了高效快速解决各种科学计算问题的方法。
它具有数学计算、开发工具、数据的可视化、交互式编辑创建图形、集成的算法开发编程语言和环境、图形用户界面开发环境——GUIDE、开放性、可扩展性强、专业应用工具箱等强大的功能。
具有易于学习、使用方便、支持多种操作系统、丰富的内部函数、强大的图形和符号功能等优点。
路径设置:除 MATLAB 默认的搜索路径外,用户可以设置搜索路径。
设置方法为:选择 MATLAB 窗口中的 File | Set Path 命令,进入路径搜索对话框。
MATLAB 的搜索顺序:当在命令窗口中或者一个 M 文件中输入一个元素名时,MATLAB 按照下面的顺序搜索该元素的意义,以元素foo 为例:1)查找工作区中是否存在名为 foo 的变量; 2)在当前路径中查找是否存在名 foo.m 的文件;3)按照顺序查找搜索路径中是否存在该文件。
初识MATLAB的实验报告

初识MATLAB的实验报告1. 引言MATLAB(Matrix Laboratory)是一种高级的技术计算环境和编程语言。
它具有强大的矩阵计算能力和丰富的科学和工程绘图功能,被广泛应用于各个领域的科研与工程实践中。
本实验旨在初步了解MATLAB的基本语法和功能,通过实际操作加深对MATLAB编程的理解。
2. 实验目的1. 掌握MATLAB的安装和基本使用方法;2. 学习MATLAB中的常用数学函数和操作;3. 了解MATLAB绘图功能并能够绘制简单的图形。
3. 实验步骤3.1 MATLAB安装首先,在官方网站(3.2 MATLAB入门3.2.1 MATLAB语法MATLAB的语法类似于其他常见的编程语言,每个语句以分号结尾。
在MATLAB 中,可以直接进行基本的数学运算,例如加减乘除、指数、对数等。
通过以下代码可以计算两个变量的和并将结果打印出来:matlaba = 10;b = 20;sum = a + b;disp(sum);3.2.2 MATLAB变量在MATLAB中,可以创建和操作各种类型的变量,例如数值、字符串、矩阵等。
以下代码演示了如何创建一个矩阵:matlabmatrix = [1, 2, 3; 4, 5, 6; 7, 8, 9];disp(matrix);3.2.3 MATLAB函数MATLAB提供了许多内置的数学函数,可以直接调用。
以下代码演示了如何计算正弦函数值并打印结果:matlabx = pi/4;y = sin(x);disp(y);3.3 MATLAB绘图MATLAB具有强大的绘图功能,可以绘制各种图形,如曲线、散点图、柱状图等。
以下代码演示了如何绘制一个简单的正弦曲线:matlabx = linspace(0, 2*pi, 100);y = sin(x);plot(x, y);xlabel('x');ylabel('y');title('Sine Curve');4. 实验结果与分析在完成上述实验步骤后,我们成功安装了MATLAB,并学习了基本的语法、变量和函数的使用方法。
matlab实验报告1

matlab实验报告1MATLAB实验报告1摘要:本实验使用MATLAB软件进行了一系列的实验,主要包括数据处理、图像处理和信号处理。
通过实验,我们掌握了MATLAB软件在科学计算和工程领域的应用,深入了解了MATLAB在数据处理、图像处理和信号处理方面的强大功能。
一、数据处理实验在数据处理实验中,我们使用MATLAB对一组实验数据进行了分析和处理。
首先,我们导入了实验数据并进行了数据清洗和预处理,然后利用MATLAB的统计分析工具对数据进行了描述性统计分析,包括均值、方差、标准差等指标的计算。
接着,我们利用MATLAB的绘图工具绘制了数据的直方图和散点图,直观地展现了数据的分布规律和相关性。
二、图像处理实验在图像处理实验中,我们使用MATLAB对一幅图像进行了处理和分析。
首先,我们读取了图像并进行了灰度化处理,然后利用MATLAB的图像滤波工具对图像进行了平滑和锐化处理,最后利用MATLAB的图像分割工具对图像进行了分割和特征提取。
通过实验,我们深入了解了MATLAB在图像处理领域的应用,掌握了图像处理的基本原理和方法。
三、信号处理实验在信号处理实验中,我们使用MATLAB对一组信号进行了处理和分析。
首先,我们生成了一组模拟信号并进行了频域分析,利用MATLAB的信号滤波工具对信号进行了滤波处理,然后利用MATLAB的频谱分析工具对信号的频谱特性进行了分析。
通过实验,我们深入了解了MATLAB在信号处理领域的应用,掌握了信号处理的基本原理和方法。
综上所述,本实验通过对MATLAB软件的应用实验,使我们对MATLAB在数据处理、图像处理和信号处理方面的功能有了更深入的了解,为我们今后在科学计算和工程领域的应用奠定了良好的基础。
MATLAB软件的强大功能和广泛应用前景,将为我们的学习和科研工作提供有力的支持和帮助。
MATLAB实验报告(8个实验)

MATLAB实验报告(8个实验)四川师范大学MATLAB语言实验报告1系级班年月日实验名称:Intro, Expressions, Commands姓名学号指导教师成绩1ObjectiveThe objective of this lab is to familiarize you with the MATLAB program development environment and to develop your first programs in this environment.2Using MATLAB2.1Starting MATLABLogon to your computer and start MATLAB by double-clicking on the icon on the desktop or by using the Start Programs menu. MATLAB Desktop window will appear on the screen.The desktop consists of several sub-windows. The most important ones are:●Command Window (on the right side of the Desktop) is used to do calculations,enter variables and run built-in and your own functions.●Workspace (on the upper left side) consists of the set of variables (arrays) createdduring the current MATLAB session and stored in memory.●Command History (on the lower left side) logs commands entered in theCommand Window. You can use this window to view previously run statements, and copy and execute selected statements.You can switch between the Launch Pad window and the Workspace window using the menu tabs under the sub-windowon the upper left side. Similarly, you can switch between the Command History and Current Directory windows using the menu tabs under the sub-window on the lower left side.2.2Executing CommandsYou can type MATLAB commands at the command prompt “>>” on the Command Window.For example, you can type the formula cos(π/6)2sin(3π/8) as >>(cos(pi/6) ^ 2) * (sin(3 * pi/8))Try this command. After you finish typing, press enter. The command will be interpreted and the result will be displayed on the Command Window.Try the following by observing how the Workspace window changes:>> a = 2; (M ake note of the us age of “;”)>> b = 3;>> c = a ^ 4 ? b ? 5 + pi ^3You can see the variables a, b and c with their types and sizes on the Workspacewindow, and can see the commands on the Command History window.Spend a few minutes to practice defining array variables (i.e. vectors and matrices)usingthe square bracket (“[ ]”) and colon (“:”) operators, and zeros() and ones() functions.>> ar =[ 1 2 3 4 5 ];>> br =[ 1 2 3 ;4 5 6 ];>> cr = [1 : 3 : 15];Set dr to ?rst 3 elements of ar.dr=ar(1:3);Set er to second row of br.er=br(2,:);Set ar to [dr er]. Find the number of elements of ar.ar=[dr er]; length(ar)2.3 Getting HelpThere are several ways to get help on commands and functions in MATLAB. First ofall you can use the Help menu. You can also use the “?” button. Try to findinformation on the plot function from the help index. Also try to get information onthe same function using the help command (i.e. type help plot). Finally, experimentwith the lookfor command. This command looks for other commands related to agiven keyword.2.4 Some Useful CommandsTry the following commands and observe their results:Which : Version and location infoClear : Clears the workspaceClc : Clears the command windowwho, whos : Lists content of the workspace3 ExercisesPlease solve the following problems in MATLAB. Do not forget to keep a diary ofyour commands and their outputs.(1) De?ne the variables x y and z as 7.6, 5.5 and 8.1, respective ly, and evaluate:578.422.52??? ??-x y xz(2) Compute the slope of the line that passes through thepoints (1,-2) and(5,8).(3) Quiz 1.1: 5(4)1.6 Exercises: 1.1, 1.4(5)2.15 Exercises: 2.6, 2.9, 2.114Quitting MATLABTyping quit on the command window will close the program. Do not forget to send your diary file and M-file to your TA.Do not forget to delete your ?les from the hard disk of the PC you used in the lab at the end of the lab session.四川师范大学MATLAB语言实验报告2系级班年月日实验名称:Programming, Relational and Logical Expressions 姓名学号指导教师成绩1ObjectiveThe objective of this lab is to familiarize you with the MATLAB script files (M-files), subarrays, relational and logical operators.2Script FilesScript files are collections of MATLAB statements that are stored in a file. Instead of typing commands directly in the Command Window, a series of commands may be placed into a file and the entire file may be executed by typing its name in the Command Window. Such files are called script files that are also known as M-files because they have an extension of .m. When a script file is executed, the result is the same as it would be if all of the commands had been typed directly into the Command Window. All commands and script files executed in the Command Window share a common workspace, so they can all share variables in the workspace. Note that if two script files are executed successively, the second script file can use the variables created by the first script file. In this way, script files can communicate with other script files through the data left behindin the workspace. An Edit Window is used to create new M-files or to modify existing ones. The Edit Window is a programming text editor, with the features of MATLAB language highlighted in different colors. You can create a new M-file with the File/New/M-file selection and you can open an existing M-file with the File/Open selection from the desktop menu of MATLAB.(1)Create a new working directory under the current directory and change the currentdirectory to …TA?s suggest?.3SubarraysIt is possible to select and use subsets of MATLAB arrays. To select a subset of an array, just include a list of the elements to be selected in the parentheses after the array name. MATLAB has a special function named end that is used to create arraysubscripts. The end function always returns the highest value taken on by a givensubscript. It is also possible to use subarrays on the left-hand side of an assignmentstatement to change only some of the values in an array. If values are assigned to asubarray, only those values are changed but if values are assigned to an array, theentire contents of the array are replaced by the new values.(1) Define the following 5 x 5 array arr1 in MATLAB.----=2274235421209518171651413215111012844563311arr(2) Write a MATLAB statement to select a subset of arr1 and return the subarraycontaining the values as shown.=22745456311arrarr11=arr1([1,5],[2 4 5]);(3) Write two MATLAB statements to select the last row and last column of arr1,separately.arr12=arr1(5,:);或arr12=arr1(end,:); arr13=arr1(:,end);或arr13=arr1(:,5);(4) Write MATLAB statements to obtain the following array from arr1.-=2257462335432112arrarr2=arr1([1 5],:)';4 Relational and Logical OperatorsRelational and logical operators are the two types of operators that produce true/falseresults in MATLAB programs. MATLAB interprets a zero value as false and anynonzero value as true. Relational operators ( ==, =,>,>=,<,<=) are operators with twooperands that produce either a true (1) or a false (0) result, depending on the values ofthe operands. Relational operators can be used to compare a scalar value with an array.They can also be used to compare two arrays or two strings only if they have the samesize. Be careful not to confuse the equivalence relational operator ( == ) with theassignment operator ( = ). Logic operators ( &, |, xor, ~ ) are operators with one ortwo operands that yield a logical result such as 0 or 1. There are three binary logicoperators: AND (& ), OR ( |), and exclusive OR ( xor ); and oneunary operator: NOT( ~). In the hierarchy of operations, logic operators are evaluated after allarithmetic and relational operators have been evaluated. The operator is evaluatedbefore other logic operators.(1) Define the following 4 x 5 array arr4 in MATLAB.------=212343212343212543214arr(2) Write an expression using arr4 and a relational operator to produce the followingresult.=110001110011110111115arrarr5=arr4>0;(3) Write an expression using arr4 and a relational operator to produce the followingresult.=010000010000010000016arrarr6=arr4==1;(4) Write a MATLAB program which will generate an (n-1)x(n-1) matrix from agiven nxn matrix which will be equal to given matrix with first row and firstcolumn deleted.arr44=rand(5); arr444=arr35(2:end,2:end);(5) Generalize your program above so that the program should ask the row andcolumn numbers to be deleted and then generate new (n-1)x(n-1) matrix.n=input('input n:');matrixn=rand(n)delrow=input('input row numbers to be deleted:');delcolumn=input('input column numbers to be deleted:');matrixn_1=matrixn([1:delrow-1 delrow+1:end], [1:delcolumn-1 delcolumn+1:end])(6) Quiz 3.1 (P88)5 Quitting MATLABTyping quit on the command window will close the program. Do not forget to sendyour diary file and M-file to your TA.Do not forget to delete your files from the hard disk of the PC you used in the lab atthe end of the lab session.四川师范大学MATLAB 语言实验报告3系级班年月日实验名称:Branches and Loops, Logical Arrays.姓名学号指导教师成绩 1 ObjectiveThe objective of this lab is to familiarize you with the MATLAB Branches and Loops,Logical Arrays.2 ExercisesDo not forget to add sufficient documentation and proper indentation to all programsyou write.(1) Write a program that calculates follow equation with for and while loop, and writea program without loop.63263022212+++==∑= i i K% for loopk1=0;for ii=1:64k1=k1+2^(ii-1);end% while loopk2=0;n=0;while n>=0&n<64k2=k2+2^n;n=n+1;end% without loopa=0:63;b=2.^a;K3=sum(b);(2) Write a program that accepts a vector of integers as input and counts the numberof integers that are multiples of 3 in that vector. You can assume that the inputcontains only integer values. An example run of your program can be as follows:Enter a vector of integers: [ 1 3 2 8 0 5 6 ]The number of multiples of 3 is 2(3) The root mean square is a way for calculating a mean fora set of numbers. The rmsaverage of a series of numbers is given as:∑==N i i xN rmsaverage 121Write a program that will accept an arbitrary number of input values and calculatethe rmsaverage of the numbers. The program should ask the user for the numberof values to be entered. Test your program with 4 and 10 set of numbers.% The root mean square is a way for calculating a mean for a set of numbers% Initializesum_x2=0;% Get the number of points to input.n=input('Enter number of points:');% Loop to read input valuesfor ii=1:n% Read in next valuex=input('Enter value:');% Calculate square sumssum_x2=sum_x2+x^2;end% Now calculate root mean squareroot_ms=sqrt(sum_x2/n);% Tell userfprintf('The number of data points is: %d\n',n);fprintf('The root mean square of this data set is: %f\n',root_ms);(4) 3.8 exercises:3.5(5) 4.7Exercises: 4.1 4.23 Quitting MATLABTyping quit on the command window will close the program. Do not forget to sendyour M-file to your TA.Do not forget to delete your files from the hard disk of the PC you used in the lab at the end of the lab session.四川师范大学MATLAB语言实验报告4系级班年月日实验名称:MATLAB/SIMULINK package姓名学号指导教师成绩1Objective●To learn how to use MATLAB/SIMULINK package●To learn how to estimate performance parameters from time-domain data2SIMULINK BasicBasic steps(1)Click on the MATLAB button to start MATLAB.(2)Once MATLAB has started up, type simulink (SMALL LETTERS!) at theMATLAB prompt (>>) followed by a carriage return (press the return key). A SIMULINK window should appear shortly, with the following icons: Sources, Sinks, Discrete, Linear, Connections, Extras.(3)Next, go to the File menu in SIMULINK window and choose New in order tobegin building the block diagram representation of the system of interest.(4)Open one or more of the block libraries and drag the chosen blocks into the active.(5)After the blocks are placed, draw lines to connect their input and output ports bymoving the mouse over a port and drag using the left button. To make a line witha right angle in it, release the button where you want thecorner, then click on theend of the line and drag to create next segment. To add a second line that runs off of an existing line click the right mouse on an existing line and drag it.(6)Save the system by selecting Save from the File menu.(7)Open the blocks by double-clicking and change some of their internal parameters.(8)Adjust some simulation parameters by selecting Parameters from the Simulationmenu. The most common parameter to change is Stop Time that defines the length of time the simulation will run.(9)Run the simulation by selecting Start from the Simulation menu. You can stop asimulation before completing by selecting Stop from the Simulation menu. (10)View the behavior of the system by attaching Scope blocks to the variables ofinterest, or by using To Workspace blocks to send data to the MATLAB workspace where you can plot the results using standard MATLAB commands.3Exercises(1)Your TA has shown you how to observe and print signals from the scope. Try thisout by printing out the input signal, which should be a -1V to 1V square wave with frequency 0.1 Hz. Note the peak-to-peak voltage difference of this signal.Note to write key blocks parameters.(2) Write a Simulink model to calculate the following differential equation,0)1(222=+--x dt dx x dt x d μInitialized 1)0(=x ,0)0(=dt dx 。
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
Matlab 实习报告
一、Matlab的安装
二、Matlab工作界面的简要介绍
MATLAB的工作界面主要由菜单、工具栏、当前工作目录窗口、工作区间管理窗口、快捷菜单、历史命令窗口组成。
如下图所示。
单击界面左下角的‘start’按钮,系统弹出快捷菜单,其中有工具箱、帮助和演示等多个选项,可选择需要爱的菜单进入相关界面。
二- 1Matlab工作界面
1、单击Matlab命令窗口右上角的“Unlock Comman Window”按钮,可以
使命令窗口脱离主窗口而称为一个独立的窗口
图2-2Matlab的命令窗口 1
2、历史命令窗口
该窗口主要用于记录所有执行过的命令,在默认设置下,该窗口会保留自安装后所有使用过的命令的历史记录,并表明使用时间,用户可以通过双击某一历史记录来重新执行该命令。
与命令窗口类是,该窗口也可以成为一个独立的窗口,如下图所示。
选中历史命令后,单击鼠标右键,系统弹出快捷菜单,通过上下文菜单,可以进行剪切和删除等操作,也可为选中的表达式或命令创建一个M文件。
图2-3 Matlab的历史命令窗口 1
3、当前工作目录
在当前工作目录窗口可显示或改变当前目录,如下图显示
4、工作空间管理窗口
工作区间管理窗口显示目前内存中中所有的MATLAB变量的变量名、数据结构、字节数和类型等信息。
三、Matlab两个课堂作业的实现
(一)、1、作业要求:画出两幅信号图(信号可以随意选择)
A,必须在图中标出三个信号值;
B,两幅信号图必须画在一张图中;
C,要求有图例,图表名称,横纵坐标的标注,图片上的文字标注
2、作业代码:
t = (0:pi/100:2*pi)';
y1 = sin(t) * [1, -1];
y2 = sin(t).*cos(6 * t);
t3 = 2 * pi * (0:10)/10;
y3 = sin(t3).*sin(10 * t3);
subplot(2, 2, 1), plot(t,y1, 'r:', t, y2,'-bo', t3, y3, 'm.');
title('y = sin(t)cos(6t)及其包络线, 'fontname', '宋体');
xlabel('t');ylabel('y1,y2,y3');
text(pi/2, sin(pi/2).*cos(6*pi/2), '\leftarrowy2 = -1','FontSize',8);
text(pi/4, sin(pi/4).*cos(6*pi/4), '\rightarrowy2 = 0','FontSize',8 );
text(pi/3, sin(pi/3).*cos(6*pi/3), '\rightarrowy2 = 1','FontSize',8 );
legend('\fontsize{8}包络y3', '\fontsize{8}y1', '\fontsize{8}图像y2');
a = -2* pi:pi/100:2*pi;
y4 = sin(2 * a).*sin(2 * a) -1;
subplot(2, 2, 2), plot(a, y4, 'm-.');
title('y = sin(2a)^2 – 1的曲线');
xlabel('a');ylabel('y4');
text(pi/4, sin(pi/4).*sin(pi/4) - 1, '\leftarrowy4 = -1/2', 'FontSize', 8);
text(pi/3, sin(pi/3).*sin(pi/3) - 1, '\leftarrowy4 = -1/4', 'FontSize', 8);
text(pi/2, sin(pi/2).*sin(pi/2) - 1, '\rightarrowy4 = 0', 'FontSize', 8);
legend('\fontsize{8}为函数曲线');
4、程序运行图片
(二)、
1、某商场对顾客所购买的商品实行打折销售,标准如下:
price<200 没有折扣
200<=price<500 3%折扣
500<=price<1000 5%折扣
1000<=price<2500 8%折扣
2500<=price<5000 10%折扣
5000<=price 14%折扣
输入所售商品的价格,求其实际销售价格。
2、程序源代码:
%输入价格,判断打折程度
prices = input('请输入您所购物的价格');
if prices >= 5000
disp(prices * (1-0.14));
elseif prices >= 2500
disp(prices * (1 - 0.1));
elseif prices >= 1000
disp(prices * (1 - 0.08))
elseif prices >= 500
disp(prices * (1 - 0.05));
elseif prices >= 200
disp(prices * (1 - 0.03));
else
disp(prices);
end
3、程序运行结果:
四、Matlab实现模拟调制信号与解调的仿真(通信原理)
五、Matlab实现线性调制信号以及脉冲压缩性能的仿真(科技文献Chirp信
号类)
六、Matlab实现用窗函数设计数字滤波器(数字信号处理)
七、Matlab实现二进制数字调制与解调信号的仿真(通信原理)
八、Matlab解微分方程(高等数学)
九、Matlab实习心得。