各种matlan函数(各种matlan函数).docVIP

  • 26
  • 0
  • 约 17页
  • 2017-10-06 发布于河南
  • 举报
各种matlan函数(各种matlan函数)

各种matlan函数(各种matlan函数) 9.3.2 MATLAB function In the current MATLAB5.0 and more versions, the call format of the MATLAB function is different from that of other programming languages, and the typical invocation format is [return variable list = func_name (list of input variables) The variable on the left of the equals sign is the return variable, and the variable on the right of the equals sign is the input variable. MATLAB allows multiple variables to be returned at the same time as function calls. A function can be called in a variety of formats, such as the Bode () function, which can be called in the following format [mag, phase] = bode (Num, den, w) The Bode () function is used to derive or plot the Bode diagram of the system, where the system is represented by the transfer function numerator num and the denominator den, and the function can be called in the following format [mag, phase] = bode (A, B, C, D, w) Among them (A, B, C, D) is the equation of state model of the system. Even though the two call formats are completely different, the MATLAB function automatically identifies the format in which the function is called, thus drawing the correct conclusion. In the current version of the control system toolbox, linear models, object variables, and G are also allowed to describe the system, for example [mag, phase] = bode (G, w) The MATLAB function can be different in the format of the returned variable. For example, if there is no return variable in the above statement, the Bode diagram of the system is automatically drawn, otherwise the result data will be returned. 9.3.3 draw response curve MATLAB has a rich collection of graphical output. The command plot can produce a linear X-Y graph (using the command loglog, semilogx, semilogy, or polar instead of plot, which produces a logarithmic and polar diagram). All of these commands are applied in the same way. They only affect how the axes are divided and how the data is displayed. 1. X-Y diagram If x and y are

文档评论(0)

1亿VIP精品文档

相关文档