Elementary Functions and Some of Their Uses Mục đích của chương này là để minh họa và xây dựng một số thực hành trong việc sử dụng các chức năng cơ bản trong các vấn đề kỹ thuật được lựa chọn điện cơ bản. Chúng tôi cũng xây dựng các chức năng tín hiệu một số đơn giản mà bạn sẽ gặp phải trong phân tích kỹ thuật và các vấn đề thiết kế trong tương lai. Nó là điều cần thiết để xem xét bổ sung vào cuối của cuốn sách này trong trường hợp bạn muốn để. | 3 Elementary Functions and Some of Their Uses The purpose of this chapter is to illustrate and build some practice in the use of elementary functions in selected basic electrical engineering problems. We also construct some simple signal functions that you will encounter in future engineering analysis and design problems. NOTE It is essential to review the Supplement at the end of this book in case you want to refresh your memory on the particular elementary functions covered in the different chapter sections. Function Files To analyze and graph functions using MATLAB we have to be able to construct functions that can be called from within the MATLAB environment. In MATLAB functions are made and stored infunction M-files. We already used one kind of M-file script file to store various executable commands in a routine. Function M-files differ from script M-files in that they have designated input s and output s . The following is an example of a function. Type and save the following function in a file named function y aline x x y is a point on a line that has slope 3 and y-intercept -5 y 3 x-5 NOTES 1. The word function at the beginning of the file makes it a function rather than a script file. 2. The function name aline that appears in the first line of this file should match the name that we assign to this file name when saving it . . Having created a function M-file in your user volume move to the command window to learn how to call this function. There are two basic ways to use a function file 2001 by CRC Press LLC 1. To evaluate the function for a specified value x x1 enter aline xl to get the function value at this point that is y1 3x1 - 5. 2. To plot y1 3x1 - 5 for a range of x values say -2 7 enter fplot aline -2 7 NOTE The above example illustrates a function with one input and one output. The construction of a function M-file of a function having n inputs and m outputs starts with function y1 y2 .