
Using MATLAB Profiler É 243
y =
-3 -4 -7 4 5
The expected y result was [-3 -4 -7], but since y already existed in the workspace, only the
first few elements of y were copied with x.
4. A common source of error is trying to get the zeroth element of a matrix (like one may
access in C or C++ language) or elements outside the range. Ensure that you have consid-
ered the size of the matrix before indexing into it.
5. A slight overlook in examining the boundaries in conditional statements can lead to prob-
lems such as infinite looping or no output. Indices in a “for” loop must be checked for
boundary conditions as well.
6. Using similar variable ...