|
MATLAB programming
|
|
EXAMINE FUNCTION SEARCH ON MATLAB |
|
|
|
|
Written by Administrator
|
|
Tuesday, 31 March 2009 09:14 |
|
MATLAB uses something called the search path to locate and execute functions. The search path is simply an ordered list of directories, and any function you want to run must exist in one of the search-path directories. Even though it does not show up in the ordered list, the present working directory is also included in the search. |
|
Read more...
|
|
|
Written by Administrator
|
|
Tuesday, 31 March 2009 09:11 |
|
It is too early in our study of the MATLAB implementation to do anything fancy. In this chapter, we will define a set of member functions capable of implementing the interface; however, keep in mind that as we learn new techniques we will drop support for some of them. |
|
Read more...
|
|
cShape Private Member Variables |
|
|
|
|
Written by Administrator
|
|
Tuesday, 31 March 2009 09:08 |
|
The high-level requirements from §3.2.1.1 are repeated below. •Get and set the size of the shape’s bounding box. •Get and set a scale factor value. •Reset the shape’s size back to its original value. •Get and set the shape’s border color. |
|
Read more...
|
|
Written by Administrator
|
|
Saturday, 21 March 2009 09:33 |
Let’s try to tie the idea of encapsulation back to the cShape example. We didn’t define shape-related member variables in Chapter 2 because we didn’t need any. Now that we need variables, we need to sort out the requirements. Rather than defining all requirements at once, let’s follow an incremental approach by introducing new requirements only when necessary. For many software projects, this approach mirrors reality. For the purposes of this chapter, the set of requirements is small. We only need enough requirements to continue the encapsulation discussion and demonstrate the general implementation for member functions.
|
|
Read more...
|
|
A SHORT SIDE TRIP TO EXAMINE ENCAPSULATION |
|
|
|
|
Written by Administrator
|
|
Saturday, 21 March 2009 09:30 |
Up to this point, we have been dancing around the concept of encapsulation. To understand fully the connection between member functions and member variables, we need to examine encapsulation in more detail. In particular, we need to discuss MATLAB-specific details or the code in the examples will be difficult to follow. The two topics, encapsulation and members, are very closely related, making it hard to explain one before the other. The implementation details in the example should tie up any loose ends in the encapsulation discussion.
|
|
Read more...
|
|
|
|
|
<< Start < Prev 1 2 3 4 5 6 Next > End >>
|
|
Page 1 of 6 |