TAILIEUCHUNG - Ebook MATLAB an introduction with applications: Part 2

(BQ) Part 2 book "MATLAB an introduction with applications" has contents: User-Defined functions and function files; polynomials, curve fitting, and interpolation; applications in numerical analysis; three dimensional plots; symbolic math. | Chapter 7 Programming in MATLAB A computer program is a sequence of computer commands. In a simple program the commands are executed one after the other in the order that they are typed. In this book for example all the programs that have been presented so far in script or function files are simple programs. Many situations however requhe more sophisticated programs in which commands are not necessarily executed in the order that they are typed or that different commands or groups of commands are executed when the program runs with different input variables. For example a computer program that calculates the cost of mailing a package for the post office uses different mathematical expressions to calculate the cost depending on the weight and size of the package the content books are less expensive to mail and the type of service airmail ground etc. . In other situations there might be a need to repeat a sequence of commands several times within a program. For example programs that solve equations numerically repeat a sequence of calculations until the error in the answer is smaller than some measure. MATLAB provides several tools that can be used to control the flow of a program. Conditional statements Section and the switch structure Section make it possible to skip commands or to execute specific groups of commands in different situations. For loops and while loops Section make it possible to repeat a sequence of commands several times. It is obvious that changing the flow of a program requires some kind of decision-making process within the program. The computer must decide whether to execute the next command or to skip one or more commands and continue at a different line in the program. The program makes these decisions by comparing values of variables. This is done by using relational and logical operators which are explained in Section . It should also be noted that function files Chapter 6 can be used in programming. A function file is a .

TỪ KHÓA LIÊN QUAN
TAILIEUCHUNG - Chia sẻ tài liệu không giới hạn
Địa chỉ : 444 Hoang Hoa Tham, Hanoi, Viet Nam
Website : tailieuchung.com
Email : tailieuchung20@gmail.com
Tailieuchung.com là thư viện tài liệu trực tuyến, nơi chia sẽ trao đổi hàng triệu tài liệu như luận văn đồ án, sách, giáo trình, đề thi.
Chúng tôi không chịu trách nhiệm liên quan đến các vấn đề bản quyền nội dung tài liệu được thành viên tự nguyện đăng tải lên, nếu phát hiện thấy tài liệu xấu hoặc tài liệu có bản quyền xin hãy email cho chúng tôi.
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.