In the line for col=1:1:n
, col
can get up to the value n
, even when row
is still 1
. Therefore when you call factorial(row-col)
, row
can be 1
and col
can be 2
. This is where it can be negative.
More Related Contents:
- “Undefined function ‘function_name’ for input arguments of type ‘double’.”
- For loop to split matrix to equal sized sub-matrices
- Octave / Matlab: Extend a vector making it repeat itself?
- How can I plot a function with two variables in Octave or Matlab?
- Getting FFT peaks from data
- Create a zero-filled 2D array with ones at positions indexed by a vector
- Sweep / chirp signal ends at incorrect frequency
- How can I sort a 2-D array in MATLAB with respect to one column?
- How do I detect if I’m running MATLAB or Octave?
- Octave/Matlab: Adding new elements to a vector
- f(x) = 1 for -0.5
- find unknown value in matrix using MATLAB [closed]
- Saving time and memory using parfor?
- How to training/testing my own dataset in caffe?
- Why is Matlab’s inv slow and inaccurate?
- [caffe]: check fails: Check failed: hdf_blobs_[i]->shape(0) == num (200 vs. 6000)
- Return Unique Element with a Tolerance
- support vector machines in matlab
- Shading an area boundered by a curve
- How to find all permutations (with repetition) in MATLAB?
- Change color of 2D plot line depending on 3rd value
- How to plot a circle in Matlab?
- Producing subplots and then combine them into a figure later in MATLAB
- How do you use the LaTeX blackboard font in MATLAB?
- MATLAB find and apply function to values of repeated indices
- Control colorbar scale in MATLAB
- Indexing of unknown dimensional matrix
- Implementing anonymous functions in Fortran
- Customize dbstop in MATLAB
- How to apply a low-pass or high-pass filter to an array in Matlab?