Hi Samuel,<br>Thanks for the pointers. It still fails with lots of errors even with changing the sections you noted). I have copied the errors here, it is like a few errors can have a compound effect on the rest:<br><br>-->exec('C:\Users\Lester\Documents\3DInver\convert\tukeywin.sce', -1)<br>
function w = tukeywin (L, r = 1/2)<br> !--error 37 <br>Incorrect function at line 31.<br><br>at line 31 of exec file called by : <br>exec('C:\Users\Lester\Documents\3DInver\convert\tukeywin.sce', -1)<br>
<br>-->function w = tukeywin (L, r = 1/2)<br> !--error 37 <br>Incorrect function.<br> <br>--> //nargin=>argn(2)<br> --> // if (nargin < 1 || nargin > 2)<br> --> if (argn(2) < 1 || argn(2) > 2) <br>
!--error 2 <br>Invalid factor.<br> <br>--> print_usage;<br> !--error 4 <br>Undefined variable: print_usage<br> <br>--> elseif (nargin == 2)<br> !--error 34 <br>Incorrect control instruction syntax.<br>
<br>--> // check that 0 < r < 1<br> --> if r > 1<br> !--error 4 <br>Undefined variable: r<br> <br>--> r = 1;<br>--> elseif r < 0<br> !--error 34 <br>Incorrect control instruction syntax.<br>
<br>--> r = 0;<br> --> end<br> !--error 34 <br>Incorrect control instruction syntax.<br> <br>--> end<br> !--error 34 <br>Incorrect control instruction syntax.<br> <br>--> // generate window<br>
--> select r<br>--> case 0,<br>--> // full box<br>--> w = ones (L, 1);<br> !--error 4 <br>Undefined variable: L<br><br>--> case 1,<br> !--error 34 <br>Incorrect control instruction syntax.<br>
<br>--> // Hanning window<br> --> // = hanning (L);<br> --> window('hanning',L)<br> !--error 4 <br>Undefined variable: L<br> <br>--> else<br> !--error 34 <br>
Incorrect control instruction syntax.<br> <br>--> // cosine-tapered window<br> --> t = linspace(0,1,L)(1:$:(1:$/2)';<br> !--error 4 <br>Undefined variable: L<br> <br>--> w = (1 + cos(%pi*(2*t/r-1)))/2;<br>
!--error 4 <br>Undefined variable: t<br> <br>--> w(floor(r*(L-1)/2)+2:end) = 1;<br> !--error 4 <br>Undefined variable: L<br> <br>--> w = [w; ones(modulo(L,2)); flipdim(w,1)];<br>
!--error 4 <br>Undefined variable: w<br> <br>--> end<br> !--error 34 <br>Incorrect control instruction syntax.<br> <br>-->endfunction<br> !--error 16 <br>Incorrect command!<br><br>Thanks for any help<br>
<br>Lester<br><br><pre style="font-family:Monospaced;font-style:normal;font-size:14.0"><span style="color:rgb(1,168,1);font-style:italic">// Copyright (C) 2007 Laurent Mazet </span><span style="color:rgb(1,168,1);font-style:italic"><</span><span style="color:rgb(1,168,1);font-style:italic"><a href="mailto:mazet@crm.mot.com">mazet@crm.mot.com</a></span><span style="color:rgb(1,168,1);font-style:italic">></span>
<span style="color:rgb(1,168,1);font-style:italic">// </span>
<span style="color:rgb(1,168,1);font-style:italic">// This program is free software; you can redistribute it and/or modify it under</span>
<span style="color:rgb(1,168,1);font-style:italic">// the terms of the GNU General Public License as published by the Free Software</span>
<span style="color:rgb(1,168,1);font-style:italic">// Foundation; either version 3 of the License, or (at your option) any later</span>
<span style="color:rgb(1,168,1);font-style:italic">// version.</span>
<span style="color:rgb(1,168,1);font-style:italic">// </span>
<span style="color:rgb(1,168,1);font-style:italic">// This program is distributed in the hope that it will be useful, but WITHOUT</span>
<span style="color:rgb(1,168,1);font-style:italic">// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or</span>
<span style="color:rgb(1,168,1);font-style:italic">// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more</span>
<span style="color:rgb(1,168,1);font-style:italic">// details.</span>
<span style="color:rgb(1,168,1);font-style:italic">// </span>
<span style="color:rgb(1,168,1);font-style:italic">// You should have received a copy of the GNU General Public License along with</span>
<span style="color:rgb(1,168,1);font-style:italic">// this program; if not, see </span><span style="color:rgb(1,168,1);font-style:italic"><</span><span style="color:rgb(1,168,1);font-style:italic"><a href="http://www.gnu.org/licenses/">http://www.gnu.org/licenses/</a></span><span style="color:rgb(1,168,1);font-style:italic">></span><span style="color:rgb(1,168,1);font-style:italic">.</span>
<span style="color:rgb(1,168,1);font-style:italic">// -*- texinfo -*-</span>
<span style="color:rgb(1,168,1);font-style:italic">// @deftypefn {Function File} {@var{w} =} tukeywin (@var{L}, @var{r})</span>
<span style="color:rgb(1,168,1);font-style:italic">// Return the filter coefficients of a Tukey window (also known as the</span>
<span style="color:rgb(1,168,1);font-style:italic">// cosine-tapered window) of length @var{L}. @var{r} defines the ratio</span>
<span style="color:rgb(1,168,1);font-style:italic">// between the constant section and and the cosine section. It has to be</span>
<span style="color:rgb(1,168,1);font-style:italic">// between 0 and 1. The function returns a Hanning window for @var{r}</span>
<span style="color:rgb(1,168,1);font-style:italic">// egals 0 and a full box for @var{r} egals 1. By default @var{r} is set</span>
<span style="color:rgb(1,168,1);font-style:italic">// to 1/2.</span>
<span style="color:rgb(1,168,1);font-style:italic">// </span>
<span style="color:rgb(1,168,1);font-style:italic">// For a definition of the Tukey window, see e.g. Fredric J. Harris,</span>
<span style="color:rgb(1,168,1);font-style:italic">// </span><span style="color:rgb(1,168,1);font-style:italic">"</span><span style="color:rgb(1,168,1);font-style:italic">On the Use of Windows for Harmonic Analysis with the Discrete Fourier</span>
<span style="color:rgb(1,168,1);font-style:italic">// Transform, Proceedings of the IEEE</span><span style="color:rgb(1,168,1);font-style:italic">"</span><span style="color:rgb(1,168,1);font-style:italic">, Vol. 66, No. 1, January 1978,</span>
<span style="color:rgb(1,168,1);font-style:italic">// Page 67, Equation 38.</span>
<span style="color:rgb(1,168,1);font-style:italic">// @end deftypefn</span>
<span style="color:rgb(176,24,19)">function</span> <span style="color:rgb(131,67,16);font-weight:bold">w</span><span style="color:rgb(92,92,92)">=</span><span style="color:rgb(0,0,0);text-decoration:underline">tukeywin</span><span style="color:rgb(74,85,219)">(</span><span style="color:rgb(131,67,16);font-weight:bold">L</span><span style="color:rgb(0,0,0)">, </span><span style="color:rgb(131,67,16);font-weight:bold">r</span><span style="color:rgb(92,92,92)">=</span> <span style="color:rgb(188,143,143)">1</span><span style="color:rgb(92,92,92)">/</span><span style="color:rgb(188,143,143)">2</span><span style="color:rgb(74,85,219)">)</span>
<span style="color:rgb(1,168,1);font-style:italic">//nargin=</span><span style="color:rgb(1,168,1);font-style:italic">></span><span style="color:rgb(1,168,1);font-style:italic">argn(2)</span>
<span style="color:rgb(1,168,1);font-style:italic">// if (nargin </span><span style="color:rgb(1,168,1);font-style:italic"><</span><span style="color:rgb(1,168,1);font-style:italic"> 1 || nargin </span><span style="color:rgb(1,168,1);font-style:italic">></span><span style="color:rgb(1,168,1);font-style:italic"> 2)</span>
<span style="color:rgb(160,32,240)">if</span> <span style="color:rgb(74,85,219)">(</span><span style="color:rgb(50,185,185)">argn</span><span style="color:rgb(74,85,219)">(</span><span style="color:rgb(188,143,143)">2</span><span style="color:rgb(74,85,219)">)</span> <span style="color:rgb(92,92,92)"><</span> <span style="color:rgb(188,143,143)">1</span> <span style="color:rgb(92,92,92)">|</span><span style="color:rgb(92,92,92)">|</span> <span style="color:rgb(50,185,185)">argn</span><span style="color:rgb(74,85,219)">(</span><span style="color:rgb(188,143,143)">2</span><span style="color:rgb(74,85,219)">)</span> <span style="color:rgb(92,92,92)">></span> <span style="color:rgb(188,143,143)">2</span><span style="color:rgb(74,85,219)">)</span>
<span style="color:rgb(0,0,0)">print_usage</span><span style="color:rgb(0,0,0)">;</span>
<span style="color:rgb(160,32,240)">elseif</span> <span style="color:rgb(74,85,219)">(</span><span style="color:rgb(0,0,0)">nargin</span> <span style="color:rgb(92,92,92)">==</span> <span style="color:rgb(188,143,143)">2</span><span style="color:rgb(74,85,219)">)</span>
<span style="color:rgb(1,168,1);font-style:italic">// check that 0 </span><span style="color:rgb(1,168,1);font-style:italic"><</span><span style="color:rgb(1,168,1);font-style:italic"> r </span><span style="color:rgb(1,168,1);font-style:italic"><</span><span style="color:rgb(1,168,1);font-style:italic"> 1</span>
<span style="color:rgb(160,32,240)">if</span> <span style="color:rgb(131,67,16);font-weight:bold">r</span> <span style="color:rgb(92,92,92)">></span> <span style="color:rgb(188,143,143)">1</span>
<span style="color:rgb(131,67,16);font-weight:bold">r</span> <span style="color:rgb(92,92,92)">=</span> <span style="color:rgb(188,143,143)">1</span><span style="color:rgb(0,0,0)">;</span>
<span style="color:rgb(160,32,240)">elseif</span> <span style="color:rgb(131,67,16);font-weight:bold">r</span> <span style="color:rgb(92,92,92)"><</span> <span style="color:rgb(188,143,143)">0</span>
<span style="color:rgb(131,67,16);font-weight:bold">r</span> <span style="color:rgb(92,92,92)">=</span> <span style="color:rgb(188,143,143)">0</span><span style="color:rgb(0,0,0)">;</span>
<span style="color:rgb(160,32,240)">end</span>
<span style="color:rgb(160,32,240)">end</span>
<span style="color:rgb(1,168,1);font-style:italic">// generate window</span>
<span style="color:rgb(160,32,240)">select</span> <span style="color:rgb(131,67,16);font-weight:bold">r</span>
<span style="color:rgb(160,32,240)">case</span> <span style="color:rgb(188,143,143)">0</span><span style="color:rgb(0,0,0)">,</span>
<span style="color:rgb(1,168,1);font-style:italic">// full box</span>
<span style="color:rgb(131,67,16);font-weight:bold">w</span> <span style="color:rgb(92,92,92)">=</span> <span style="color:rgb(50,185,185)">ones</span> <span style="color:rgb(74,85,219)">(</span><span style="color:rgb(131,67,16);font-weight:bold">L</span><span style="color:rgb(0,0,0)">,</span> <span style="color:rgb(188,143,143)">1</span><span style="color:rgb(74,85,219)">)</span><span style="color:rgb(0,0,0)">;</span>
<span style="color:rgb(160,32,240)">case</span> <span style="color:rgb(188,143,143)">1</span><span style="color:rgb(0,0,0)">,</span>
<span style="color:rgb(1,168,1);font-style:italic">// Hanning window</span>
<span style="color:rgb(1,168,1);font-style:italic">// w = hanning (L);</span>
<span style="color:rgb(174,92,176);text-decoration:underline">window</span><span style="color:rgb(74,85,219)">(</span><span style="color:rgb(188,143,143)">'</span><span style="color:rgb(188,143,143)">hanning</span><span style="color:rgb(188,143,143)">'</span><span style="color:rgb(0,0,0)">,</span><span style="color:rgb(131,67,16);font-weight:bold">L</span><span style="color:rgb(74,85,219)">)</span>
<span style="color:rgb(160,32,240)">else</span>
<span style="color:rgb(1,168,1);font-style:italic">// cosine-tapered window</span>
<span style="color:rgb(0,0,0)">t</span> <span style="color:rgb(92,92,92)">=</span> <span style="color:rgb(174,92,176);text-decoration:underline">linspace</span><span style="color:rgb(74,85,219)">(</span><span style="color:rgb(188,143,143)">0</span><span style="color:rgb(0,0,0)">,</span><span style="color:rgb(188,143,143)">1</span><span style="color:rgb(0,0,0)">,</span><span style="color:rgb(131,67,16);font-weight:bold">L</span><span style="color:rgb(74,85,219)">)</span><span style="color:rgb(74,85,219)">(</span><span style="color:rgb(188,143,143)">1</span><span style="color:rgb(255,170,0)">:</span><span style="color:rgb(255,170,0)">$</span><span style="color:rgb(255,170,0)">:</span><span style="color:rgb(74,85,219)">(</span><span style="color:rgb(188,143,143)">1</span><span style="color:rgb(255,170,0)">:</span><span style="color:rgb(255,170,0)">$</span><span style="color:rgb(92,92,92)">/</span><span style="color:rgb(188,143,143)">2</span><span style="color:rgb(74,85,219)">)</span><span style="color:rgb(92,92,92)">'</span><span style="color:rgb(0,0,0)">;</span>
<span style="color:rgb(131,67,16);font-weight:bold">w</span> <span style="color:rgb(92,92,92)">=</span> <span style="color:rgb(74,85,219)">(</span><span style="color:rgb(188,143,143)">1</span> <span style="color:rgb(92,92,92)">+</span> <span style="color:rgb(50,185,185)">cos</span><span style="color:rgb(74,85,219)">(</span><span style="color:rgb(218,112,214)">%pi</span><span style="color:rgb(92,92,92)">*</span><span style="color:rgb(74,85,219)">(</span><span style="color:rgb(188,143,143)">2</span><span style="color:rgb(92,92,92)">*</span><span style="color:rgb(0,0,0)">t</span><span style="color:rgb(92,92,92)">/</span><span style="color:rgb(131,67,16);font-weight:bold">r</span><span style="color:rgb(92,92,92)">-</span><span style="color:rgb(188,143,143)">1</span><span style="color:rgb(74,85,219)">)</span><span style="color:rgb(74,85,219)">)</span><span style="color:rgb(74,85,219)">)</span><span style="color:rgb(92,92,92)">/</span><span style="color:rgb(188,143,143)">2</span><span style="color:rgb(0,0,0)">;</span>
<span style="color:rgb(131,67,16);font-weight:bold">w</span><span style="color:rgb(74,85,219)">(</span><span style="color:rgb(50,185,185)">floor</span><span style="color:rgb(74,85,219)">(</span><span style="color:rgb(131,67,16);font-weight:bold">r</span><span style="color:rgb(92,92,92)">*</span><span style="color:rgb(74,85,219)">(</span><span style="color:rgb(131,67,16);font-weight:bold">L</span><span style="color:rgb(92,92,92)">-</span><span style="color:rgb(188,143,143)">1</span><span style="color:rgb(74,85,219)">)</span><span style="color:rgb(92,92,92)">/</span><span style="color:rgb(188,143,143)">2</span><span style="color:rgb(74,85,219)">)</span><span style="color:rgb(92,92,92)">+</span><span style="color:rgb(188,143,143)">2</span><span style="color:rgb(255,170,0)">:</span><span style="color:rgb(160,32,240)">end</span><span style="color:rgb(74,85,219)">)</span> <span style="color:rgb(92,92,92)">=</span> <span style="color:rgb(188,143,143)">1</span><span style="color:rgb(0,0,0)">;</span>
<span style="color:rgb(131,67,16);font-weight:bold">w</span> <span style="color:rgb(92,92,92)">=</span> <span style="color:rgb(74,85,219)">[</span><span style="color:rgb(131,67,16);font-weight:bold">w</span><span style="color:rgb(0,0,0)">;</span> <span style="color:rgb(50,185,185)">ones</span><span style="color:rgb(74,85,219)">(</span><span style="color:rgb(174,92,176);text-decoration:underline">modulo</span><span style="color:rgb(74,85,219)">(</span><span style="color:rgb(131,67,16);font-weight:bold">L</span><span style="color:rgb(0,0,0)">,</span><span style="color:rgb(188,143,143)">2</span><span style="color:rgb(74,85,219)">)</span><span style="color:rgb(74,85,219)">)</span><span style="color:rgb(0,0,0)">;</span> <span style="color:rgb(174,92,176);text-decoration:underline">flipdim</span><span style="color:rgb(74,85,219)">(</span><span style="color:rgb(131,67,16);font-weight:bold">w</span><span style="color:rgb(0,0,0)">,</span><span style="color:rgb(188,143,143)">1</span><span style="color:rgb(74,85,219)">)</span><span style="color:rgb(74,85,219)">]</span><span style="color:rgb(0,0,0)">;</span>
<span style="color:rgb(160,32,240)">end</span>
<span style="color:rgb(176,24,19)">endfunction</span>
<span style="color:rgb(1,168,1);font-style:italic">// demo</span>
<span style="color:rgb(1,168,1);font-style:italic">// L = 100;</span>
<span style="color:rgb(1,168,1);font-style:italic">// r = 1/3;</span>
<span style="color:rgb(1,168,1);font-style:italic">// w = tukeywin (L, r);</span>
<span style="color:rgb(1,168,1);font-style:italic">// title(sprintf(</span><span style="color:rgb(1,168,1);font-style:italic">"</span><span style="color:rgb(1,168,1);font-style:italic">%d-point Tukey window, R = %d/%d</span><span style="color:rgb(1,168,1);font-style:italic">"</span><span style="color:rgb(1,168,1);font-style:italic">, L, [p, q] = rat(r), q));</span>
<span style="color:rgb(1,168,1);font-style:italic">// plot(w);</span></pre><br><br><div class="gmail_quote">On 19 September 2012 23:31, Samuel Gougeon <span dir="ltr"><<a href="mailto:sgougeon@free.fr" target="_blank">sgougeon@free.fr</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><u></u>
<div bgcolor="#ffffff" text="#000000">
Hello,<br>
<br>
Le 20/09/2012 00:05, Lester Anderson a écrit :
<div class="im"><blockquote type="cite"><br>
<pre style="font-family:Monospaced;font-style:normal;font-size:14px"><span style="color:rgb(176,24,19)">function</span> <span style="color:rgb(131,67,16);font-weight:bold">w</span><span style="color:rgb(92,92,92)">=</span><span style="text-decoration:underline">tukeywin</span><span style="color:rgb(74,85,219)">(</span><span style="color:rgb(131,67,16);font-weight:bold">L</span><span style>, </span><span style="color:rgb(131,67,16);font-weight:bold">r</span><span style="color:rgb(92,92,92)">=</span> <span style="color:rgb(188,143,143)">1</span><span style="color:rgb(92,92,92)">/</span><span style="color:rgb(188,143,143)">2</span><span style="color:rgb(74,85,219)">)</span>
<span style="color:rgb(160,32,240)">if</span> <span style="color:rgb(74,85,219)">(</span><span style>nargin</span> <span style="color:rgb(92,92,92)"><</span> <span style="color:rgb(188,143,143)">1</span> <span style="color:rgb(92,92,92)">|</span><span style="color:rgb(92,92,92)">|</span> <span style>nargin</span> <span style="color:rgb(92,92,92)">></span> <span style="color:rgb(188,143,143)">2</span><span style="color:rgb(74,85,219)">)</span> ------ Not sure how to replace this bit (variable not defined)
</pre>
</blockquote></div>
nargin => <tt>argn(2)</tt><br>
<br>
<blockquote type="cite">
<pre style="font-family:Monospaced;font-style:normal;font-size:14px"> .../...
<span style="color:rgb(1,168,1);font-style:italic">// generate window</span><div class="im">
<span style>switch</span> <span style="color:rgb(131,67,16);font-weight:bold">r</span> --------- think this should be select ?
</div></pre>
</blockquote>
Right<br>
<blockquote type="cite">
<pre style="font-family:Monospaced;font-style:normal;font-size:14px">.../...
<span style="color:rgb(160,32,240)">case</span> <span style="color:rgb(188,143,143)">1</span><span style>,</span><div class="im">
<span style="color:rgb(1,168,1);font-style:italic">// Hanning window</span>
<span style="color:rgb(131,67,16);font-weight:bold">w</span> <span style="color:rgb(92,92,92)">=</span> <span style>hanning</span> <span style="color:rgb(74,85,219)">(</span><span style="color:rgb(131,67,16);font-weight:bold">L</span><span style="color:rgb(74,85,219)">)</span><span style>;</span>
</div></pre>
</blockquote>
<tt>window('hn',L)</tt><br>
<blockquote type="cite">
<pre style="font-family:Monospaced;font-style:normal;font-size:14px"> <span style>otherwise</span> ------------- else
</pre>
</blockquote>
Yes<div class="im"><br>
<blockquote type="cite">
<pre style="font-family:Monospaced;font-style:normal;font-size:14px"> <span style="color:rgb(1,168,1);font-style:italic">// cosine-tapered window</span>
<span style>t</span> <span style="color:rgb(92,92,92)">=</span> <span style="color:rgb(174,92,176);text-decoration:underline">linspace</span><span style="color:rgb(74,85,219)">(</span><span style="color:rgb(188,143,143)">0</span><span style>,</span><span style="color:rgb(188,143,143)">1</span><span style>,</span><span style="color:rgb(131,67,16);font-weight:bold">L</span><span style="color:rgb(74,85,219)">)</span><span style="color:rgb(74,85,219)">(</span><span style="color:rgb(188,143,143)">1</span><span style="color:rgb(255,170,0)">:</span><span style="color:rgb(160,32,240)">end</span><span style="color:rgb(92,92,92)">/</span><span style="color:rgb(188,143,143)">2</span><span style="color:rgb(74,85,219)">)</span><span style="color:rgb(92,92,92)">'</span><span style>;</span>
</pre>
</blockquote></div>
replace <tt>end</tt> with <tt>$</tt> : (1:$/2)';<div class="im"><br>
<br>
<blockquote type="cite">
<pre style="font-family:Monospaced;font-style:normal;font-size:14px"> <span style="color:rgb(131,67,16);font-weight:bold">w</span> <span style="color:rgb(92,92,92)">=</span> <span style="color:rgb(74,85,219)">(</span><span style="color:rgb(188,143,143)">1</span> <span style="color:rgb(92,92,92)">+</span> <span style="color:rgb(50,185,185)">cos</span><span style="color:rgb(74,85,219)">(</span><span style>pi</span><span style="color:rgb(92,92,92)">*</span><span style="color:rgb(74,85,219)">(</span><span style="color:rgb(188,143,143)">2</span><span style="color:rgb(92,92,92)">*</span><span style>t</span><span style="color:rgb(92,92,92)">/</span><span style="color:rgb(131,67,16);font-weight:bold">r</span><span style="color:rgb(92,92,92)">-</span><span style="color:rgb(188,143,143)">1</span><span style="color:rgb(74,85,219)">)</span><span style="color:rgb(74,85,219)">)</span><span style="color:rgb(74,85,219)">)</span><span style="color:rgb(92,92,92)">/</span><span style="color:rgb(188,143,143)">2</span><span style>;</span>
</pre>
</blockquote></div>
pi => <tt>%pi</tt><div class="im"><br>
<br>
<blockquote type="cite">
<pre style="font-family:Monospaced;font-style:normal;font-size:14px"> <span style="color:rgb(131,67,16);font-weight:bold">w</span><span style="color:rgb(74,85,219)">(</span><span style="color:rgb(50,185,185)">floor</span><span style="color:rgb(74,85,219)">(</span><span style="color:rgb(131,67,16);font-weight:bold">r</span><span style="color:rgb(92,92,92)">*</span><span style="color:rgb(74,85,219)">(</span><span style="color:rgb(131,67,16);font-weight:bold">L</span><span style="color:rgb(92,92,92)">-</span><span style="color:rgb(188,143,143)">1</span><span style="color:rgb(74,85,219)">)</span><span style="color:rgb(92,92,92)">/</span><span style="color:rgb(188,143,143)">2</span><span style="color:rgb(74,85,219)">)</span><span style="color:rgb(92,92,92)">+</span><span style="color:rgb(188,143,143)">2</span><span style="color:rgb(255,170,0)">:</span><span style="color:rgb(160,32,240)">end</span><span style="color:rgb(74,85,219)">)</span> <span style="color:rgb(92,92,92)">=</span> <span style="color:rgb(188,143,143)">1</span><span style>;</span>
<span style="color:rgb(131,67,16);font-weight:bold">w</span> <span style="color:rgb(92,92,92)">=</span> <span style="color:rgb(74,85,219)">[</span><span style="color:rgb(131,67,16);font-weight:bold">w</span><span style>;</span> <span style="color:rgb(50,185,185)">ones</span><span style="color:rgb(74,85,219)">(</span><span style>mod</span><span style="color:rgb(74,85,219)">(</span><span style="color:rgb(131,67,16);font-weight:bold">L</span><span style>,</span><span style="color:rgb(188,143,143)">2</span><span style="color:rgb(74,85,219)">)</span><span style="color:rgb(74,85,219)">)</span><span style>;</span> <span style>flipud</span><span style="color:rgb(74,85,219)">(</span><span style="color:rgb(131,67,16);font-weight:bold">w</span><span style="color:rgb(74,85,219)">)</span><span style="color:rgb(74,85,219)">]</span><span style>;</span>
</pre>
</blockquote></div>
mod => <tt>modulo</tt><br>
flipud(w) =><tt> flipdim(w,1)</tt><br>
<br>
<blockquote type="cite">
<pre style="font-family:Monospaced;font-style:normal;font-size:14px"> <span style>endswitch</span> ------------------------------------ end ?
</pre>
</blockquote>
Yes<br>
<br>
</div>
<br>_______________________________________________<br>
users mailing list<br>
<a href="mailto:users@lists.scilab.org">users@lists.scilab.org</a><br>
<a href="http://lists.scilab.org/mailman/listinfo/users" target="_blank">http://lists.scilab.org/mailman/listinfo/users</a><br>
<br></blockquote></div><br>