[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: patch: Invalid call to __patch__
From: |
David Bateman |
Subject: |
Re: patch: Invalid call to __patch__ |
Date: |
Mon, 24 Sep 2007 11:47:33 +0200 |
User-agent: |
Thunderbird 1.5.0.7 (X11/20060921) |
Matthias Brennwald wrote:
> Dear all
>
> I just built and installed Octave 2.9.14 on my Ubuntu box and tried the
> patch function that comes with it. However, this did not work (see
> below). What am I doing wrong?
>
> Matthias
>
>
> --------------------
> octave:6> version
> ans = 2.9.14
> octave:7> patch(rand(1,4),rand(1,4),"r")
>
> Invalid call to __patch__. Correct usage is:
>
>
The __patch__.m doesn't yet support colors passed as strings like that.
Try instead
patch(rand(1,4),rand(1,4),[1,0,0])
and it will work.. The patch attached will add the missing support..
D.
--
David Bateman address@hidden
Motorola Labs - Paris +33 1 69 35 48 04 (Ph)
Parc Les Algorithmes, Commune de St Aubin +33 6 72 01 06 33 (Mob)
91193 Gif-Sur-Yvette FRANCE +33 1 69 35 77 01 (Fax)
The information contained in this communication has been classified as:
[x] General Business Information
[ ] Motorola Internal Use Only
[ ] Motorola Confidential Proprietary
*** ./scripts/plot/__patch__.m.orig6 2007-09-15 10:18:47.000000000 +0200
--- ./scripts/plot/__patch__.m 2007-09-24 11:45:10.199588053 +0200
***************
*** 51,63 ****
endif
endif
! if (have_x && nargin > iarg && isnumeric (varargin{iarg}))
! c = varargin{iarg};
! have_c = true;
! iarg++;
! if (ndims (c) == 3 && size (c, 2) == 1)
! c = permute (c, [1, 3, 2]);
endif
endif
--- 51,100 ----
endif
endif
! if (have_x && nargin > iarg)
! if (isnumeric (varargin{iarg}))
! c = varargin{iarg};
! have_c = true;
! iarg++;
! if (ndims (c) == 3 && size (c, 2) == 1)
! c = permute (c, [1, 3, 2]);
! endif
! elseif ischar (varargin{iarg})
! tmp = tolower (varargin{iarg});
! if (strcmp (tmp, "r") || strcmp (tmp, "red"))
! c = [1, 0, 0];
! have_c = true;
! iarg++;
! elseif (strcmp (tmp, "g") || strcmp (tmp, "green"))
! c = [0, 1, 0];
! have_c = true;
! iarg++;
! elseif (strcmp (tmp, "b") || strcmp (tmp, "blue"))
! c = [0, 0, 1];
! have_c = true;
! iarg++;
! elseif (strcmp (tmp, "c") || strcmp (tmp, "cyan"))
! c = [0, 1, 1];
! have_c = true;
! iarg++;
! elseif (strcmp (tmp, "m") || strcmp (tmp, "magenta"))
! c = [1, 0, 1];
! have_c = true;
! iarg++;
! elseif (strcmp (tmp, "y") || strcmp (tmp, "yellow"))
! c = [1, 1, 0];
! have_c = true;
! iarg++;
! elseif (strcmp (tmp, "w") || strcmp (tmp, "white"))
! c = [1, 1, 1];
! have_c = true;
! iarg++;
! elseif (strcmp (tmp, "k") || strcmp (tmp, "black"))
! c = [0, 0, 0];
! have_c = true;
! iarg++;
! endif
endif
endif
- patch: Invalid call to __patch__, Matthias Brennwald, 2007/09/24
- patch: Invalid call to __patch__, Matthias Brennwald, 2007/09/24
- Re: patch: Invalid call to __patch__,
David Bateman <=
- Re: patch: Invalid call to __patch__, kahacjde, 2007/09/24
- Re: [unclassified] Re: patch: Invalid call to __patch__, Kai Habel, 2007/09/24
- Re: [unclassified] Re: patch: Invalid call to __patch__, David Bateman, 2007/09/24
- Re: [unclassified] Re: patch: Invalid call to __patch__, kahacjde, 2007/09/25
- Re: [unclassified] Re: patch: Invalid call to __patch__, David Bateman, 2007/09/25
- Re: [unclassified] Re: patch: Invalid call to __patch__, David Bateman, 2007/09/25
- Re: [unclassified] Re: patch: Invalid call to __patch__, Kai Habel, 2007/09/25
patch: Invalid call to __patch__, Matthias Brennwald, 2007/09/24