Matlab面向对象基础教程

所需积分/C币:10 2017-07-27 10:58:50 9.95MB PDF
22
收藏 收藏
举报

该教程详细讲述了Matlab的编程基础和面向对象oop编程
C911X_C000 IIn Page ii Wednesday, April 11, 2007 10: 52 AM We m ae i wordly A lL. o 103. M A Guide to atlaB③ object-Oriented Programming Andy H. Register Georgia Tech Research Institute Atlanta, Georgia, U.S.A Chapman hall CRO Taylor Francis Group Boca Raton London New york SciTeCH Chapman hall/CRC is an imprint of the PUBLISHING, INC. Taylor Francis Group, an informa business C911X_C000 fIn Page iv Wednesday, April 11, 2007 10: 52 AM MATLAB is a trademark of The Mathworks, Inc. and is used with permission. The Math Works does not warrant the accuracy of the text or exercises in this book. This books use or discussion of MATLAB software or related products does not constitute endorsement or sponsorship by The Math Works of a particular pedagogical approach or particular Ise of the matlab software Chapman hall/cro Taylor Francis Group 6000 Broken Sound Parkway NW, Suite 300 Boca raton, FL 33487-2742 2007 by SciTech Publishing Inc Chapman Hall/crC is an imprint of Taylor Francis Group, an Informa business No claim to original u.s. government works Printed in the United States of America on acid-free paper 10987654321 International Standard Book Number-13: 978-1-58488-911-3( Softcover This book contains information obtained from authentic and highly regarded sources. Reprinted material is quoted ith permission, and sources are indicated. a wide variety of references are listed. Reasonable efforts have been made to publish reliable data and information, but the author and the publisher cannot assume responsibility for the validity of all materials or for the consequences of their use No part of this book may be reprinted, reproduced, transmitted, or utilized in any form by any electronic, mechanical,or ther means, now known or hereafter invented, including photocopying, microfilming, and recording, or in any informa tion storage or retrieval system, without written permission from the publishers Forpermissiontophotocopyorusematerialelectronicallyfromthisworkpleaseaccesswww.copyright.com(http:// www.copyright.com/)orcontacttheCopyrightClearanceCenter,Inc.(ccc)222RosewoodDrive,Danvers,Mao1923, 978-750-8400. CCC is a not-for-profit organization that provides licenses and registration for a variety of users. For orga nizations that have bccn granted a photocopy license by the CCC, a scparatc system of payment has bcen arranged Trademark Notice: Product or corporate names may be trademarks or registered trademarks, and are used only for identification and explanation without intent to infringe Library of Congress Cataloging-in-Publication D Register, Andy h A guide to maTL AB object-oriented programming/ Andy h. Register p cm. Includes index ISBN-13:978-1-58488-911-3(all. pape. ISBN-10: 1-58488-911-X (alk. papcr 1. MATLAB. 2. Object-oriented programming( Computer science)3. Numerical analysis-Data processing. I. Title QA7664R4542007 005117-dc22 2006100724 Visit the Taylor Francis Web site at http://www.taylorandfrancis.com and the Crc Press Web site at http://www.crcpress.com C911X_C000 fIm Page v Wednesday, April 11, 2007 10: 52 AM Dedication For micke C911X_C000 fin Page vi Wednesday, April 11, 2007 10: 52 AM C911X_C000 fIn Page vi Wednesday, April 11, 2007 10:52 AM Table of contents Figure XV Code listings…… XVIl Tables.……… About the author Chapter 1 Introduction 1.1 Examples… 1.2 Object-Oriented Software Development 1. 2. 1 At the Top of Your Game 1.2,2 Personal Development……… 1. 2. 3 Wicked Problems 1.2. 4 Extreme programming 1. 2.5 MATLAB, Object-Oriented Programming, and You 1.3 Attributes, Behavior, Objects, and classes 1.3.1 From matlab Heavyweight to Object- Oriented Thinker,,∵……… 1.3.2 Object- Oriented design…… 10 1.3.3 Why Use objects......….….….….….….….…… 1.3.4 A Quality Focus .12 1.3.4. Reliability 1.3, 4.2 Reusability 13 1.3.4.3 Extendibility....…… .14 14 Summary…… 15 PART1 Group of Eight…… ●·●●·鲁。●●鲁。●●·D。●··。●··●●●·●。。●●D。●·音。●·音。● 17 Chapter2 Meeting matlaB’ S Requirements… 19 2. 1 Variables, Types, Classes, and Objects 19 2.2 What is a matlab class? 21 2.2.1 Example: Class requirements 21 2.2.1.1 Class directory 2.2.1.2 Constructor 22 2.2.1. 3 The Test drive 2.3S 垂曲 26 2. 4 Independent Investigation C911X-CO00 fIn Page vii Wednesday, April 11, 2007 10:52 AM A Guide to mAtLAB Object-Oriented Programming Chapter 3 Member Variables and Member Functions. 29 3.1 Members 29 3.2 Accessors and mutators 3.2.1 A Short Side trip to Examine Encapsulation 131 3.2.1.1 sHape variables…............,..32 3.2.2 sHape Members 3.22.1 sHape Private Member variables……………………3 3.2.2.2 cShape Public Interface.................34 3.2.3 A Short Side Trip to Examine Function Search Priority 36 3.2.4 Example Code: Accessors and Mutators, Round I 3.2.4.1 Constructor 3.2.4.2 Accessors ................................................................................................37 3.2.4.3 Mutators… 324.4 Combining an△ ccessor and a mutator…… 3.2. 4.5 Member Functions 3.2.5 Standardization ..40 3.3 The Test Drive 3. 4 Summary.... 42 3.5 Independent Investigations Chapter4 Changing the rules… in Appearance Onl!y…… 4.1 A Special Accessor and a Special mutator………. 45 4.1.1 A Short Side Trip to Examine Overloading 45 4.1.1.1 Superiorto and Inferiorto.……… .47 4.1.1.2 The built-In function 4.1.2 Overloading the Operators subsref and subsasgn 48 4.1.2.1Dot- Reference indexing……… 4.1. 2.2 subsref Dot-Reference, Attempt I 51 4. 1.2.3 A New Interface Definition 4. 1.2.4 subsref Dot-Reference, Attempt 2: Separating Public and PrivateⅤ ariable 4.1. 2.5 subsref Dot-Reference, Attempt 3: Beyond One-to-One Public-to-Private 4.1.2.6 subsref Dot-Reference, Attempt 4: Multiple Indexing Levels .......55 4. 1.2.7 Subsref Dot-Reference, Attempt 5: Operator Conversion Anomaly...57 4.1.2.8 subsasgn Dot-Reference 4. 1.2.9 Array-Reference Indexing .62 4. 1. 2.10 subsref Array-Reference... 4.1. 2.11 subsasgn Array 4.1.2.12 Cell-Reference Indexing….…..……. 4.1.3 Initial Solution for subsref m 4.1.4 Initial Solution for subsasgn m ............68 4.1.5 Operator Overload, mtime 69 4.2 The Test drive 4.2.1 subsasgn test drive 4.2.2 subsref Test drive 72 4.3 Summary........ …………74 4.4 Independent Investiga 75 C911X_C000 fIn Page ix Wednesday, April 11, 2007 10: 52 AM Tabl Chapter 5 displaying an object's State …… 5.1 Displa 5.1. I What Should Be Displayed? 5.1.2 Standard Structure displa 5.1.3 Public Member Variable Display 5. 1.3.1 Implementing display. m, Attempt. 1 5.1.3.2 Implementing display.m, Attempt2………. 81 5.2 Developer View …………83 5.2. 1 Implementing display. m with Developer View Options 8 5.3 The Test drive 5.4 Summar 5.5 Independent Investigations Chapter 6 fieldnames.m ··· 91 fieldnames… .91 6.2 Code Development 91 6.3 The Test Drive …93 64S 93 6.5 Independent Investigations 94 Chapter 7 struct. m ““··4······ 95 7.1 struct 95 7.2 Code development 7. 3 The Test drive 97 74S 98 7.5 Independent Investigations pter 8 g 8. 1 Arguments for the Member Functions get and set 8.1.1 For Develop 99 8. 1. 2 For clients 8.1. 3 Tab Completio 101 8.2 Code development 101 8.2.1 Implementing get and set 102 8.2.2 Initial get 8 2.3 Initial set. m 107 8. 3 The Test drive 8. 4 Sumn 8.5 Independent Investigations Chapter g Simplify Using get, set, fieldnames, and struct .1l3 9. 1 Improving subsref m 114 9.2 Improving subsasgn.m....... 115 9.3 Improving display.n…… 116 9. 4 Test Drive 118 9.5 Summary…… 9.6 Independent Investigations l22

...展开详情
试读 127P Matlab面向对象基础教程
立即下载
限时抽奖 低至0.43元/次
身份认证后 购VIP低至7折
一个资源只可评论一次,评论内容不能少于5个字
您会向同学/朋友/同事推荐我们的CSDN下载吗?
谢谢参与!您的真实评价是我们改进的动力~
  • 签到新秀

  • 分享王者

关注 私信
上传资源赚钱or赚积分
最新推荐
Matlab面向对象基础教程 10积分/C币 立即下载
1/127
Matlab面向对象基础教程第1页
Matlab面向对象基础教程第2页
Matlab面向对象基础教程第3页
Matlab面向对象基础教程第4页
Matlab面向对象基础教程第5页
Matlab面向对象基础教程第6页
Matlab面向对象基础教程第7页
Matlab面向对象基础教程第8页
Matlab面向对象基础教程第9页
Matlab面向对象基础教程第10页
Matlab面向对象基础教程第11页
Matlab面向对象基础教程第12页
Matlab面向对象基础教程第13页
Matlab面向对象基础教程第14页
Matlab面向对象基础教程第15页
Matlab面向对象基础教程第16页
Matlab面向对象基础教程第17页
Matlab面向对象基础教程第18页
Matlab面向对象基础教程第19页
Matlab面向对象基础教程第20页

试读结束, 可继续阅读

10积分/C币 立即下载