[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: divergence function
From: |
Søren Hauberg |
Subject: |
Re: divergence function |
Date: |
Tue, 29 Sep 2009 16:20:20 +0200 |
tir, 29 09 2009 kl. 16:11 +0200, skrev Javier Enciso:
> I already made the corrections and I hope the code is ready to be
> shipped. If you (or someone else) have any other concern, please let me
> know.
A few minor things:
* In your cases you have, e.g.
case 2
[u, v] = deal (varargin{1:2});
since you know that 'varargin' has two elements, you can just write
case 2
[u, v] = deal (varargin{:});
* When calling 'error', the message should start with the name of the
function raising the error, i.e.
error ("divergence: size of matrices must be equal");
* Instead of
function [] = check_dim (varargin)
you should probably just write
function check_dim (varargin)
Otherwise I think it looks good :-)
Soren