summaryrefslogtreecommitdiffstats
path: root/scilab_doc/Matlab_Scilab_dictionary/matscifuns.xml
diff options
context:
space:
mode:
Diffstat (limited to 'scilab_doc/Matlab_Scilab_dictionary/matscifuns.xml')
-rw-r--r--scilab_doc/Matlab_Scilab_dictionary/matscifuns.xml3598
1 files changed, 3598 insertions, 0 deletions
diff --git a/scilab_doc/Matlab_Scilab_dictionary/matscifuns.xml b/scilab_doc/Matlab_Scilab_dictionary/matscifuns.xml
new file mode 100644
index 0000000..957c26a
--- /dev/null
+++ b/scilab_doc/Matlab_Scilab_dictionary/matscifuns.xml
@@ -0,0 +1,3598 @@
1<?xml version="1.0" encoding="ISO-8859-1" standalone="no"?>
2<!DOCTYPE MATSCIDOC SYSTEM "matsci.dtd">
3
4<!-- Functions are ordered by proto and then by names -->
5
6<MATSCIDOC>
7
8<!-- Converted by M2SCI kernel functions -->
9<MATSCIFUN>
10<MATNAME>ans</MATNAME>
11<SCINAME>ans</SCINAME>
12<DESCR>The most recent answer</DESCR>
13</MATSCIFUN>
14
15<MATSCIFUN>
16<MATNAME>case</MATNAME>
17<SCINAME>case</SCINAME>
18<DESCR>Case switch</DESCR>
19<NOTE>
20<P>
21In Matlab expression evaluated can be a cell, in this particular use, all values of cell are considered individually (similarly to a OR). In Scilab it can not be a cell (Matlab particularity can be replaced by others "case" or all switch/case statement can be replaced by a if/then/else statement.).
22</P>
23</NOTE>
24</MATSCIFUN>
25
26<MATSCIFUN>
27<MATNAME>else</MATNAME>
28<SCINAME>else</SCINAME>
29<DESCR>Conditionally execute statements</DESCR>
30</MATSCIFUN>
31
32<MATSCIFUN>
33<MATNAME>elseif</MATNAME>
34<SCINAME>elseif</SCINAME>
35<DESCR>Conditionally execute statements</DESCR>
36</MATSCIFUN>
37
38<MATSCIFUN>
39<MATNAME>end</MATNAME>
40<SCINAME>end</SCINAME>
41<DESCR>Terminate loops and conditionals</DESCR>
42</MATSCIFUN>
43
44<MATSCIFUN>
45<MATNAME>end (index)</MATNAME>
46<SCINAME>$</SCINAME>
47<DESCR>Last index</DESCR>
48</MATSCIFUN>
49
50<MATSCIFUN>
51<MATNAME>eps</MATNAME>
52<SCINAME>%eps</SCINAME>
53<DESCR>Floating-point relative accuracy</DESCR>
54<NOTE>
55<P>
56Only Matlab allows to change the value of this variable and clear eps allows to set the value of eps to its initial value.
57</P>
58</NOTE>
59</MATSCIFUN>
60
61<MATSCIFUN>
62<MATNAME>for</MATNAME>
63<SCINAME>for</SCINAME>
64<DESCR>Repeat statements a specific number of times</DESCR>
65<NOTE>
66<P>
67The variable used as loop index is clear in Scilab if all iterations have been made but is not clear if llop is ended by a break. In Matlab, this variable is never cleared.
68</P>
69</NOTE>
70</MATSCIFUN>
71
72<MATSCIFUN>
73<MATNAME>function</MATNAME>
74<SCINAME>function</SCINAME>
75<DESCR>Function definition</DESCR>
76</MATSCIFUN>
77
78<MATSCIFUN>
79<MATNAME>i</MATNAME>
80<SCINAME>%i</SCINAME>
81<DESCR>Imaginary unit</DESCR>
82<NOTE>
83<P>
84Only Matlab allows to change the value of this variable.
85</P>
86</NOTE>
87</MATSCIFUN>
88
89<MATSCIFUN>
90<MATNAME>if</MATNAME>
91<SCINAME>if</SCINAME>
92<DESCR>Conditionally execute statements</DESCR>
93<NOTE>
94<P>
95In Scilab condition can be ended by then but not in Matlab.
96</P>
97</NOTE>
98</MATSCIFUN>
99
100<MATSCIFUN>
101<MATNAME>j</MATNAME>
102<SCINAME>%i</SCINAME>
103<DESCR>Imaginary unit</DESCR>
104<NOTE>
105<P>
106Only Matlab allows to change the value of this variable.
107</P>
108</NOTE>
109</MATSCIFUN>
110
111<MATSCIFUN>
112<MATNAME>otherwise</MATNAME>
113<SCINAME>else</SCINAME>
114<DESCR>Default part of switch/select statement</DESCR>
115</MATSCIFUN>
116
117<MATSCIFUN>
118<MATNAME>pi</MATNAME>
119<SCINAME>%pi</SCINAME>
120<DESCR>Ratio of a circle's circumference to its diameter</DESCR>
121<NOTE>
122<P>
123Only Matlab allows to change the value of this variable.
124</P>
125</NOTE>
126</MATSCIFUN>
127
128<MATSCIFUN>
129<MATNAME>switch</MATNAME>
130<SCINAME>select</SCINAME>
131<DESCR>Switch among several cases based on expression</DESCR>
132</MATSCIFUN>
133
134<MATSCIFUN>
135<MATNAME>varargin</MATNAME>
136<SCINAME>varargin</SCINAME>
137<DESCR>Pass variable numbers of arguments</DESCR>
138<NOTE>
139<P>
140In Matlab varargin is a cell and in Scilab it is a list.
141</P>
142</NOTE>
143</MATSCIFUN>
144
145<MATSCIFUN>
146<MATNAME>varargout</MATNAME>
147<SCINAME>varargout</SCINAME>
148<DESCR>Return variable numbers of arguments</DESCR>
149<NOTE>
150<P>
151In Matlab varargout is a cell and in Scilab it is a list.
152</P>
153</NOTE>
154</MATSCIFUN>
155
156<MATSCIFUN>
157<MATNAME>while</MATNAME>
158<SCINAME>while</SCINAME>
159<DESCR>Repeat statements an indefinite number of times</DESCR>
160</MATSCIFUN>
161
162<!-- PROTO0 -->
163<MATSCIFUN>
164<MATNAME>abs</MATNAME>
165<SCINAME>abs</SCINAME>
166<DESCR>Absolute value and complex magnitude</DESCR>
167</MATSCIFUN>
168
169<MATSCIFUN>
170<MATNAME>bin2dec</MATNAME>
171<SCINAME>bin2dec</SCINAME>
172<DESCR>Returns the integer corresponding to a Given binary representation</DESCR>
173</MATSCIFUN>
174
175<MATSCIFUN>
176<MATNAME>dec2bin</MATNAME>
177<SCINAME>dec2bin</SCINAME>
178<DESCR>The binary representation of a decimal number</DESCR>
179</MATSCIFUN>
180
181<MATSCIFUN>
182<MATNAME>bitand</MATNAME>
183<SCINAME>bitand</SCINAME>
184<DESCR>The AND of two integers</DESCR>
185</MATSCIFUN>
186
187<MATSCIFUN>
188<MATNAME>bitor</MATNAME>
189<SCINAME>bitor</SCINAME>
190<DESCR>The OR of two integers</DESCR>
191</MATSCIFUN>
192
193<MATSCIFUN>
194<MATNAME>bitxor</MATNAME>
195<SCINAME>bitxor</SCINAME>
196<DESCR>Returns the exclusive OR of two integers</DESCR>
197</MATSCIFUN>
198
199<MATSCIFUN>
200<MATNAME>bitcmp</MATNAME>
201<SCINAME>bitcmp</SCINAME>
202<DESCR>The binary complementary of an integer</DESCR>
203</MATSCIFUN>
204
205<MATSCIFUN>
206<MATNAME>bitget</MATNAME>
207<SCINAME>bitget</SCINAME>
208<DESCR>Gets the bit of an integer whose the positon is given in the input argument</DESCR>
209</MATSCIFUN>
210
211<MATSCIFUN>
212<MATNAME>complex</MATNAME>
213<SCINAME>complex</SCINAME>
214<DESCR>Returns the complex form corresponding to the given real part and imaginary part</DESCR>
215</MATSCIFUN>
216
217<MATSCIFUN>
218<MATNAME>factor</MATNAME>
219<SCINAME>factor</SCINAME>
220<DESCR>Prime numbers decomposition</DESCR>
221</MATSCIFUN>
222
223<MATSCIFUN>
224<MATNAME>perms</MATNAME>
225<SCINAME>perms</SCINAME>
226<DESCR>Array of all permutations of vector components</DESCR>
227</MATSCIFUN>
228
229<MATSCIFUN>
230<MATNAME>primes</MATNAME>
231<SCINAME>primes</SCINAME>
232<DESCR>Returns the primes numbers included between 1 and given number</DESCR>
233</MATSCIFUN>
234
235<MATSCIFUN>
236<MATNAME>title</MATNAME>
237<SCINAME>title</SCINAME>
238<DESCR>Display a title on a graphic window</DESCR>
239</MATSCIFUN>
240
241<MATSCIFUN>
242<MATNAME>xlabel</MATNAME>
243<SCINAME>xlabel</SCINAME>
244<DESCR>Display a string along the x axis</DESCR>
245</MATSCIFUN>
246
247<MATSCIFUN>
248<MATNAME>ylabel</MATNAME>
249<SCINAME>ylabel</SCINAME>
250<DESCR>Display a string along the y axis</DESCR>
251</MATSCIFUN>
252
253<MATSCIFUN>
254<MATNAME>zlabel</MATNAME>
255<SCINAME>zlabel</SCINAME>
256<DESCR>Display a string along the z axis</DESCR>
257</MATSCIFUN>
258
259<MATSCIFUN>
260<MATNAME>cos</MATNAME>
261<SCINAME>cos</SCINAME>
262<DESCR>Cosine</DESCR>
263</MATSCIFUN>
264
265<MATSCIFUN>
266<MATNAME>cosh</MATNAME>
267<SCINAME>cosh</SCINAME>
268<DESCR>Hyperbolic cosine</DESCR>
269</MATSCIFUN>
270
271<MATSCIFUN>
272<MATNAME>erf</MATNAME>
273<SCINAME>erf</SCINAME>
274<DESCR>Error function</DESCR>
275</MATSCIFUN>
276
277<MATSCIFUN>
278<MATNAME>erfc</MATNAME>
279<SCINAME>erfc</SCINAME>
280<DESCR>Complementary error function</DESCR>
281</MATSCIFUN>
282
283<MATSCIFUN>
284<MATNAME>erfcx</MATNAME>
285<SCINAME>erfcx</SCINAME>
286<DESCR>Scaled complementary error function</DESCR>
287</MATSCIFUN>
288
289<MATSCIFUN>
290<MATNAME>gamma</MATNAME>
291<SCINAME>gamma</SCINAME>
292<DESCR>Gamma function</DESCR>
293</MATSCIFUN>
294
295<MATSCIFUN>
296<MATNAME>gammaln</MATNAME>
297<SCINAME>gammaln</SCINAME>
298<DESCR>Logarithm of gamma function</DESCR>
299</MATSCIFUN>
300
301<MATSCIFUN>
302<MATNAME>imag</MATNAME>
303<SCINAME>imag</SCINAME>
304<DESCR>Complex imaginary part</DESCR>
305</MATSCIFUN>
306
307<MATSCIFUN>
308<MATNAME>real</MATNAME>
309<SCINAME>real</SCINAME>
310<DESCR>Real part of a complex number</DESCR>
311</MATSCIFUN>
312
313<!-- PROTO1 -->
314<MATSCIFUN>
315<MATNAME>max</MATNAME>
316<SCINAME>max</SCINAME>
317<DESCR>Maximum</DESCR>
318<NOTE>
319<P>
320Matlab <B>max</B> function can work with complexes, what Scilab <B>max</B> can not, so a emulation function called <B>mtlb_max</B> has been written.
321</P>
322<P>
323Note that in Scilab, second input parameter can give the dimension to use to find the maximum values or another matrix (maximum of two matrices), in Matlab, dimension parameter is given in a third input parameter (in this case, second parameter must be <B>[]</B>).
324</P>
325<NOTE_ITEM LABEL="C=max(A)">If <B>A</B> is a matrix, <B>max(A)</B> is equivalent to <B>max(A,[],1)</B> in Matlab whereas in Scilab <B>max(A)</B> gives the maximum value found in <B>A</B>. Matlab <B>max</B> treats the values along the first non-singleton dimension.
326</NOTE_ITEM>
327</NOTE>
328<MATEX>
329A = [1,2,3;4,5,6]
330C = max(A)
331C = [4,5,6]
332C = max(A,[],1)
333C = [4,5,6]
334B=[7,8,9;2,3,4]
335C = max(A,B)
336C = [7,8,9;4,5,6]
337</MATEX>
338<SCIEX>
339A = [1,2,3;4,5,6]
340C = max(A)
341C = 6
342C = max(A,''r'')
343C = [4,5,6]
344B=[7,8,9;2,3,4]
345C = max(A,B)
346C = [7,8,9;4,5,6]
347</SCIEX>
348</MATSCIFUN>
349
350<MATSCIFUN>
351<MATNAME>min</MATNAME>
352<SCINAME>min</SCINAME>
353<DESCR>Minimum</DESCR>
354<NOTE>
355<P>
356Matlab <B>min</B> function can work with complexes, what Scilab <B>min</B> can not, so a emulation function called <B>mtlb_min</B> has been written.
357</P>
358<P>
359Note that in Scilab, second input parameter can give the dimension to use to find the minimum values or another matrix (minimum of two matrices), in Matlab, dimension parameter is given in a third input parameter (in this case, second parameter must be <B>[])</B>.
360</P>
361<NOTE_ITEM LABEL="C=min(A)">If <B>A</B> is a matrix, <B>min(A)</B> is equivalent to <B>min(A,[],1)</B> in Matlab whereas in Scilab <B>min(A)</B> gives the minimum value found in <B>A</B>. Matlab <B>min</B> treats the values along the first non-singleton dimension.
362</NOTE_ITEM>
363</NOTE>
364<MATEX>
365A = [1,2,3;4,5,6]
366C = min(A)
367C = [1,2,3]
368C = min(A,[],1)
369C = [1,2,3]
370B = [7,8,9;2,3,4]
371C = min(A,B)
372C = [1,2,3;2,3,4]
373</MATEX>
374<SCIEX>
375A = [1,2,3;4,5,6]
376C = min(A)
377C = 1
378C = min(A,''r'')
379C = [1,2,3]
380B = [7,8,9;2,3,4]
381C = min(A,B)
382C = [1,2,3;2,3,4]
383</SCIEX>
384</MATSCIFUN>
385
386<!-- PROTO2 -->
387<MATSCIFUN>
388<MATNAME>cumprod</MATNAME>
389<SCINAME>cumprod</SCINAME>
390<DESCR>Cumulative product</DESCR>
391<NOTE>
392<NOTE_ITEM LABEL="C = cumprod(A)">If <B>A</B> is a matrix, <B>cumprod(A)</B> is equivalent to <B>cumprod(A,1)</B> in Matlab whereas in Scilab <B>cumprod(A)</B> gives the cumulative product of all the entries of <B>A</B> taken columnwise. Actually, Matlab works on the first non-singleton dimension and Scilb does not.
393</NOTE_ITEM>
394<NOTE_ITEM LABEL="C = cumprod(A,dim)">Matlab can work with dim greater than number of dimensions of <B>A</B> but Scilab can not, in this can use <B>mtlb_cumprod</B> instead.
395</NOTE_ITEM>
396</NOTE>
397<MATEX>
398B = cumprod([1,2,3;4,5,6])
399B = [1,2,3;4,10,18]
400B = cumprod([1,2,3;4,5,6],1)
401B = [1,2,3;4,10,18]
402</MATEX>
403<SCIEX>
404B = cumprod([1,2,3;4,5,6])
405B = [1,8,120;4,40,720]
406B = cumprod([1,2,3;4,5,6],1)
407B = [1,2,3;4,10,18]
408</SCIEX>
409</MATSCIFUN>
410
411<MATSCIFUN>
412<MATNAME>cumsum</MATNAME>
413<SCINAME>cumsum</SCINAME>
414<DESCR>Cumulative sum</DESCR>
415<NOTE>
416<NOTE_ITEM LABEL="C=cumsum(A)">If A is a matrix, <B>cumsum(A)</B> is equivalent to <B>cumsum(A,1)</B> in Matlab whereas in Scilab <B>cumsum(A)</B> gives the cumulative sum of all the entries of <B>A</B> taken columnwise. Actually, Matlab works on the first non-singleton dimension and Scilb does not.
417</NOTE_ITEM>
418<NOTE_ITEM LABEL="C = cumsum(A,dim)">Matlab can work with dim greater than number of dimensions of <B>A</B> but Scilab can not, in this can use <B>mtlb_cumsum</B> instead.
419</NOTE_ITEM>
420</NOTE>
421<MATEX>
422B = cumsum([1,2,3;4,5,6])
423B=[1,2,3;5,7,9]
424B = cumsum([1,2,3;4,5,6],1)
425B=[1,2,3;5,7,9]
426</MATEX>
427<SCIEX>
428B = cumsum([1,2,3;4,5,6])
429B=[1,7,15;5,12,21]
430B = cumsum([1,2,3;4,5,6],1)
431B=[1,2,3;5,7,9]
432</SCIEX>
433</MATSCIFUN>
434
435<!-- PROTO3 -->
436<MATSCIFUN>
437<MATNAME>eye</MATNAME>
438<SCINAME>eye</SCINAME>
439<DESCR>Identity matrix</DESCR>
440<NOTE>
441<P>
442Note that in Matlab, <B>A</B> can contain complex values (in these cases, only real part of <B>A</B> is taken in account), what Scilab function do not tolerate.
443</P>
444<NOTE_ITEM LABEL="B=eye(A)">
445If A is a scalar, then Matlab returns a <B>A*A</B> identity matrix but in Scilab you get a <B>1</B>, use <B>eye(A,A)</B> to get the same matrix <B>B</B>. If <B>A</B> is a vector, Scilab and Matlab give the same <B>B</B>. Finally, if <B>A</B> is a matrix, in Scilab, <B>B</B> will be a matrix having the same size as <B>A</B> whereas in Matlab, you get an error message.
446</NOTE_ITEM>
447</NOTE>
448<MATEX>
449B = eye(2)
450B = [1,0;0,1]
451B = eye(2,2)
452B = [1,0;0,1]
453B = eye([3,3])
454B = [1,0,0;0,1,0;0,0,1]
455</MATEX>
456<SCIEX>
457B = eye(2)
458B = 1
459B = eye(2,2)
460B = [1,0;0,1]
461B = eye([3,3])
462B = [1,0]
463</SCIEX>
464</MATSCIFUN>
465
466<MATSCIFUN>
467<MATNAME>false</MATNAME>
468<SCINAME>No equivalent</SCINAME>
469<DESCR>False array</DESCR>
470<NOTE>
471<P>
472To get the same result in Scilab, use: <B>zeros(...)==1</B>. See <B>zeros</B>.
473</P>
474</NOTE>
475</MATSCIFUN>
476
477<MATSCIFUN>
478<MATNAME>ones</MATNAME>
479<SCINAME>ones</SCINAME>
480<DESCR>Create an array of all ones</DESCR>
481<NOTE>
482<P>
483Note that in Matlab, <B>A</B> can contain complex values (in these cases, only real part of <B>A</B> is taken in account), what Scilab function do not tolerate.
484</P>
485<NOTE_ITEM LABEL="B=ones(A)">
486If A is a scalar, then Matlab returns a <B>A*A</B> matrix of ones but in Scilab you get a <B>1</B>, use <B>ones(A,A)</B> to get the same matrix <B>B</B>. If <B>A</B> is a vector, Scilab and Matlab give the same <B>B</B>. Finally, if <B>A</B> is a matrix, in Scilab, <B>B</B> will be a matrix having the same size as <B>A</B> whereas in Matlab, you get an error message.
487</NOTE_ITEM>
488</NOTE>
489<MATEX>
490B = ones(2)
491B = [1,1;1,1]
492B = ones(2,2)
493B = [1,1;1,1]
494B = ones([3,3])
495B = [1,1,1;1,1,1;1,1,1]
496</MATEX>
497<SCIEX>
498B = ones(2)
499B = 1
500B = ones(2,2)
501B = [1,1;1,1]
502B = ones([3,3])
503B = [1,1]
504</SCIEX>
505</MATSCIFUN>
506
507<MATSCIFUN>
508<MATNAME>rand(A)</MATNAME>
509<SCINAME>rand(A[,''uniform''])</SCINAME>
510<DESCR>Uniformly distributed random numbers and arrays</DESCR>
511<NOTE>
512<NOTE_ITEM LABEL="B=rand(A)">
513If <B>A</B> is a scalar, then Matlab returns a <B>A*A</B> random matrix but in Scilab you get a single random value, use <B>rand(A,A)</B> to get the same matrix <B>B</B>. Finally, if <B>A</B> is a matrix, in Scilab, <B>B</B> will be a matrix having the same size as <B>A</B> whereas in Matlab, you get an error message.
514</NOTE_ITEM>
515<P>
516Note that in Matlab, <B>A</B> can contain complex values (in these cases, only real part of <B>A</B> is taken in account), what Scilab function do not tolerate.
517</P>
518<P>
519Particular case: To get the state of the uniform generator, in Matlab you have to use <B>s=rand('state')</B> to get 35 current values of the generator, but Scilab equivalent <B>s=rand(``seed'')</B> return only one value.
520</P>
521</NOTE>
522</MATSCIFUN>
523
524<MATSCIFUN>
525<MATNAME>randn(A)</MATNAME>
526<SCINAME>rand(A,''normal'')</SCINAME>
527<DESCR>Normally distributed random numbers and arrays</DESCR>
528<NOTE>
529<NOTE_ITEM LABEL="B=randn(A) |-| B=rand(A,``normal'')">
530If <B>A</B> is a scalar, then Matlab returns a <B>A*A</B> random matrix but in Scilab you get a single random value, use <B>rand(A,A,''normal'')</B> to get the same matrix <B>B</B>. Finally, if <B>A</B> is a matrix, in Scilab, <B>B</B> will be a matrix having the same size as <B>A</B> whereas in Matlab, you get an error message.
531</NOTE_ITEM>
532<P>
533Note that in Matlab, <B>A</B> can contain complex values (in these cases, only real part of <B>A</B> is taken in account), what Scilab function do not tolerate.
534</P>
535<P>
536Particular case: To get the state of the normal generator, in Matlab you have to use <B>s=randn('state')</B> to get 2 current values of the generator, but Scilab equivalent <B>s=rand(``seed'')</B> return only one value.
537</P>
538</NOTE>
539</MATSCIFUN>
540
541<MATSCIFUN>
542<MATNAME>true</MATNAME>
543<SCINAME>No equivalent</SCINAME>
544<DESCR>True array</DESCR>
545<NOTE>
546<P>
547To get the same result in Scilab, use: <B>ones(...)==1</B>. See <B>ones</B>.
548</P>
549</NOTE>
550</MATSCIFUN>
551
552<MATSCIFUN>
553<MATNAME>zeros</MATNAME>
554<SCINAME>zeros</SCINAME>
555<DESCR>Create an array of all zeros</DESCR>
556<NOTE>
557<NOTE_ITEM LABEL="B=zeros(A)">If <B>A</B> is a scalar, then Matlab returns a <B>A*A</B> matrix of zeros but in Scilab you get a <B>1</B>, use <B>zeros(A,A)</B> to get the same matrix <B>B</B>. If <B>A</B> is a row vector, Scilab and Matlab give the same <B>B</B>. Finally, if <B>A</B> is a matrix, in Scilab, <B>B</B> will be a matrix having the same size as <B>A</B> whereas in Matlab, you get an error message.
558</NOTE_ITEM>
559<P>
560Note that in Matlab, <B>A</B> can contain complex values (in these cases, only real part of <B>A</B> is taken in account), what Scilab function do not tolerate.
561</P>
562</NOTE>
563<MATEX>
564B = zeros(2)
565B = [0,;0,0]
566B = zeros(2,2)
567B = [0,0;0,0]
568B = zeros([3,3])
569B = [0,0,0;0,0,0;0,0,0]
570</MATEX>
571<SCIEX>
572B = zeros(2)
573B = 0
574B = zeros(2,2)
575B = [0,0;0,0]
576B = zeros([3,3])
577B = [0,0]
578</SCIEX>
579</MATSCIFUN>
580
581<!-- PROTO4 -->
582<MATSCIFUN>
583<MATNAME>acosh</MATNAME>
584<SCINAME>acosh</SCINAME>
585<DESCR>Inverse hyperbolic cosine</DESCR>
586</MATSCIFUN>
587
588<MATSCIFUN>
589<MATNAME>asinh</MATNAME>
590<SCINAME>asinh</SCINAME>
591<DESCR>Inverse hyperbolic sine</DESCR>
592</MATSCIFUN>
593
594<MATSCIFUN>
595<MATNAME>atan</MATNAME>
596<SCINAME>atan</SCINAME>
597<DESCR>Two-quadrant inverse tangent</DESCR>
598</MATSCIFUN>
599
600<MATSCIFUN>
601<MATNAME>conj</MATNAME>
602<SCINAME>conj</SCINAME>
603<DESCR>Complex conjugate</DESCR>
604</MATSCIFUN>
605
606<MATSCIFUN>
607<MATNAME>cot</MATNAME>
608<SCINAME>cotg</SCINAME>
609<DESCR>Cotangent</DESCR>
610</MATSCIFUN>
611
612<MATSCIFUN>
613<MATNAME>coth</MATNAME>
614<SCINAME>coth</SCINAME>
615<DESCR>Hyperbolic cotangent</DESCR>
616</MATSCIFUN>
617
618<MATSCIFUN>
619<MATNAME>exp</MATNAME>
620<SCINAME>exp</SCINAME>
621<DESCR>Exponential</DESCR>
622</MATSCIFUN>
623
624<MATSCIFUN>
625<MATNAME>expm</MATNAME>
626<SCINAME>expm</SCINAME>
627<DESCR>Matrix exponential</DESCR>
628</MATSCIFUN>
629
630<MATSCIFUN>
631<MATNAME>inv</MATNAME>
632<SCINAME>inv</SCINAME>
633<DESCR>Matrix inverse</DESCR>
634</MATSCIFUN>
635
636<MATSCIFUN>
637<MATNAME>log</MATNAME>
638<SCINAME>log</SCINAME>
639<DESCR>Natural logarithm</DESCR>
640</MATSCIFUN>
641
642<MATSCIFUN>
643<MATNAME>log10</MATNAME>
644<SCINAME>log10</SCINAME>
645<DESCR>Common (base 10) logarithm</DESCR>
646</MATSCIFUN>
647
648<MATSCIFUN>
649<MATNAME>sign</MATNAME>
650<SCINAME>sign</SCINAME>
651<DESCR>Signum function</DESCR>
652</MATSCIFUN>
653
654<MATSCIFUN>
655<MATNAME>sin</MATNAME>
656<SCINAME>sin</SCINAME>
657<DESCR>Sine</DESCR>
658</MATSCIFUN>
659
660<MATSCIFUN>
661<MATNAME>sinh</MATNAME>
662<SCINAME>sinh</SCINAME>
663<DESCR>Hyperbolic sine</DESCR>
664</MATSCIFUN>
665
666<MATSCIFUN>
667<MATNAME>sqrt</MATNAME>
668<SCINAME>sqrt</SCINAME>
669<DESCR>Square root</DESCR>
670</MATSCIFUN>
671
672<MATSCIFUN>
673<MATNAME>tan</MATNAME>
674<SCINAME>tan</SCINAME>
675<DESCR>Tangent</DESCR>
676</MATSCIFUN>
677
678<MATSCIFUN>
679 <MATNAME>tanh</MATNAME>
680 <SCINAME>tanh</SCINAME>
681 <DESCR>Hyperbolic tangent</DESCR>
682</MATSCIFUN>
683
684<!-- PROTO5 -->
685<MATSCIFUN>
686<MATNAME>asin</MATNAME>
687<SCINAME>asin</SCINAME>
688<DESCR>Inverse sine</DESCR>
689<NOTE>
690<P>In y=asin(x), for real elements of x outside the domain [-1,1], the complex part of Scilab y value is the opposite of Matlab y value.</P>
691</NOTE>
692<MATEX>
693y = asin(2)
694y = 1.5708 - 1.3170i
695</MATEX>
696<SCIEX>
697y = asin(2)
698y = 1.5708 + 1.3170i
699</SCIEX>
700</MATSCIFUN>
701
702<MATSCIFUN>
703<MATNAME>atanh</MATNAME>
704<SCINAME>atanh</SCINAME>
705<DESCR>Inverse hyperbolic tangent</DESCR>
706<NOTE>
707<P>In y=atanh(x), for real elements of x outside the domain [-1,1], the complex part of Scilab y value is the opposite of Matlab y value.</P>
708</NOTE>
709<MATEX>
710y = atanh(2)
711y = 0.5493 + 1.5708i
712</MATEX>
713<SCIEX>
714y = atanh(2)
715y = 0.5493061 - 1.5707963i
716</SCIEX>
717</MATSCIFUN>
718
719<!-- PROTO6 -->
720<MATSCIFUN>
721<MATNAME>ceil</MATNAME>
722<SCINAME>ceil</SCINAME>
723<DESCR>Round up</DESCR>
724</MATSCIFUN>
725
726<MATSCIFUN>
727<MATNAME>cell2mat</MATNAME>
728<SCINAME>cell2mat</SCINAME>
729<DESCR>Convert a cell array into a matrix</DESCR>
730</MATSCIFUN>
731
732<MATSCIFUN>
733<MATNAME>cellstr</MATNAME>
734<SCINAME>cellstr</SCINAME>
735<DESCR>Convert strings vector (or strings matrix) into a cell of strings</DESCR>
736</MATSCIFUN>
737
738<MATSCIFUN>
739<MATNAME>fix</MATNAME>
740<SCINAME>fix</SCINAME>
741<DESCR>Round towards zero</DESCR>
742</MATSCIFUN>
743
744<MATSCIFUN>
745<MATNAME>floor</MATNAME>
746<SCINAME>floor</SCINAME>
747<DESCR>Round down</DESCR>
748</MATSCIFUN>
749
750<MATSCIFUN>
751<MATNAME>round</MATNAME>
752<SCINAME>round</SCINAME>
753<DESCR>Round to nearest integer</DESCR>
754</MATSCIFUN>
755
756<!-- PROTO7 -->
757<MATSCIFUN>
758<MATNAME>tril</MATNAME>
759<SCINAME>tril</SCINAME>
760<DESCR>Lower triangular part of a matrix</DESCR>
761<NOTE>
762<P>
763In <B>L=tril(X)</B> and <B>L=tril(X,k)</B>, Scilab function gives different results from Matlab one if <B>X</B> is a String matrix. In this case use <B>mtlb_tril</B> instead.
764</P>
765<P>
766Note that <B>k</B> can be complex in Matlab, in this case, only real part of <B>k</B> is taken in account, Scilab gives an error message for a such use.
767</P>
768</NOTE>
769</MATSCIFUN>
770
771<MATSCIFUN>
772<MATNAME>triu</MATNAME>
773<SCINAME>triu</SCINAME>
774<DESCR>Upper triangular part of a matrix</DESCR>
775<NOTE>
776<P>
777In <B>U=triu(X)</B> and <B>U=triu(X,k)</B>, Scilab function gives different results from Matlab one if <B>X</B> is a String matrix. In this case use <B>mtlb_triu</B> instead.
778</P>
779<P>
780Note that <B>k</B> can be complex in Matlab, in this case, only real part of <B>k</B> is taken in account, Scilab gives an error message for a such use.
781</P>
782</NOTE>
783</MATSCIFUN>
784
785<!-- PROTO8 -->
786<MATSCIFUN>
787<MATNAME>prod</MATNAME>
788<SCINAME>prod</SCINAME>
789<DESCR>Product of array elements</DESCR>
790<NOTE>
791<NOTE_ITEM LABEL="M=prod(A)">Scilab <B>prod(A)</B> returns the product of all components of <B>A</B>. So, if <B>A</B> is a vector, then Scilab and Matlab work in the same way. If <B>A</B> is a matrix, Scilab <B>prod(A)</B> gives the product of all elements of <B>A</B> but Matlab returns the product of each column. Finally, if <B>A</B> is a multidimensional array, Matlab works on the first non-singleton dimension of <B>A</B> what Scilab does not. So, to be sure to find a Scilab equivalent for Matlab call to <B>prod</B> it is better to precise dimension on which to work.
792</NOTE_ITEM>
793<NOTE_ITEM LABEL="M=prod(A,dim)">In Scilab <B>dim=1</B> is equivalent to <B>dim=''r''</B> and <B>dim=2</B> is equivalent <B>dim=''c''</B>. In Matlab, <B>dim</B> can be greater then the number of dimension of <B>A</B> (in this case, <B>M=A</B>), in Scilab you will get an error message.
794</NOTE_ITEM>
795</NOTE>
796<MATEX>
797A = [1,2,3;4,5,6]
798M = prod(A)
799M = [4,10,18]
800M = prod(A,1)
801M = [4,10,18]
802</MATEX>
803<SCIEX>
804A = [1,2,3;4,5,6]
805M = prod(A)
806M = 720
807M = prod(A,''r'')
808M = [4,10,18]
809</SCIEX>
810</MATSCIFUN>
811
812<MATSCIFUN>
813<MATNAME>sum</MATNAME>
814<SCINAME>sum</SCINAME>
815<DESCR>Sum of array elements</DESCR>
816<NOTE>
817<NOTE_ITEM LABEL="M=sum(A)">Scilab <B>sum(A)</B> returns the sum of all components of <B>A</B>. So, if <B>A</B> is a vector, then Scilab and Matlab work in the same way. If <B>A</B> is a matrix, Scilab <B>sum(A)</B> gives the sum of all elements of <B>A</B> but Matlab returns the sum of each column. Finally, if <B>A</B> is a multidimensional array, Matlab works on the first non-singleton dimension of <B>A</B> what Scilab does not. So, to be sure to find a Scilab equivalent for Matlab call to <B>sum</B> it is better to precise dimension on which to work.
818</NOTE_ITEM>
819<NOTE_ITEM LABEL="M=sum(A,dim)">In Scilab <B>dim=1</B> is equivalent to <B>dim=''r''</B> and <B>dim=2</B> is equivalent <B>dim=''c''</B>. In Matlab, dim can be greater then the number of dimension of <B>A</B> (in this case, <B>M=A</B>), in Scilab you will get an error message.
820</NOTE_ITEM>
821</NOTE>
822<MATEX>
823A = [1,2,3;4,5,6]
824M = sum(A)
825M = [5,7,9]
826M = sum(A,1)
827M = [5,7,9]
828</MATEX>
829<SCIEX>
830A = [1,2,3;4,5,6]
831M = sum(A)
832M = 21
833M = sum(A,''r'')
834M = [5,7,9]
835</SCIEX>
836</MATSCIFUN>
837
838<!-- PROT9 -->
839<MATSCIFUN>
840<MATNAME>int8</MATNAME>
841<SCINAME>int8</SCINAME>
842<DESCR>Convert to 8-bit signed integer</DESCR>
843<NOTE>
844<P>
845For infinite values, Scilab and Matlab <B>int8</B> return different values.
846</P>
847</NOTE>
848<MATEX>
849A = int8(inf)
850A = 127
851A = int8(-inf)
852A = -128
853</MATEX>
854<SCIEX>
855A = int8(%inf)
856A = 0
857A = int8(-%inf)
858A = 0
859</SCIEX>
860</MATSCIFUN>
861
862<MATSCIFUN>
863<MATNAME>int16</MATNAME>
864<SCINAME>int16</SCINAME>
865<DESCR>Convert to 16-bit signed integer</DESCR>
866<NOTE>
867<P>
868For infinite and NaNs values, Scilab and Matlab <B>int16</B> return different values.
869</P>
870</NOTE>
871<MATEX>
872A = int16(inf)
873A = 32767
874A = int16(-inf)
875A = -32768
876A = int16(nan)
877A = 0
878</MATEX>
879<SCIEX>
880A = int16(%inf)
881A = -32768
882A = int16(-%inf)
883A = -32768
884A = int16(%nan)
885A = -32768
886</SCIEX>
887</MATSCIFUN>
888
889<MATSCIFUN>
890<MATNAME>int32</MATNAME>
891<SCINAME>int32</SCINAME>
892<DESCR>Convert to 32-bit signed integer</DESCR>
893<NOTE>
894<P>
895For infinite and NaNs values, Scilab and Matlab <B>int32</B> return different values.
896</P>
897</NOTE>
898<MATEX>
899A = int32(inf)
900A = 2147483647
901A = int32(-inf)
902A = -2147483648
903A = int32(nan)
904A = 0
905</MATEX>
906<SCIEX>
907A = int32(%inf)
908A = -2147483648
909A = int32(-%inf)
910A = -2147483648
911A = int32(%nan)
912A = -2147483648
913</SCIEX>
914</MATSCIFUN>
915
916<MATSCIFUN>
917<MATNAME>uint8</MATNAME>
918<SCINAME>uint8</SCINAME>
919<DESCR>Convert to 8-bit unsigned integer</DESCR>
920<NOTE>
921<P>
922For infinite values, Scilab and Matlab <B>uint8</B> return different values.
923</P>
924</NOTE>
925<MATEX>
926A = uint8(inf)
927A = 255
928</MATEX>
929<SCIEX>
930A = uint8(%inf)
931A = 0
932</SCIEX>
933</MATSCIFUN>
934
935<MATSCIFUN>
936<MATNAME>uint16</MATNAME>
937<SCINAME>uint16</SCINAME>
938<DESCR>Convert to 16-bit unsigned integer</DESCR>
939<NOTE>
940<P>
941For infinite values, Scilab and Matlab <B>uint16</B> return different values.
942</P>
943</NOTE>
944<MATEX>
945A = uint16(inf)
946A = 65535
947</MATEX>
948<SCIEX>
949A = uint16(%inf)
950A = 0
951</SCIEX>
952</MATSCIFUN>
953
954<MATSCIFUN>
955<MATNAME>uint32</MATNAME>
956<SCINAME>uint32</SCINAME>
957<DESCR>Convert to 32-bit unsigned integer</DESCR>
958<NOTE>
959<P>
960For infinite values, Scilab and Matlab <B>uint32</B> return different values.
961</P>
962</NOTE>
963<MATEX>
964A = uint32(inf)
965A = 4294967295
966</MATEX>
967<SCIEX>
968A = uint32(%inf)
969A = 0
970</SCIEX>
971</MATSCIFUN>
972
973<!-- PROTO10 -->
974<MATSCIFUN>
975<MATNAME>lower(str)</MATNAME>
976<SCINAME>convstr(str,''u'')</SCINAME>
977<DESCR>Convert string to lower case</DESCR>
978<NOTE>
979<P>
980If <B>A</B> is not a character string matrix, Scilab equivalent for <B>B=lower(A)</B> is <B>B=A</B>, else equivalent is <B>B=convstr(A)</B>.
981</P>
982</NOTE>
983</MATSCIFUN>
984
985<MATSCIFUN>
986<MATNAME>upper(str)</MATNAME>
987<SCINAME>convstr(str,''u'')</SCINAME>
988<DESCR>Convert string to upper case</DESCR>
989<NOTE>
990<P>
991If <B>A</B> is not a character string matrix, Scilab equivalent for <B>B=upper(A)</B> is <B>B=A</B>, else equivalent is <B>B=convstr(A,''u'')</B>.
992</P>
993</NOTE>
994</MATSCIFUN>
995
996<!-- PROTO11-->
997<MATSCIFUN>
998<MATNAME>dos</MATNAME>
999<SCINAME>unix_g</SCINAME>
1000<DESCR>Execute a UNIX command and return result</DESCR>
1001<NOTE>
1002<P>
1003Output values order is inversed in Scilab and in Matlab.
1004</P>
1005<P>
1006In Scilab use <B>disp</B> to emulate Matlab <B>-echo</B> option.
1007</P>
1008</NOTE>
1009<MATEX>
1010[status,result] = dos(...)
1011</MATEX>
1012<SCIEX>
1013[result,status] = unix_g(...)
1014</SCIEX>
1015</MATSCIFUN>
1016
1017<MATSCIFUN>
1018<MATNAME>unix</MATNAME>
1019<SCINAME>unix_g</SCINAME>
1020<DESCR>Execute a UNIX command and return result</DESCR>
1021<NOTE>
1022<P>
1023Output values order is inversed in Scilab and in Matlab.
1024</P>
1025<P>
1026In Scilab use <B>disp</B> to emulate Matlab <B>-echo</B> option.
1027</P>
1028</NOTE>
1029<MATEX>
1030[status,result] = unix(...)
1031</MATEX>
1032<SCIEX>
1033[result,status] = unix_g(...)
1034</SCIEX>
1035</MATSCIFUN>
1036
1037<!-- PROTO12 -->
1038<MATSCIFUN>
1039<MATNAME>who</MATNAME>
1040<SCINAME>who</SCINAME>
1041<DESCR>List variables in the workspace</DESCR>
1042<NOTE>
1043<P>
1044Scilab <B>who</B> is an equivalent for Matlab <B>who</B> just when called as follows: <B>who</B> or <B>who("global")</B>
1045</P>
1046</NOTE>
1047</MATSCIFUN>
1048
1049<MATSCIFUN>
1050<MATNAME>whos</MATNAME>
1051<SCINAME>whos</SCINAME>
1052<DESCR>List variables in the workspace</DESCR>
1053<NOTE>
1054<P>
1055Scilab <B>whos</B> is an equivalent for Matlab <B>whos</B> just when called as follows: <B>whos</B> or <B>whos("global")</B>
1056</P>
1057</NOTE>
1058</MATSCIFUN>
1059
1060<!-- PROTO13 -->
1061<MATSCIFUN>
1062<MATNAME>all</MATNAME>
1063<SCINAME>and</SCINAME>
1064<DESCR>Test to determine if all elements are nonzero</DESCR>
1065<NOTE>
1066<P>
1067Matlab <B>all</B> function can work with complexes, what Scilab <B>and</B> can not, so a call to <B>abs</B> function can be necessary when translating from Matlab to Scilab.
1068</P>
1069<NOTE_ITEM LABEL="B=all(A) |-| B=and(A)">
1070If <B>A</B> is a matrix, <B>all(A)</B> is equivalent to <B>all(A,1)</B> in Matlab whereas in Scilab <B>and(A)</B> is a logical AND of all elements of <B>A</B>. If <B>A</B> is a multidimensional array then Matlab treats the values along the first non-singleton dimension, but Scilab returns logical AND of all elements of <B>A</B>.
1071</NOTE_ITEM>
1072<NOTE_ITEM LABEL="B=all(A,dim) |-| B=and(A,dim)">
1073In Scilab <B>dim=1</B> is equivalent to <B>dim=''r''</B> and <B>dim=2</B> is equivalent <B>dim=''c''</B>. In Matlab, <B>dim</B> can be greater then the number of dimension of <B>A</B> (in this case, <B>B=A</B>), in Scilab you will get an error message.
1074</NOTE_ITEM>
1075</NOTE>
1076<MATEX>
1077y = all([1,1,0;1,0,1])
1078y = [1,0,0]
1079y = all([1,1,0;1,0,1],1)
1080y = [1,0,0]
1081 </MATEX>
1082 <SCIEX>
1083y = and([1,1,0;1,0,1])
1084y = %F
1085y = and([1,1,0;1,0,1],1)
1086y = [%T,%F,%F]
1087 </SCIEX>
1088</MATSCIFUN>
1089
1090<MATSCIFUN>
1091<MATNAME>any</MATNAME>
1092<SCINAME>or</SCINAME>
1093<DESCR>Test to determine if any nonzeros elements</DESCR>
1094<NOTE>
1095<P>
1096Matlab <B>any</B> function can work with complexes, what Scilab <B>or</B> can not, so a call to <B>abs</B> function can be necessary when translating from Matlab to Scilab.
1097</P>
1098<NOTE_ITEM LABEL="B=any(A) |-| B=or(A)">
1099If <B>A</B> is a matrix, <B>any(A)</B> is equivalent to <B>any(A,1)</B> in Matlab whereas in Scilab <B>or(A)</B> is a logical OR of all elements of <B>A</B>. If <B>A</B> is a multidimensional array then Matlab treats the values along the first non-singleton dimension, but Scilab returns logical OR of all elements of <B>A</B>.
1100</NOTE_ITEM>
1101<NOTE_ITEM LABEL="B=any(A,dim) |-| B=or(A,dim)">
1102In Scilab <B>dim=1</B> is equivalent to <B>dim=''r''</B> and <B>dim=2</B> is equivalent <B>dim=''c''</B>. In Matlab, <B>dim</B> can be greater then the number of dimension of <B>A</B> (in this case, <B>B=A</B>), in Scilab you will get an error message.
1103</NOTE_ITEM>
1104</NOTE>
1105<MATEX>
1106y = any([1,1,0;1,0,1])
1107y = [1,1,1]
1108y = any([1,1,0;1,0,1],1)
1109y = [1,1,1]
1110</MATEX>
1111<SCIEX>
1112y = or([1,1,0;1,0,1])
1113y = %T
1114y = or([1,1,0;1,0,1],1)
1115y = [%T,%T,%T]
1116</SCIEX>
1117</MATSCIFUN>
1118
1119<!-- PROTO14 -->
1120<MATSCIFUN>
1121<MATNAME>acos</MATNAME>
1122<SCINAME>acos</SCINAME>
1123<DESCR>Inverse cosine</DESCR>
1124</MATSCIFUN>
1125
1126<!-- PROTO15 -->
1127<MATSCIFUN>
1128<MATNAME>nargin |-| nargin('fun')</MATNAME>
1129<SCINAME>argn(2) |-| size(getfield(1,macrovar(fun)),"*")</SCINAME>
1130<DESCR>Number of function input arguments</DESCR>
1131</MATSCIFUN>
1132
1133<MATSCIFUN>
1134<MATNAME>nargout |-| nargout('fun')</MATNAME>
1135<SCINAME>argn(1) |-| size(getfield(2,macrovar(fun)),"*")</SCINAME>
1136<DESCR>Number of function output arguments</DESCR>
1137</MATSCIFUN>
1138
1139<!-- Other functions -->
1140<MATSCIFUN>
1141<MATNAME>acot(A)</MATNAME>
1142<SCINAME>atan(1 ./A)</SCINAME>
1143<DESCR>Inverse cotangent</DESCR>
1144</MATSCIFUN>
1145
1146<MATSCIFUN>
1147<MATNAME>acoth(A)</MATNAME>
1148<SCINAME>atanh(1 ./A)</SCINAME>
1149<DESCR>Inverse hyperbolic cotangent</DESCR>
1150<NOTE>
1151<P>In Matlab <B>y=acoth(x)</B> and Scilab <B>y=atanh(1 ./x)</B>, for real elements of <B>x</B> outside the domain <B>[-1,1]</B>, the complex part of Scilab <B>y</B> value is the opposite of Matlab <B>y</B> value. See <B>atanh</B>/.</P>
1152</NOTE>
1153</MATSCIFUN>
1154
1155<MATSCIFUN>
1156<MATNAME>acsc(A)</MATNAME>
1157<SCINAME>asin(1 ./A)</SCINAME>
1158<DESCR>Inverse cosecant</DESCR>
1159</MATSCIFUN>
1160
1161<MATSCIFUN>
1162<MATNAME>acsch(A)</MATNAME>
1163<SCINAME>asinh(1 ./A)</SCINAME>
1164<DESCR>Inverse hyperbolic cosecant</DESCR>
1165</MATSCIFUN>
1166
1167<MATSCIFUN>
1168<MATNAME>angle(A)</MATNAME>
1169<SCINAME>atan(imag(A),real(A))</SCINAME>
1170<DESCR>Phase angle</DESCR>
1171</MATSCIFUN>
1172
1173<MATSCIFUN>
1174<MATNAME>asec(A)</MATNAME>
1175<SCINAME>acos(1 ./A)</SCINAME>
1176<DESCR>Inverse secant</DESCR>
1177</MATSCIFUN>
1178
1179<MATSCIFUN>
1180<MATNAME>asech(A)</MATNAME>
1181<SCINAME>acosh(1 ./A)</SCINAME>
1182<DESCR>Inverse hyperbolic secant</DESCR>
1183</MATSCIFUN>
1184
1185<MATSCIFUN>
1186<MATNAME>atan2</MATNAME>
1187<SCINAME>atan2</SCINAME>
1188<DESCR>Four-quadrant inverse tangent</DESCR>
1189<NOTE>
1190<P>
1191Matlab <B>atan2</B> function can work with complexes (in this case, complex part is ignored), what Scilab <B>atan</B> can not.
1192</P>
1193</NOTE>
1194</MATSCIFUN>
1195
1196<MATSCIFUN>
1197<MATNAME>balance</MATNAME>
1198<SCINAME>balanc</SCINAME>
1199<DESCR>Diagonal scaling to improve eigenvalue accuracy</DESCR>
1200<NOTE>
1201<P>
1202There is no equivalent for <B>B=balance(A)</B> in Scilab, <B>balanc</B> function does not work with only one output value.
1203</P>
1204<P>
1205When used with two outputs, these functions return value in inverse order.
1206</P>
1207</NOTE>
1208<MATEX>
1209[T,Ab] = balance(A)
1210</MATEX>
1211<SCIEX>
1212[Ab,T] = balanc(A)
1213</SCIEX>
1214</MATSCIFUN>
1215
1216<MATSCIFUN>
1217<MATNAME>bar</MATNAME>
1218<SCINAME>bar</SCINAME>
1219<DESCR>Bar histogram</DESCR>
1220</MATSCIFUN>
1221
1222<MATSCIFUN>
1223<MATNAME>barh</MATNAME>
1224<SCINAME>barh</SCINAME>
1225<DESCR>Bar histogram horizontal</DESCR>
1226</MATSCIFUN>
1227
1228<MATSCIFUN>
1229<MATNAME>beep</MATNAME>
1230<SCINAME>beep</SCINAME>
1231<DESCR>Produce a beep sound</DESCR>
1232<NOTE>
1233<P>
1234Scilab <B>beep</B> always returns a value but not Matlab function.
1235</P>
1236</NOTE>
1237</MATSCIFUN>
1238
1239<MATSCIFUN>
1240<MATNAME>besseli</MATNAME>
1241<SCINAME>besseli</SCINAME>
1242<DESCR>Modified Bessel functions of the first kind </DESCR>
1243<NOTE>
1244<P>
1245Scilab <B>besseli</B> function can work with only one output argument, but the Matlab function can work with two outputs arguments.
1246</P>
1247</NOTE>
1248<MATEX>
1249y = besseli(alpha,x)
1250y = besseli(alpha,x,1)
1251[y,ierr] = besseli(alpha,...)
1252</MATEX>
1253<SCIEX>
1254y = besseli(alpha,x)
1255y = besseli(alpha,x,ice),ice = 1 or ice = 2
1256</SCIEX>
1257</MATSCIFUN>
1258
1259<MATSCIFUN>
1260<MATNAME>besselj</MATNAME>
1261<SCINAME>besselj</SCINAME>
1262<DESCR>Bessel functions of the first kind </DESCR>
1263<NOTE>
1264<P>
1265Scilab <B>besselj</B> function can work with only one output argument, but the Matlab function can work with two outputs arguments.
1266</P>
1267</NOTE>
1268<MATEX>
1269y = besselj(alpha,x)
1270y = besselj(alpha,x,1)
1271[y,ierr] = besselj(alpha,...)
1272</MATEX>
1273<SCIEX>
1274y = besselj(alpha,x)
1275y = besselj(alpha,x,ice),ice = 1 or ice = 2
1276</SCIEX>
1277</MATSCIFUN>
1278
1279<MATSCIFUN>
1280<MATNAME>besselk</MATNAME>
1281<SCINAME>besselk</SCINAME>
1282<DESCR>Modified Bessel functions of the second kind </DESCR>
1283<NOTE>
1284<P>
1285Scilab <B>besselk</B> function can work with only one output argument, but the Matlab function can work with two outputs arguments.
1286</P>
1287</NOTE>
1288<MATEX>
1289y = besselk(alpha,x)
1290y = besselk(alpha,x,1)
1291[y,ierr] = besselk(alpha,...)
1292</MATEX>
1293<SCIEX>
1294y = besselk(alpha,x)
1295y = besselk(alpha,x,ice),ice = 1 or ice = 2
1296</SCIEX>
1297</MATSCIFUN>
1298
1299<MATSCIFUN>
1300<MATNAME>bessely</MATNAME>
1301<SCINAME>bessely</SCINAME>
1302<DESCR>Bessel functions of the second kind </DESCR>
1303<NOTE>
1304<P>
1305Scilab <B>bessely</B> function can work with only one output argument, but the Matlab function can work with two outputs arguments.
1306</P>
1307</NOTE>
1308<MATEX>
1309y = bessely(alpha,x)
1310y = bessely(alpha,x,1)
1311[y,ierr] = bessely(alpha,...)
1312</MATEX>
1313<SCIEX>
1314y = bessely(alpha,x)
1315y = bessely(alpha,x,ice),ice = 1 or ice = 2
1316</SCIEX>
1317</MATSCIFUN>
1318
1319<MATSCIFUN>
1320<MATNAME>beta</MATNAME>
1321<SCINAME>beta</SCINAME>
1322<DESCR>Beta function</DESCR>
1323<NOTE>
1324<P>
1325Matlab <B>beta</B> function can work with only one scalar input an done not-scalar input parameter, but in Scilab both parameters must have the same size.
1326</P>
1327</NOTE>
1328<MATEX>
1329A = 1;
1330B = [1 2 3];
1331Y = beta(A,B);
1332</MATEX>
1333<SCIEX>
1334A = 1;
1335B = [1 2 3];
1336// So that A and B have the same size
1337tmp = A;A = B;A(:) = tmp;
1338Y = beta(A,B);
1339</SCIEX>
1340</MATSCIFUN>
1341
1342<MATSCIFUN>
1343<MATNAME>blanks</MATNAME>
1344<SCINAME>No equivalent</SCINAME>
1345<DESCR>A string of blanks</DESCR>
1346<NOTE>
1347<P>
1348There is no Scilab equivalent function for Matlab box but it can be easyly replaced by Scilab equivalent instructions.
1349</P>
1350</NOTE>
1351<MATEX>
1352A = ['xxx' blanks(20) 'yyy'];
1353</MATEX>
1354<SCIEX>
1355A = "xxx"+part(" ",ones(1,20))+"yyy";
1356</SCIEX>
1357</MATSCIFUN>
1358
1359<MATSCIFUN>
1360<MATNAME>box</MATNAME>
1361<SCINAME>No equivalent</SCINAME>
1362<DESCR>Display axes border</DESCR>
1363<NOTE>
1364<P>
1365There is no Scilab equivalent function for Matlab box but it can be easyly replaced by Scilab equivalent instructions.
1366</P>
1367</NOTE>
1368<MATEX>
1369box on
1370box off
1371box
1372box(h,'on')
1373box(h,'off')
1374box(h)
1375</MATEX>
1376<SCIEX>
1377a = gca();
1378a.box = "on";
1379a.box = "off";
1380if a.box=="on" then a.box="off";else a.box="on";end;
1381h.box = "on";
1382h.box = "off";
1383if h.box=="on" then h.box="off";else h.box="on";end;
1384</SCIEX>
1385</MATSCIFUN>
1386
1387<MATSCIFUN>
1388<MATNAME>break</MATNAME>
1389<SCINAME>break</SCINAME>
1390<DESCR>Terminate execution of a for loop or while loop</DESCR>
1391</MATSCIFUN>
1392
1393<MATSCIFUN>
1394<MATNAME>cat</MATNAME>
1395<SCINAME>cat</SCINAME>
1396<DESCR>Arrays concatenation</DESCR>
1397</MATSCIFUN>
1398
1399<MATSCIFUN>
1400<MATNAME>cd</MATNAME>
1401<SCINAME>cd</SCINAME>
1402<DESCR>Change/get working directory</DESCR>
1403<NOTE>
1404<P>
1405Note that <B>cd ..</B> does not work in Scilab, but it does in Matlab. In Scilab you can use <B>cd("..")</B>.
1406</P>
1407</NOTE>
1408</MATSCIFUN>
1409
1410<MATSCIFUN>
1411<MATNAME>cell</MATNAME>
1412<SCINAME>cell</SCINAME>
1413<DESCR>Create cell array</DESCR>
1414<NOTE>
1415<P>
1416Note that in Matlab, input can contain complex values (in these cases, only real part of it is taken in account), what Scilab function do not tolerate.
1417</P>
1418</NOTE>
1419</MATSCIFUN>
1420
1421<MATSCIFUN>
1422<MATNAME>chol</MATNAME>
1423<SCINAME>chol</SCINAME>
1424<DESCR>Cholesky factorization</DESCR>
1425<NOTE>
1426<P>
1427Scilab <B>chol</B> function can only have one output whereas Matlab one can have two ouputs.
1428</P>
1429</NOTE>
1430</MATSCIFUN>
1431
1432<MATSCIFUN>
1433<MATNAME>cla</MATNAME>
1434<SCINAME>No equivalent</SCINAME>
1435<DESCR>Clear current axes</DESCR>
1436<NOTE>
1437<NOTE_ITEM LABEL="cla">
1438Scilab equivalent could be <B>a = gca();delete(a.children);</B> but in this case, all current axes children will be deleted because there is no HandleVisibility property in Scilab graphics.
1439</NOTE_ITEM>
1440<NOTE_ITEM LABEL="cla reset">
1441Scilab equivalent is <B>a = gca();delete(a.children);</B>.
1442</NOTE_ITEM>
1443</NOTE>
1444</MATSCIFUN>
1445
1446<MATSCIFUN>
1447<MATNAME>clc</MATNAME>
1448<SCINAME>clc([nblines])</SCINAME>
1449<DESCR>Clear Command Window</DESCR>
1450<NOTE>
1451<P>
1452Note that Scilab function allows to clear only a set of lines above the cursor using <B>clc(nblines)</B>.
1453</P>
1454<P>
1455Note that Scilab function can not be used in no window mode under Unix/Linux while Matlab one clears the terminal display as if you were using "clear" command.
1456</P>
1457</NOTE>
1458</MATSCIFUN>
1459
1460<MATSCIFUN>
1461<MATNAME>clear</MATNAME>
1462<SCINAME>clear</SCINAME>
1463<DESCR>Remove items from workspace, freeing up system memory</DESCR>
1464<NOTE>
1465<P>
1466Scilab and Matlab <B>clear</B> functions are only equivalent when called using <B>clear</B> or <B>clear name</B>.
1467</P>
1468<NOTE_ITEM LABEL="clear global ...">
1469Scilab equivalent for Matlab <B>clear global [name]</B> is <B>clearglobal([name])</B>.
1470</NOTE_ITEM>
1471<NOTE_ITEM LABEL="clear variables ...">
1472Scilab equivalent for Matlab <B>clear variables</B> is simply <B>clear</B>.
1473</NOTE_ITEM>
1474<NOTE_ITEM LABEL="clear keyword ...">
1475For all other keywords, there is no Scilab equivalent for Matlab <B>clear call</B>.
1476</NOTE_ITEM>
1477</NOTE>
1478</MATSCIFUN>
1479
1480<MATSCIFUN>
1481<MATNAME>clock</MATNAME>
1482<SCINAME>No equivalent</SCINAME>
1483<DESCR>Current time as a date vector</DESCR>
1484<NOTE>
1485<P>
1486Even if there no equivalent for Matlab <B>clock</B> in Scilab, it can be emuled as shown in example.
1487</P>
1488</NOTE>
1489<MATEX>
1490c = clock
1491</MATEX>
1492<SCIEX>
1493w = getdate();
1494w(3:5) = [];
1495w(6) = w(6)+w(7)/1000;
1496c = w(1:6);
1497</SCIEX>
1498</MATSCIFUN>
1499
1500<MATSCIFUN>
1501<MATNAME>clf</MATNAME>
1502<SCINAME>clf</SCINAME>
1503<DESCR>Clear current figure window</DESCR>
1504<NOTE>
1505<NOTE_ITEM LABEL="clf">
1506In this case, all current figure children will be deleted because there is no HandleVisibility property in Scilab graphics.
1507</NOTE_ITEM>
1508<NOTE_ITEM LABEL="fig_handle = clf">
1509Scilab equivalent is be <B>fig_handle = gcf();clf;</B>. In this case, all current figure children will be deleted because there is no HandleVisibility property in Scilab graphics.
1510</NOTE_ITEM>
1511</NOTE>
1512</MATSCIFUN>
1513
1514<MATSCIFUN>
1515<MATNAME>close</MATNAME>
1516<SCINAME>close |-| xdel |-| delete</SCINAME>
1517<DESCR>Delete specified figure</DESCR>
1518<NOTE>
1519<NOTE_ITEM LABEL="close">
1520If current figure is a uicontrol one, Scilab and Matlab <B>close</B> are equivalent. But if current figure is a graphic window, Scilab equivalent for Matlab <B>close</B> is <B>delete(gcf())</B>.
1521</NOTE_ITEM>
1522<NOTE_ITEM LABEL="close(h)">
1523If <B>h</B> is a uicontrol figure, Scilab and Matlab <B>close(h)</B> are equivalent. But if <B>h</B> is a graphic window, Scilab equivalent for Matlab <B>close(h)</B> is <B>delete(h)</B>.
1524</NOTE_ITEM>
1525<NOTE_ITEM LABEL="close('all')">
1526Scilab equivalent for Matlab <B>close('all')</B> is <B>xdel(winsid())</B>.
1527</NOTE_ITEM>
1528<NOTE_ITEM LABEL="close(name)">
1529There is no Scilab equivalent for Matlab <B>close(name)</B> however, <B>mtlb_close</B> can be an equivalent.
1530</NOTE_ITEM>
1531<NOTE_ITEM LABEL="close('all','hidden')">
1532Scilab equivalent for Matlab <B>close('all','hidden')</B> is <B>xdel(winsid())</B> but Scilab kills all figures even if they are hidden.
1533</NOTE_ITEM>
1534</NOTE>
1535</MATSCIFUN>
1536
1537<MATSCIFUN>
1538<MATNAME>closereq</MATNAME>
1539<SCINAME>delete(gcf())</SCINAME>
1540<DESCR>Default figure close request function</DESCR>
1541</MATSCIFUN>
1542
1543<MATSCIFUN>
1544<MATNAME>colordef</MATNAME>
1545<SCINAME>No equivalent</SCINAME>
1546<DESCR>Set default property values to display different color schemes</DESCR>
1547<NOTE>
1548<NOTE_ITEM LABEL="[h = ]mtlb_colordef(color_option)">
1549Scilab equivalent is <B>fig = gcf();fig.background = -1;[h = fig];</B> if <B>color_option</B> is equal to "black" or "none" and <B>fig = gcf();fig.background = -1;[h = fig];</B> else.
1550</NOTE_ITEM>
1551<NOTE_ITEM LABEL="[h = ]mtlb_colordef(fig,color_option)">
1552Considering <B>fig</B> is a graphics handle, Scilab equivalent is <B>fig.background = -1;[h = fig];</B> if <B>color_option</B> is equal to "black" or "none" and <B>fig.background = -2;[h = fig];</B> else.
1553</NOTE_ITEM>
1554<NOTE_ITEM LABEL="[h = ]mtlb_colordef('new',color_option)">
1555Scilab equivalent is <B>fig=scf(max(winsid())+1);fig.background = -1;[h = fig];</B> if <B>color_option</B> is equal to "black" or "none" and <B>fig=scf(max(winsid())+1);fig.background = -2;[h = fig];</B> else.
1556</NOTE_ITEM>
1557</NOTE>
1558</MATSCIFUN>
1559
1560<MATSCIFUN>
1561<MATNAME>continue</MATNAME>
1562<SCINAME>continue</SCINAME>
1563<DESCR>Keyword to pass control to the next iteration of a loop</DESCR>
1564</MATSCIFUN>
1565
1566<MATSCIFUN>
1567<MATNAME>csc(A)</MATNAME>
1568<SCINAME>1 ./sin(A)</SCINAME>
1569<DESCR>Cosecant</DESCR>
1570</MATSCIFUN>
1571
1572<MATSCIFUN>
1573<MATNAME>conv</MATNAME>
1574<SCINAME>convol</SCINAME>
1575<DESCR>Convolution</DESCR>
1576<NOTE>
1577<P>
1578Scilab <B>convol</B> output value is always a row vector while Matlab <B>conv</B> output value is a column vector if at least one input is a column vector.
1579</P>
1580<P>
1581To have a closer result, replace Matlab <B>conv(A)</B> by <B>clean(convol(A))</B> in Scilab.
1582</P>
1583</NOTE>
1584</MATSCIFUN>
1585
1586<MATSCIFUN>
1587<MATNAME>cputime</MATNAME>
1588<SCINAME>timer()</SCINAME>
1589<DESCR>Elapsed CPU time</DESCR>
1590</MATSCIFUN>
1591
1592<MATSCIFUN>
1593<MATNAME>csch(A)</MATNAME>
1594<SCINAME>1 ./sinh(A)</SCINAME>
1595<DESCR>Hyperbolic cosecant</DESCR>
1596</MATSCIFUN>
1597
1598<MATSCIFUN>
1599<MATNAME>date</MATNAME>
1600<SCINAME>date()</SCINAME>
1601<DESCR>Current date string</DESCR>
1602</MATSCIFUN>
1603
1604<MATSCIFUN>
1605<MATNAME>dec2hex</MATNAME>
1606<SCINAME>dec2hex</SCINAME>
1607<DESCR>Decimal to hexadecimal number conversion</DESCR>
1608<NOTE>
1609<NOTE_ITEM LABEL="Empty matrix input">
1610In Matlab <B>dec2hex</B> returns <B>""</B> when input is <B>[]</B> but Scilab <B>dec2hex</B> returns <B>[]</B>.
1611</NOTE_ITEM>
1612<NOTE_ITEM LABEL="Complex inputs">
1613In Matlab <B>dec2hex</B> automatically removes complex part of input but not in Scilab.
1614</NOTE_ITEM>
1615<NOTE_ITEM LABEL="Two inputs">
1616In Matlab <B>dec2hex</B> can have two inputs, in Scilab <B>mtlb_dec2hex</B> emulates this case.
1617</NOTE_ITEM>
1618</NOTE>
1619</MATSCIFUN>
1620
1621<MATSCIFUN>
1622<MATNAME>delete</MATNAME>
1623<SCINAME>mdelete |-| delete</SCINAME>
1624<DESCR>Delete files or graphics objects</DESCR>
1625<NOTE>
1626<NOTE_ITEM LABEL="Files">
1627When Matlab <B>delete</B> is used to delete a file, Scilab equivalent is <B>mdelete</B>.
1628</NOTE_ITEM>
1629<NOTE_ITEM LABEL="Graphics objects">
1630When Matlab <B>delete</B> is used to delete a graphics object, Scilab equivalent is <B>delete</B>. Note that Scilab <B>delete</B> can delete a set of graphics handles is its input is a matrix of such objects.
1631</NOTE_ITEM>
1632</NOTE>
1633</MATSCIFUN>
1634
1635<MATSCIFUN>
1636<MATNAME>det</MATNAME>
1637<SCINAME>det</SCINAME>
1638<DESCR>Determinant</DESCR>
1639</MATSCIFUN>
1640
1641<MATSCIFUN>
1642<MATNAME>diag</MATNAME>
1643<SCINAME>diag</SCINAME>
1644<DESCR>Diagonal including or extracting </DESCR>
1645<NOTE>
1646<P>
1647Due to the fact that strings or not considered in the same way in Matlab and in Scilab, results are not equal if <B>A</B> is a string matrix or vector in <B>diag(A)</B> or <B>diag(A,k)</B>.
1648</P>
1649<P>
1650Note that <B>mtlb_diag</B> can emulate this particularity in Scilab.
1651</P>
1652</NOTE>
1653<MATEX>
1654B = diag('str')
1655B = ['s ';' t ';' r']
1656</MATEX>
1657<SCIEX>
1658B = diag(``str'')
1659B = ``str''
1660B = mtlb_diag(``str'')
1661B = [``s ``;'' t ``;'' r'']
1662</SCIEX>
1663</MATSCIFUN>
1664
1665<MATSCIFUN>
1666<MATNAME>diary</MATNAME>
1667<SCINAME>diary</SCINAME>
1668<DESCR>Save session to a file</DESCR>
1669<NOTE>
1670<P>
1671When a filename is given to save environment, if this file exists, Scilab returns an error message while Matlab save environment at the end of existing file (append).
1672</P>
1673<P>
1674Note that <B>diary on</B> and <B>diary toggle</B> exist only in Matlab.
1675</P>
1676<P>
1677The equivalent for Matlab <B>diary off</B> is <B>diary(0)</B> in Scilab.
1678</P>
1679</NOTE>
1680</MATSCIFUN>
1681
1682<MATSCIFUN>
1683<MATNAME>diff</MATNAME>
1684<SCINAME>diff</SCINAME>
1685<DESCR>Differences and approximate derivatives</DESCR>
1686<NOTE>
1687<NOTE_ITEM LABEL="Y = diff(X[,n])">For this kind of use of <B>diff</B> (dim parameter not given), Matlab works on the first non-singleton dimension of <B>X</B> what Scilab does not. In this case, Scilab considers dim to be <B>"*"</B> so that diff threats all values of <B>X</B>, what Matlab does not.
1688</NOTE_ITEM>
1689<NOTE_ITEM LABEL="Y = diff(X,n,dim)">If dimension given by <B>dim</B> reaches 1 before <B>n</B> iterations have been done, Matlab switches to next non-singleton dimension, but Scilab does not, use <B>mtlb_diff</B> to get equivalent results...
1690</NOTE_ITEM>
1691<P>
1692When <B>n</B> is greater than all existing dimensions of <B>X</B>, Matlab returns <B>[]</B> what Scilab may not give for all inputs...
1693</P>
1694</NOTE>
1695</MATSCIFUN>
1696
1697<MATSCIFUN>
1698<MATNAME>dir</MATNAME>
1699<SCINAME>dir</SCINAME>
1700<DESCR>Display directory listing</DESCR>
1701<NOTE>
1702<P>
1703When used in command window, Scilab and Matlab <B>dir</B> are equivalents. When result is stored in a value, Matlab returns a struture but Scilab returns a tlist. To get the same result, you can use <B>mtlb_dir</B>, note that in this case, hidden files are not get.
1704</P>
1705</NOTE>
1706</MATSCIFUN>
1707
1708<MATSCIFUN>
1709<MATNAME>disp</MATNAME>
1710<SCINAME>disp</SCINAME>
1711<DESCR>Display text or array</DESCR>
1712</MATSCIFUN>
1713
1714<MATSCIFUN>
1715<MATNAME>display</MATNAME>
1716<SCINAME>display</SCINAME>
1717<DESCR>Overloaded method to display an object</DESCR>
1718</MATSCIFUN>
1719
1720<MATSCIFUN>
1721<MATNAME>doc</MATNAME>
1722<SCINAME>help</SCINAME>
1723<DESCR>Display online documentation</DESCR>
1724</MATSCIFUN>
1725
1726<MATSCIFUN>
1727<MATNAME>docopt</MATNAME>
1728<SCINAME>No equivalent</SCINAME>
1729<DESCR>Web browser for UNIX platforms</DESCR>
1730<NOTE>
1731<P>
1732There no Scilab equivalent function, however, information about Web Browser used can be found using global
1733variable <B>%browsehelp</B>. Thos variables exists under all platforms.
1734</P>
1735</NOTE>
1736</MATSCIFUN>
1737
1738<MATSCIFUN>
1739<MATNAME>double</MATNAME>
1740<SCINAME>double</SCINAME>
1741<DESCR>Conversion to double precision</DESCR>
1742<NOTE>
1743<P>
1744In Matlab, this function returns a Boolean type value for a Boolean input whereas Scilab function returns a Double type value.
1745</P>
1746</NOTE>
1747</MATSCIFUN>
1748
1749<MATSCIFUN>
1750<MATNAME>drawnow</MATNAME>
1751<SCINAME>No equivalent</SCINAME>
1752<DESCR>Complete pending drawing events</DESCR>
1753<NOTE>
1754<P>
1755In Scilab, drawing events are executed immediately.
1756</P>
1757<P>
1758Scilab <B>drawnow</B> is different from Matlab one.
1759</P>
1760</NOTE>
1761</MATSCIFUN>
1762
1763<MATSCIFUN>
1764<MATNAME>echo</MATNAME>
1765<SCINAME>mode</SCINAME>
1766<DESCR>Echo lines during execution</DESCR>
1767<NOTE>
1768<P>
1769Scilab <B>mode</B> and Matlab <B>echo</B> are not exactly equivalents but they both change the information displayed during execution. Scilab <B>mode</B> has to be called inside a script or a function but Matlab <B>echo</B> can be called from prompt. However, some uses are equivalents such as:
1770</P>
1771<NOTE_ITEM LABEL="echo"> is equivalent to Scilab <B>mode(abs(mode()-1))</B> for scripts and non-compiled functions
1772</NOTE_ITEM>
1773<NOTE_ITEM LABEL="echo on"> is equivalent to Scilab <B>mode(1)</B> for scripts and non-compiled functions
1774</NOTE_ITEM>
1775<NOTE_ITEM LABEL="echo off"> is equivalent to Scilab <B>mode(0)</B>
1776</NOTE_ITEM>
1777</NOTE>
1778</MATSCIFUN>
1779
1780<MATSCIFUN>
1781<MATNAME>eig</MATNAME>
1782<SCINAME>spec |-| bdiag</SCINAME>
1783<DESCR>Find eigenvalues and eigenvectors</DESCR>
1784<NOTE>
1785<NOTE_ITEM LABEL="eig(A)">
1786Scilab equivalent for <B>eig(A)</B> is <B>spec(A)</B>. Scilab eigen vector matrix can differ from Matlab one...
1787</NOTE_ITEM>
1788<NOTE_ITEM LABEL="eig(A,'nobalance')">
1789There is no Scilab equivalent for <B>'nobalance'</B> option. See examples...
1790</NOTE_ITEM>
1791<NOTE_ITEM LABEL="eig(A,B,flag)">
1792There is no Scilab equivalent for <B>flag</B>.
1793</NOTE_ITEM>
1794</NOTE>
1795<MATEX>
1796d = eig(A,'balance')
1797[V,D] = eig(A,'balance')
1798d = eig(A,B)
1799[V,D] = eig(A,B)
1800</MATEX>
1801<SCIEX>
1802d = spec(A)
1803[V,D] = bdiag(A+%i,1/%eps)
1804[al,be] = spec(A); d = al./be;
1805[al,be,V] = spec(A); D = spec(al./be);
1806</SCIEX>
1807</MATSCIFUN>
1808
1809<MATSCIFUN>
1810<MATNAME>error</MATNAME>
1811<SCINAME>error</SCINAME>
1812<DESCR>Display error messages</DESCR>
1813<NOTE>
1814<P>
1815Scilab <B>error</B> function can only take one character string as input but Matlab function can take more than one character string as input and also numerical values...
1816</P>
1817</NOTE>
1818</MATSCIFUN>
1819
1820<MATSCIFUN>
1821<MATNAME>etime</MATNAME>
1822<SCINAME>etime</SCINAME>
1823<DESCR>Elapsed time</DESCR>
1824<NOTE>
1825<P>
1826In Scilab, <B>etime</B> can be used with 6 and 10 value vectors but Matlab <B>etime</B> can only be used with 6 value vectors ([Year Month Day Hour Minute Second]).
1827</P>
1828</NOTE>
1829</MATSCIFUN>
1830
1831<MATSCIFUN>
1832<MATNAME>eval</MATNAME>
1833<SCINAME>evstr |-| execstr</SCINAME>
1834<DESCR>Execute a string containing an instruction/expression</DESCR>
1835<NOTE>
1836<NOTE_ITEM LABEL="Expression">
1837When <B>eval</B> has to execute an expression then Scilab equivalent for <B>eval</B> is <B>evstr</B>
1838</NOTE_ITEM>
1839<NOTE_ITEM LABEL="Instruction">
1840When <B>eval</B> has to execute an instruction with just one output value then Scilab equivalent for <B>eval</B> is <B>evstr</B>. If instruction has more than one output value then <B>execstr</B> has to be used as follows.
1841</NOTE_ITEM>
1842<P>
1843When <B>eval</B> is used with two inputs then an equivalent can be found in examples below.
1844</P>
1845</NOTE>
1846<MATEX>
1847eval('1+1')
1848eval('x=1+1')
1849eval('[d1,d2]=size(1)')
1850[d1,d2]=eval('size(1)')
1851eval('1+1','1+2')
1852</MATEX>
1853<SCIEX>
1854evstr('1+1')
1855x = evstr('1+1')
1856execstr('[d1,d2]=size(1)')
1857execstr('[d1,d2]=size(1)')
1858if execstr("1+1","errcatch") then execstr("1+2");end
1859</SCIEX>
1860</MATSCIFUN>
1861
1862<MATSCIFUN>
1863<MATNAME>exist</MATNAME>
1864<SCINAME>exist</SCINAME>
1865<DESCR>Check if a variable or file exists</DESCR>
1866<NOTE>
1867<P>
1868Scilab <B>exist</B> function only works for variables, not for M-files or else...
1869</P>
1870<P>
1871Scilab <B>mtlb_exist</B> function is a partial emulation for Matlab <B>exist</B>
1872</P>
1873</NOTE>
1874</MATSCIFUN>
1875
1876<MATSCIFUN>
1877<MATNAME>interp1</MATNAME>
1878<SCINAME>interp1</SCINAME>
1879<DESCR>One_dimension interpolation function</DESCR>
1880<NOTE>
1881<P>
1882Scilab <B>interp1</B> function doesn't work with the pchip interpolation method.
1883</P>
1884</NOTE>
1885</MATSCIFUN>
1886
1887<MATSCIFUN>
1888<MATNAME>exit</MATNAME>
1889<SCINAME>exit</SCINAME>
1890<DESCR>Ends current session</DESCR>
1891</MATSCIFUN>
1892
1893<MATSCIFUN>
1894<MATNAME>fclose</MATNAME>
1895<SCINAME>mclose</SCINAME>
1896<DESCR>Close one or more open files</DESCR>
1897</MATSCIFUN>
1898
1899<MATSCIFUN>
1900<MATNAME>feof</MATNAME>
1901<SCINAME>meof</SCINAME>
1902<DESCR>Test for end-of-file</DESCR>
1903</MATSCIFUN>
1904
1905<MATSCIFUN>
1906<MATNAME>ferror</MATNAME>
1907<SCINAME>mclearerr |-| merror</SCINAME>
1908<DESCR>Query about errors in file input or output</DESCR>
1909<NOTE>
1910<NOTE_ITEM LABEL="ferror(fid)">
1911When Matlab <B>ferror</B> is called with just one input and one output, then Scilab equivalent is <B>merror</B>.
1912</NOTE_ITEM>
1913<NOTE_ITEM LABEL="ferror(fid,'clear')">
1914When Matlab <B>ferror</B> is called with two inputs and just one output, then Scilab equivalent is <B>mclearerr</B>.
1915</NOTE_ITEM>
1916<P>
1917For all other cases, there no equivalent in Scilab.
1918</P>
1919</NOTE>
1920</MATSCIFUN>
1921
1922<MATSCIFUN>
1923<MATNAME>feval</MATNAME>
1924<SCINAME>evstr |-| execstr</SCINAME>
1925<DESCR>Function evaluation</DESCR>
1926<NOTE>
1927<NOTE_ITEM LABEL="One output">
1928In this case Scilab <B>evstr</B> is an equivalent to <B>feval</B>, after modifying inputs such as in examples below.
1929</NOTE_ITEM>
1930<NOTE_ITEM LABEL="More than one output">
1931In this case Scilab <B>execstr</B> is an equivalent to <B>feval</B>, after modifying inputs such as in examples below.
1932</NOTE_ITEM>
1933</NOTE>
1934<MATEX>
1935[y1] = feval(@cos,0)
1936[y1,y2] = feval(@size,1)
1937</MATEX>
1938<SCIEX>
1939y1 = evstr("cos(0)")
1940execstr("[y1,y2] = size(1)")
1941</SCIEX>
1942</MATSCIFUN>
1943
1944<MATSCIFUN>
1945<MATNAME>fft(A[,...])</MATNAME>
1946<SCINAME>fft(A,-1[,...])</SCINAME>
1947<DESCR>Discrete Fourier transform</DESCR>
1948<NOTE>
1949<NOTE_ITEM LABEL="Y = fft(X)">If X is a vector then Scilab equivalent for Matlab <B>fft(X)</B> is <B>fft(X,-1)</B>. If <B>X</B> is a matrix then Scilab equivalent for Matlab <B>fft(X)</B> is <B>fft(X,-1,2,1)</B>.
1950</NOTE_ITEM>
1951<NOTE_ITEM LABEL="Y = fft(X,n) / Y = fft(X,n,dim) / Y = fft(X,[],dim)">There is no Scilab equivalent for all these Matlab uses of <B>fft</B>, in these cases, use <B>mtlb_fft</B> instead.
1952</NOTE_ITEM>
1953</NOTE>
1954</MATSCIFUN>
1955
1956<MATSCIFUN>
1957<MATNAME>fftshift</MATNAME>
1958<SCINAME>fftshift</SCINAME>
1959<DESCR>Shift zero-frequency component of discrete Fourier transform to center of spectrum</DESCR>
1960<NOTE>
1961<NOTE_ITEM LABEL="fftshift(A[,dim])">
1962Due to the fact that strings or not considered in the same way in Matlab and in Scilab, results are not equal if A is a string matrix or vector in fftshift(A) or fftshift(A,dim). <B>mtlb_fftshift</B> can emulate this particularity in Scilab.
1963</NOTE_ITEM>
1964<NOTE_ITEM LABEL="fftshift(A,dim)">
1965In Matlab, <B>dim</B> can be greater than the number of dimensions of <B>A</B> but in Scilab you get an error message in this case. <B>mtlb_fftshift</B> can emulate this particularity in Scilab.
1966</NOTE_ITEM>
1967</NOTE>
1968<MATEX>
1969Y = fftshift('str')
1970Y = 'rst'
1971</MATEX>
1972<SCIEX>
1973Y = fftshift('str')
1974Y = 'str'
1975Y = mtlb_fftshift('str')
1976Y = 'rst'
1977</SCIEX>
1978</MATSCIFUN>
1979
1980<MATSCIFUN>
1981<MATNAME>fgetl</MATNAME>
1982<SCINAME>mgetl</SCINAME>
1983<DESCR>Read line(s) from file, discard newline character</DESCR>
1984<NOTE>
1985<P>
1986Matlab <B>fgetl</B> reads file line per line while Scilab <B>mgetl</B> allows to read the whole file.
1987</P>
1988<P>
1989Matlab <B>fgetl</B> returns <B>-1</B> if it could not read a line in file but Scilab <B>mgetl</B> returns an empty string is this case. You can used <B>meof</B> to check if End Of File has been reached.
1990</P>
1991</NOTE>
1992</MATSCIFUN>
1993
1994<MATSCIFUN>
1995<MATNAME>fgets</MATNAME>
1996<SCINAME>fgetstr</SCINAME>
1997<DESCR>Read line from file, keep newline character</DESCR>
1998<NOTE>
1999<P>
2000Input parameter order is inversed in Scilab compared to Matlab.
2001</P>
2002</NOTE>
2003<MATEX>
2004fgets(fid,n)
2005</MATEX>
2006<SCIEX>
2007fgetstr(n,fid)
2008</SCIEX>
2009</MATSCIFUN>
2010
2011<MATSCIFUN>
2012<MATNAME>fileparts</MATNAME>
2013<SCINAME>fileparts</SCINAME>
2014<DESCR>Return filename parts</DESCR>
2015<NOTE>
2016<P>
2017Scilab function does not get file version but Matlab one does.
2018</P>
2019<P>
2020Scilab function can take a second input parameter specifying the output value we want to get saying: "path", "fname" or "extension".
2021</P>
2022</NOTE>
2023</MATSCIFUN>
2024
2025<MATSCIFUN>
2026<MATNAME>filesep</MATNAME>
2027<SCINAME>No equivalent</SCINAME>
2028<DESCR>Return the directory separator for this platform</DESCR>
2029<NOTE>
2030<P>
2031There is no Scilab function equivalent to Matlab <B>filesep</B> but the same output can be obtained with <B>pathconvert("/")</B>.
2032</P>
2033</NOTE>
2034</MATSCIFUN>
2035
2036<MATSCIFUN>
2037<MATNAME>find</MATNAME>
2038<SCINAME>find</SCINAME>
2039<DESCR>Find indices and values of nonzero elements</DESCR>
2040<NOTE>
2041<P>
2042Matlab function can work with complex values what is not possible in Scilab, however, using <B>abs</B> it is very easy to have the same results.
2043</P>
2044<P>
2045Note that Scilab function can only return two output values and Matlab one can return a third value that can be computed according to the first two output matrices as explained in Matlab help.
2046</P>
2047<P>
2048For example, in <B>[i,j,v]=find(X)</B>, <B>v</B> is equal to: <B>X(i+(j-1))<MATH>*</MATH>size(X,1)</B>.
2049</P>
2050<P>
2051Another great difference between Scilab and Matlab is that Matlab returns column vectors of indices when X is a column vector or a matrix but Scilab always returns row vectors. For this kind of input, use matrix to get the same output value...what is done mtlb_find()
2052</P>
2053</NOTE>
2054</MATSCIFUN>
2055
2056<MATSCIFUN>
2057<MATNAME>findstr</MATNAME>
2058<SCINAME>No equivalent</SCINAME>
2059<DESCR>Find one string within another</DESCR>
2060<NOTE>
2061<P>
2062There is no equivalent for <B>findstr</B> in Scilab, but an emulation function has been written: <B>mtlb_findstr</B>. Scilab <B>strindex</B> function is very similar to <B>findstr</B> but do not consider the size of the strings passed as parameters. <B>strindex</B> can replace <B>findstr</B> only if <B>findstr</B> can be replaced by <B>strfind</B> in Matlab.
2063</P>
2064</NOTE>
2065</MATSCIFUN>
2066
2067<MATSCIFUN>
2068<MATNAME>fliplr(A)</MATNAME>
2069<SCINAME>A(:,$:-1:1)</SCINAME>
2070<DESCR>Flip matrix in left/right direction</DESCR>
2071<NOTE>
2072<P>
2073Due to the fact that Scilab and Matlab do not consider character string in the same way, result is different for this kind of input, in this case, use <B>mtlb_fliplr</B> instead.
2074</P>
2075</NOTE>
2076</MATSCIFUN>
2077
2078<MATSCIFUN>
2079<MATNAME>flipud(A)</MATNAME>
2080<SCINAME>A($:-1:1,:)</SCINAME>
2081<DESCR>Flip matrix in up/down direction</DESCR>
2082</MATSCIFUN>
2083
2084<MATSCIFUN>
2085<MATNAME>fopen</MATNAME>
2086<SCINAME>mopen</SCINAME>
2087<DESCR>Open a file or obtain information about open files</DESCR>
2088<NOTE>
2089<NOTE_ITEM LABEL="Access permission">
2090Matlab offers two permissions options not supported by Scilab: <B>W</B> and <B>A</B> (for tape drives)
2091</NOTE_ITEM>
2092<NOTE_ITEM LABEL="Input values">
2093In Matlab, <B>fopen('all')</B> lists all opened files, in Scilab, this type of call for <B>fopen</B> does not exist. You can also use <B>fopen</B> in Matlab to get informations on a file identifier (<B>fopen(fid)</B>), this case is not implemented in Scilab.
2094</NOTE_ITEM>
2095<NOTE_ITEM LABEL="Machine format">
2096Note that Scilab does not support machine format values as input or output.
2097</NOTE_ITEM>
2098<P>
2099Matlab <B>fopen</B> can return an error message but not Scilab <B>mopen</B>, moreover, returned file identifier is <B>-1</B> in case of error in Matlab but does not exist in this case in Scilab, so an emulation function has been written <B>mtlb_fopen</B>.
2100</P>
2101</NOTE>
2102</MATSCIFUN>
2103
2104<MATSCIFUN>
2105<MATNAME>format</MATNAME>
2106<SCINAME>format</SCINAME>
2107<DESCR>Control display format for output</DESCR>
2108<NOTE>
2109<P>
2110Some Matlab formats have no Scilab equivalent, see examples below.
2111</P>
2112</NOTE>
2113<MATEX>
2114format
2115format +
2116format bank
2117format compact
2118format hex
2119format long
2120format long e
2121format long g
2122format loose
2123format rat
2124format short
2125format short e
2126format short g
2127</MATEX>
2128<SCIEX>
2129format("v",6)
2130format(6)
2131No equivalent for: format "bank"
2132No equivalent for: format "compact"
2133No equivalent for: format "hex"
2134format(16)
2135format("e",16)
2136format("e",16)
2137No equivalent for: format "loose"
2138No equivalent for: format "rat"
2139format(6)
2140format("e",6)
2141format("e",6)
2142</SCIEX>
2143</MATSCIFUN>
2144
2145<MATSCIFUN>
2146<MATNAME>fprintf</MATNAME>
2147<SCINAME>No equivalent</SCINAME>
2148<DESCR>Write formatted data to file</DESCR>
2149<NOTE>
2150<P>
2151There is no equivalent function for Matlab <B>fprintf</B> in Scilab but an emulation function has been written: <B>mtlb_fprintf</B>. This function probably not allows all Matlab <B>fprintf</B> possibilities...
2152</P>
2153</NOTE>
2154</MATSCIFUN>
2155
2156<MATSCIFUN>
2157<MATNAME>fread</MATNAME>
2158<SCINAME>No equivalent</SCINAME>
2159<DESCR>Read binary data to a file</DESCR>
2160<NOTE>
2161<P>
2162There is no equivalent function for Matlab <B>fread</B> in Scilab but an emulation function has been written: <B>mtlb_fread</B>. This function probably not allows all Matlab <B>fread</B> possibilities (<B>skip</B> parameter is ignored...).
2163</P>
2164</NOTE>
2165</MATSCIFUN>
2166
2167<MATSCIFUN>
2168<MATNAME>frewind(fid)</MATNAME>
2169<SCINAME>mseek("0",fid)</SCINAME>
2170<DESCR>Move the file position indicator to the beginning of an open file</DESCR>
2171</MATSCIFUN>
2172
2173<MATSCIFUN>
2174<MATNAME>fscanf</MATNAME>
2175<SCINAME>No equivalent</SCINAME>
2176<DESCR>Read formatted data to file</DESCR>
2177<NOTE>
2178<P>
2179There is no equivalent function for Matlab <B>fscanf</B> in Scilab but an emulation function has been written: <B>mtlb_fscanf</B>. This function probably not allows all Matlab <B>fscanf</B> possibilities...
2180</P>
2181</NOTE>
2182</MATSCIFUN>
2183
2184<MATSCIFUN>
2185<MATNAME>fseek</MATNAME>
2186<SCINAME>mseek</SCINAME>
2187<DESCR>Set file position indicator</DESCR>
2188<NOTE>
2189<P>
2190Scilab and Matlab functions differ by the flag which indicate the origin of the position indicator, see examples below. Note that order of input value is different...
2191</P>
2192</NOTE>
2193<MATEX>
2194File beginning:
2195fseek(fid,offset,'bof')
2196fseek(fid,offset,-1)
2197Current position:
2198fseek(fid,offset,'cof')
2199fseek(fid,offset,0)
2200File end:
2201fseek(fid,offset,'eof')
2202fseek(fid,offset,1)
2203</MATEX>
2204<SCIEX>
2205File beginning:
2206fseek(offset,fid,"set")
2207Current position:
2208fseek(offset,fid,"cur")
2209File end:
2210fseek(offset,fid,"end")
2211</SCIEX>
2212</MATSCIFUN>
2213
2214<MATSCIFUN>
2215<MATNAME>ftell</MATNAME>
2216<SCINAME>mtell</SCINAME>
2217<DESCR>Get file position indicator</DESCR>
2218</MATSCIFUN>
2219
2220<MATSCIFUN>
2221<MATNAME>full</MATNAME>
2222<SCINAME>full</SCINAME>
2223<DESCR>Convert sparse matrix to full matrix</DESCR>
2224</MATSCIFUN>
2225
2226<MATSCIFUN>
2227<MATNAME>fullfile</MATNAME>
2228<SCINAME>fullfile</SCINAME>
2229<DESCR>Build a full filename from parts</DESCR>
2230</MATSCIFUN>
2231
2232<MATSCIFUN>
2233<MATNAME>fwrite</MATNAME>
2234<SCINAME>No equivalent</SCINAME>
2235<DESCR>Write binary data to a file</DESCR>
2236<NOTE>
2237<P>
2238There is no equivalent function for Matlab <B>fwrite</B> in Scilab but an emulation function has been written: <B>mtlb_fwrite</B>. This function probably not allows all Matlab <B>fwrite</B> possibilities (<B>skip</B> parameter is ignored...).
2239</P>
2240</NOTE>
2241</MATSCIFUN>
2242
2243<MATSCIFUN>
2244<MATNAME>getenv</MATNAME>
2245<SCINAME>getenv</SCINAME>
2246<DESCR>Get environment variable</DESCR>
2247<NOTE>
2248<P>
2249Scilab <B>getenv</B> allows to set the string that will be returned if environment variable we want to get does not exist, but not Matlab function.
2250</P>
2251</NOTE>
2252</MATSCIFUN>
2253
2254<MATSCIFUN>
2255<MATNAME>global</MATNAME>
2256<SCINAME>global</SCINAME>
2257<DESCR>Define a global variable</DESCR>
2258</MATSCIFUN>
2259
2260<MATSCIFUN>
2261<MATNAME>graymon</MATNAME>
2262<SCINAME>No equivalent</SCINAME>
2263<DESCR>Set graphics defaults for gray-scale monitors</DESCR>
2264<NOTE>
2265<P>This Matlab function can be replaced in Scilab by: <B>set(gdf(),"color_map",[0.75,0.5,0.25]'*ones(1,3))</B>.</P>
2266</NOTE>
2267</MATSCIFUN>
2268
2269<MATSCIFUN>
2270<MATNAME>grid</MATNAME>
2271<SCINAME>No equivalent</SCINAME>
2272<DESCR>Grid lines for two- and three-dimensional plots</DESCR>
2273<NOTE>
2274<P>
2275There is no minor grid in Scilab.
2276</P>
2277<P>
2278There is no equivalent function for Matlab <B>grid</B> function in Scilab but it has equivalents:
2279</P>
2280<NOTE_ITEM LABEL="grid on"> may be replaced by <B>set(gca(),"grid",[1 1])</B>
2281</NOTE_ITEM>
2282<NOTE_ITEM LABEL="grid off"> may be replaced by <B>set(gca(),"auto_clear",[-1 -1])</B>
2283</NOTE_ITEM>
2284<NOTE_ITEM LABEL="grid minor"> can be emuled in Scilab by <B>mtlb_hold</B> but all grids are toggled
2285</NOTE_ITEM>
2286<NOTE_ITEM LABEL="grid"> can be emuled in Scilab by <B>mtlb_hold</B>
2287</NOTE_ITEM>
2288<NOTE_ITEM LABEL="grid(axes_handle,'on')"> may be replaced by <B>axes_handle.grid=[1 1]</B>
2289</NOTE_ITEM>
2290<NOTE_ITEM LABEL="grid(axes_handle,'off')"> may be replaced by <B>axes_handle.grid=[-1 -1]</B>
2291</NOTE_ITEM>
2292<NOTE_ITEM LABEL="grid(axes_handle,'minor')"> can be emuled in Scilab by <B>mtlb_hold</B> but all grids are toggled
2293</NOTE_ITEM>
2294<NOTE_ITEM LABEL="grid(axes_handle)"> can be emuled in Scilab by <B>mtlb_hold(axes_handle)</B>
2295</NOTE_ITEM>
2296</NOTE>
2297</MATSCIFUN>
2298
2299<MATSCIFUN>
2300<MATNAME>hankel</MATNAME>
2301<SCINAME>hank</SCINAME>
2302<DESCR>Hankel matrix</DESCR>
2303<NOTE>
2304<P>
2305The main difference between Scilab and Matlab function is that they do not use the same input values to build an Hankel matrix. If in Matlab, you just have to give a column vector (and eventually a row vector), Scilab function requires the size of the Hankel matrix to build and a covariance sequence vector for this matrix. (See syntax below)
2306</P>
2307</NOTE>
2308<MATEX>
2309H1 = hankel(C1)
2310H2 = hankel(C2,R2)
2311</MATEX>
2312<SCIEX>
2313N1 = size(C1,"*");
2314COV1 = [matrix(C1,1,-1),zeros(1,N1)];
2315H1 = hank(N1,N1,COV1);
2316M2 = size(C2,"*");
2317N2 = size(R2,"*");
2318COV2 = [matrix(C2,1,-1),matrix(R2(2:$),1,-1)];
2319H2 = hank(M2,N2,COV2);
2320</SCIEX>
2321</MATSCIFUN>
2322
2323<MATSCIFUN>
2324<MATNAME>help</MATNAME>
2325<SCINAME>help</SCINAME>
2326<DESCR>Display help</DESCR>
2327<NOTE>
2328<P>
2329In Scilab you can not get help on a toolbox, only on a function...
2330</P>
2331<P>
2332Scilab equivalent for Matlab <B>help syntax</B> is <B>help("names")</B>.
2333</P>
2334</NOTE>
2335</MATSCIFUN>
2336
2337<MATSCIFUN>
2338<MATNAME>helpbrowser</MATNAME>
2339<SCINAME>help</SCINAME>
2340<DESCR>Display Help browser for access to full online documentation</DESCR>
2341</MATSCIFUN>
2342
2343<MATSCIFUN>
2344<MATNAME>helpdesk</MATNAME>
2345<SCINAME>help</SCINAME>
2346<DESCR>Display Help browser</DESCR>
2347</MATSCIFUN>
2348
2349<MATSCIFUN>
2350<MATNAME>helpwin</MATNAME>
2351<SCINAME>help</SCINAME>
2352<DESCR>Provide access to and display help for all functions</DESCR>
2353</MATSCIFUN>
2354
2355<MATSCIFUN>
2356<MATNAME>hess</MATNAME>
2357<SCINAME>hess</SCINAME>
2358<DESCR>Hessenberg form of a matrix</DESCR>
2359</MATSCIFUN>
2360
2361<MATSCIFUN>
2362<MATNAME>hold</MATNAME>
2363<SCINAME>No equivalent</SCINAME>
2364<DESCR>Hold current graph</DESCR>
2365<NOTE>
2366<P>
2367There is no equivalent function for Matlab <B>hold</B> function in Scilab but it has equivalents:
2368</P>
2369<NOTE_ITEM LABEL="hold on"> may be replaced by <B>set(gca(),"auto_clear","off")</B>
2370</NOTE_ITEM>
2371<NOTE_ITEM LABEL="hold off"> may be replaced by <B>set(gca(),"auto_clear","on")</B>
2372</NOTE_ITEM>
2373<NOTE_ITEM LABEL="hold"> can be emuled in Scilab by <B>mtlb_hold</B>
2374</NOTE_ITEM>
2375</NOTE>
2376</MATSCIFUN>
2377
2378<MATSCIFUN>
2379<MATNAME>home</MATNAME>
2380<SCINAME>tohome</SCINAME>
2381<DESCR>Move the cursor to the upper left corner of the Command Window</DESCR>
2382<NOTE>
2383<P>
2384Note that Matlab function has no effect in no window mode under Unix/Linux while Scilab one clears the terminal display as if you were using "clear" command.
2385</P>
2386</NOTE>
2387</MATSCIFUN>
2388
2389<MATSCIFUN>
2390<MATNAME>horzcat</MATNAME>
2391<SCINAME>No equivalent</SCINAME>
2392<DESCR>Horizontal concatenation</DESCR>
2393<NOTE>
2394<P>
2395Scilab equivalent for Matlab <B>horzcat(A1,A2,...,An)</B> is <B>[A1,A2,...,An]</B> if all <B>Ai</B> are not character strings, else, Scilab equivalent is <B>A1+A2+...+An</B>.
2396</P>
2397</NOTE>
2398</MATSCIFUN>
2399
2400<MATSCIFUN>
2401<MATNAME>ifft(A[,...])</MATNAME>
2402<SCINAME>fft(A,1[,...])</SCINAME>
2403<DESCR>Inverse discrete Fourier transform</DESCR>
2404<NOTE>
2405<NOTE_ITEM LABEL="Y = ifft(X)">If X is a vector then Scilab equivalent for Matlab <B>ifft(X)</B> is <B>fft(X,1)</B>. If <B>X</B> is a matrix then Scilab equivalent for Matlab <B>ifft(X)</B> is <B>fft(X,1,2,1)</B>.
2406</NOTE_ITEM>
2407<NOTE_ITEM LABEL="Y = ifft(X,n) / Y = ifft(X,n,dim) / Y = ifft(X,[],dim)">There is no Scilab equivalent for all these Matlab uses of <B>ifft</B>, in these cases, use <B>mtlb_ifft</B> instead.
2408</NOTE_ITEM>
2409</NOTE>
2410</MATSCIFUN>
2411
2412<MATSCIFUN>
2413<MATNAME>input</MATNAME>
2414<SCINAME>input</SCINAME>
2415<DESCR>Request user input</DESCR>
2416</MATSCIFUN>
2417
2418<MATSCIFUN>
2419<MATNAME>isa</MATNAME>
2420<SCINAME>No equivalent</SCINAME>
2421<DESCR>Detect an object of a given type</DESCR>
2422<NOTE>
2423<P>
2424There is no equivalent function for Matlab <B>isa</B> function in Scilab but it can be replaced by equivalent syntaxes as shown is examples.
2425</P>
2426</NOTE>
2427<MATEX>
2428a = isa(x,'logical')
2429b = isa(x,'char')
2430c = isa(x,'numeric')
2431d = isa(x,'int8')
2432e = isa(x,'uint8')
2433f = isa(x,'int16')
2434g = isa(x,'uint16')
2435h = isa(x,'int32')
2436k = isa(x,'uint32')
2437l = isa(x,'single')
2438m = isa(x,'double')
2439n = isa(x,'cell')
2440o = isa(x,'struct')
2441p = isa(x,'function_handle')
2442q = isa(x,'sparse')
2443r = isa(x,'lti')
2444</MATEX>
2445<SCIEX>
2446a = type(x)==4;
2447b = type(x)==10;
2448c = or(type(x)==[1,5,8]);
2449d = typeof(x)=="int8";
2450e = typeof(x)=="uint8";
2451f = typeof(x)=="int16";
2452g = typeof(x)=="uint16";
2453h = typeof(x)=="int32";
2454k = typeof(x)=="uint32";
2455l = type(x)==1;
2456m = type(x)==1;
2457n = typeof(x)=="ce";
2458o = typeof(x)=="st";
2459p = type(x)==13;
2460q = type(x)==5;
2461r = typeof(x)=="state-space";
2462</SCIEX>
2463</MATSCIFUN>
2464
2465<MATSCIFUN>
2466<MATNAME>iscell(A)</MATNAME>
2467<SCINAME>typeof(A)=="ce"</SCINAME>
2468<DESCR>Determine if input is a cell array</DESCR>
2469</MATSCIFUN>
2470
2471<MATSCIFUN>
2472<MATNAME>ischar(A)</MATNAME>
2473<SCINAME>type(A)==10</SCINAME>
2474<DESCR>Determine if item is a character array</DESCR>
2475</MATSCIFUN>
2476
2477<MATSCIFUN>
2478<MATNAME>isdir</MATNAME>
2479<SCINAME>isdir</SCINAME>
2480<DESCR>Determine if item is a directory</DESCR>
2481</MATSCIFUN>
2482
2483<MATSCIFUN>
2484<MATNAME>isempty</MATNAME>
2485<SCINAME>isempty</SCINAME>
2486<DESCR>True for empty matrix</DESCR>
2487</MATSCIFUN>
2488
2489<MATSCIFUN>
2490<MATNAME>isequal</MATNAME>
2491<SCINAME>isequal</SCINAME>
2492<DESCR>Determine if arrays are numerically equal</DESCR>
2493<NOTE>
2494<P>
2495In Scilab, struct fields must be in the same order so that structs can be equal but not in Matlab.
2496</P>
2497</NOTE>
2498</MATSCIFUN>
2499
2500<MATSCIFUN>
2501<MATNAME>isfield</MATNAME>
2502<SCINAME>No equivalent</SCINAME>
2503<DESCR>Determine if input is a structure array field</DESCR>
2504<NOTE>
2505<P>
2506There is no Scilab equivalent function for Matlab <B>tf=isfield(A,field)</B> but there are equivalent instructions:
2507</P>
2508<NOTE_ITEM LABEL="If A is not a structure and/or field is not a character string">
2509Scilab equivalent is <B>%F</B>.
2510</NOTE_ITEM>
2511<NOTE_ITEM LABEL="If A is a structure and field is a character string">
2512Scilab equivalent is <B>allfields=getfield(1,A);tf=or(allfields(3:$)==field);</B>.
2513</NOTE_ITEM>
2514</NOTE>
2515</MATSCIFUN>
2516
2517<MATSCIFUN>
2518<MATNAME>isfinite</MATNAME>
2519<SCINAME>No equivalent</SCINAME>
2520<DESCR>True for finite elements</DESCR>
2521<NOTE>
2522<P>
2523There is no equivalent function for Matlab <B>isfinite</B> function in Scilab but it can be emuled by: <B>abs(A)<MATH>&lt;</MATH>%Inf</B>
2524</P>
2525</NOTE>
2526</MATSCIFUN>
2527
2528<MATSCIFUN>
2529<MATNAME>isglobal</MATNAME>
2530<SCINAME>isglobal</SCINAME>
2531<DESCR>Determine if item is a global variable</DESCR>
2532</MATSCIFUN>
2533
2534<MATSCIFUN>
2535<MATNAME>ishandle(A)</MATNAME>
2536<SCINAME>type(A)==9</SCINAME>
2537<DESCR>Determines if values are valid graphics object handles</DESCR>
2538</MATSCIFUN>
2539
2540<MATSCIFUN>
2541<MATNAME>ishold</MATNAME>
2542<SCINAME>No equivalent</SCINAME>
2543<DESCR>Return hold state</DESCR>
2544<NOTE>
2545<P>
2546There is no equivalent function for Matlab <B>ishold</B> function in Scilab but it can be emuled by: <B>get(gca(),"auto_clear")=="off";</B>.
2547</P>
2548</NOTE>
2549</MATSCIFUN>
2550
2551<MATSCIFUN>
2552<MATNAME>isinf</MATNAME>
2553<SCINAME>isinf</SCINAME>
2554<DESCR>True for infinite elements</DESCR>
2555</MATSCIFUN>
2556
2557<MATSCIFUN>
2558<MATNAME>isinteger(A)</MATNAME>
2559<SCINAME>type(A)==8</SCINAME>
2560<DESCR>Detect whether an array has integer data type</DESCR>
2561</MATSCIFUN>
2562
2563<MATSCIFUN>
2564<MATNAME>isletter</MATNAME>
2565<SCINAME>No equivalent</SCINAME>
2566<DESCR>True for letters of the alphabet</DESCR>
2567<NOTE>
2568<P>
2569There is no equivalent function to Matlab <B>isletter</B> function in Scilab. However it can be replaced as follows. Using <B>mtlb_isletter</B> will give a prettier code.
2570</P>
2571</NOTE>
2572<MATEX>
2573tf = isletter(A)
2574</MATEX>
2575<SCIEX>
2576If A is a String matrix:
2577tf = ((asciimat(A)<MATH>&gt;=</MATH>65) &amp; (asciimat(A)<MATH>&lt;=</MATH>90)) <MATH>|</MATH> ((asciimat(A)<MATH>&gt;=</MATH>97) &amp; (asciimat(A)<MATH>&lt;=</MATH>122))
2578If A is not a String matrix:
2579tf = zeros(A)
2580</SCIEX>
2581</MATSCIFUN>
2582
2583<MATSCIFUN>
2584<MATNAME>islogical(A)</MATNAME>
2585<SCINAME>No equivalent</SCINAME>
2586<DESCR>Determine if item is a logical array</DESCR>
2587<NOTE>
2588<P>
2589There is no equivalent function for Matlab <B>islogical</B> function in Scilab but it can be emuled by: <B>or(type(A)==[4,6])</B>.
2590</P>
2591</NOTE>
2592</MATSCIFUN>
2593
2594<MATSCIFUN>
2595<MATNAME>isnan</MATNAME>
2596<SCINAME>isnan</SCINAME>
2597<DESCR>Detect NaN elements of an array</DESCR>
2598</MATSCIFUN>
2599
2600<MATSCIFUN>
2601<MATNAME>isnumeric(A)</MATNAME>
2602<SCINAME>No equivalent</SCINAME>
2603<DESCR>Determine if input is a numeric array</DESCR>
2604<NOTE>
2605<P>
2606There is no equivalent function for Matlab <B>isnumeric</B> function in Scilab but it can be emuled by: <B>or(type(A)==[1 5 8])</B>.
2607</P>
2608</NOTE>
2609</MATSCIFUN>
2610
2611<MATSCIFUN>
2612<MATNAME>ispc</MATNAME>
2613<SCINAME>MSDOS</SCINAME>
2614<DESCR>Determine if PC (Windows) version</DESCR>
2615</MATSCIFUN>
2616
2617<MATSCIFUN>
2618<MATNAME>isreal</MATNAME>
2619<SCINAME>isreal</SCINAME>
2620<DESCR>Determine if all array elements are real numbers</DESCR>
2621<NOTE>
2622<P>
2623Scilab <B>isreal</B> function can take two values as input. The first one is the same as Matlab one and the second allows to give a tolerance on the absolute value of the imaginary part of first input. So to have the same results in Matlab and in Scilab, second input in Scilab function must be set to 0.
2624</P>
2625</NOTE>
2626<MATEX>
2627tf = isreal(1+0i)
2628tf = 1
2629</MATEX>
2630<SCIEX>
2631tf = isreal(1+0*%i)
2632tf = %F
2633tf = isreal(1+0*%i,0)
2634tf = %T
2635</SCIEX>
2636</MATSCIFUN>
2637
2638<MATSCIFUN>
2639<MATNAME>isscalar(A)</MATNAME>
2640<SCINAME>sum(length(A))==1</SCINAME>
2641<DESCR>Determine if input is scalar</DESCR>
2642</MATSCIFUN>
2643
2644<MATSCIFUN>
2645<MATNAME>isspace</MATNAME>
2646<SCINAME>No equivalent</SCINAME>
2647<DESCR>Detect elements that are ASCII white spaces</DESCR>
2648<NOTE>
2649<P>
2650There is no equivalent function to Matlab <B>isspace</B> function in Scilab. However it can be replaced as shown below.
2651</P>
2652</NOTE>
2653<MATEX>
2654tf = isspace(A)
2655</MATEX>
2656<SCIEX>
2657If A is a String matrix:
2658tf = asciimat(A)==32
2659If A is not a String matrix:
2660tf = zeros(A)
2661</SCIEX>
2662</MATSCIFUN>
2663
2664<MATSCIFUN>
2665<MATNAME>issparse(S)</MATNAME>
2666<SCINAME>No equivalent</SCINAME>
2667<DESCR>Test if matrix is sparse</DESCR>
2668<NOTE>
2669<P>
2670There is no equivalent function for Matlab <B>issparse</B> function in Scilab but it can be emuled by: <B>or(type(S)==[5,6])</B>.
2671</P>
2672</NOTE>
2673</MATSCIFUN>
2674
2675<MATSCIFUN>
2676<MATNAME>isstr(A)</MATNAME>
2677<SCINAME>type(A)==10</SCINAME>
2678<DESCR>Determine if item is a character array</DESCR>
2679</MATSCIFUN>
2680
2681<MATSCIFUN>
2682<MATNAME>isstruct(A)</MATNAME>
2683<SCINAME>typeof(A)=="st"</SCINAME>
2684<DESCR>Determine if input is a structure array</DESCR>
2685</MATSCIFUN>
2686
2687<MATSCIFUN>
2688<MATNAME>isunix</MATNAME>
2689<SCINAME>~MSDOS</SCINAME>
2690<DESCR>Determine if Unix version</DESCR>
2691</MATSCIFUN>
2692
2693<MATSCIFUN>
2694<MATNAME>isvector</MATNAME>
2695<SCINAME>No equivalent</SCINAME>
2696<DESCR>Determine if input is a vector</DESCR>
2697<NOTE>
2698<P>
2699There is no Scilab equivalent function for Matlab <B>tf=isvector(A)</B> but there are equivalent instructions:
2700</P>
2701<NOTE_ITEM LABEL="If A is not a character string">
2702Scilab equivalent is <B>tf = size(A,1)==1 | size(A,2)==1</B>.
2703</NOTE_ITEM>
2704<NOTE_ITEM LABEL="If A is a character string">
2705Scilab equivalent is <B>tf = size(asciimat(A),1)==1 | size(asciimat(A),2)==1</B>.
2706</NOTE_ITEM>
2707</NOTE>
2708</MATSCIFUN>
2709
2710<MATSCIFUN>
2711<MATNAME>keyboard</MATNAME>
2712<SCINAME>pause</SCINAME>
2713<DESCR>Invoke the keyboard in a file</DESCR>
2714</MATSCIFUN>
2715
2716<MATSCIFUN>
2717<MATNAME>kron(A,B)</MATNAME>
2718<SCINAME>A .*. B</SCINAME>
2719<DESCR>Kronecker tensor product</DESCR>
2720</MATSCIFUN>
2721
2722<MATSCIFUN>
2723<MATNAME>length(A)</MATNAME>
2724<SCINAME>No equivalent</SCINAME>
2725<DESCR>Length of vector</DESCR>
2726<NOTE>
2727<P>
2728If <B>A</B> is a vector, Scilab equivalent for <B>length(A)</B> is <B>size(A,"*")</B>.
2729</P>
2730<P>
2731If <B>A</B> is a matrix, Scilab equivalent for <B>length(A)</B> is <B>max(size(A))</B>.
2732</P>
2733<P>
2734If <B>A</B> contains character strings, String matrix has to be converted to a "character" string matrix using <B>mstr2sci</B> (Using <B>asciimat</B> to convert will give the same result).
2735</P>
2736<P>
2737Scilab <B>length</B> is different from Matlab <B>length</B>.
2738</P>
2739</NOTE>
2740</MATSCIFUN>
2741
2742<MATSCIFUN>
2743<MATNAME>linspace</MATNAME>
2744<SCINAME>linspace</SCINAME>
2745<DESCR>Linearly spaced vector</DESCR>
2746<NOTE>
2747<P>
2748When <B>A</B> and/or <B>B</B> is a String in Matlab, <B>linspace(A,B[,n])</B> returns a String matrix, in Scilab, it can be made with <B>ascii(linspace(ascii(A),ascii(B),n))</B>.
2749</P>
2750</NOTE>
2751</MATSCIFUN>
2752
2753<MATSCIFUN>
2754<MATNAME>load</MATNAME>
2755<SCINAME>loadmatfile</SCINAME>
2756<DESCR>Load workspace variables from disk</DESCR>
2757<NOTE>
2758<P>
2759Scilab <B>loadmatfile</B> does not handle option <B>-regexp</B> yet.
2760</P>
2761</NOTE>
2762</MATSCIFUN>
2763
2764<MATSCIFUN>
2765<MATNAME>log2</MATNAME>
2766<SCINAME>log2 |-| frexp</SCINAME>
2767<DESCR>Base 2 logarithm and dissect floating point number</DESCR>
2768<NOTE>
2769<P>
2770Scilab <B>log2</B> is equivalent to Matlab <B>log2</B> for logarithm computation, but for floating point number dissection, Scilab equivalent to Matlab <B>log2</B> is <B>frexp</B>.
2771</P>
2772</NOTE>
2773</MATSCIFUN>
2774
2775<MATSCIFUN>
2776<MATNAME>logical(A)</MATNAME>
2777<SCINAME>No equivalent</SCINAME>
2778<DESCR>Convert numeric values to logical</DESCR>
2779<NOTE>
2780<P>
2781If <B>A</B> is not an empty matrix, Scilab equivalent for <B>logical(A)</B> is is not equal to <B>0</B> else Scilab equivalent is <B>[]</B>.
2782</P>
2783</NOTE>
2784</MATSCIFUN>
2785
2786<MATSCIFUN>
2787<MATNAME>lookfor</MATNAME>
2788<SCINAME>apropos</SCINAME>
2789<DESCR>Search for specified keyword in all help entries</DESCR>
2790<NOTE>
2791<P>
2792No Scilab equivalent for Matlab <B>-all</B> option.
2793</P>
2794</NOTE>
2795</MATSCIFUN>
2796
2797<MATSCIFUN>
2798<MATNAME>lu</MATNAME>
2799<SCINAME>lu</SCINAME>
2800<DESCR>LU matrix factorization</DESCR>
2801<NOTE>
2802<P>
2803There is no Scilab equivalent for Matlab <B>lu</B> when called with 1 or 4 outputs or with 2 inputs.
2804</P>
2805</NOTE>
2806</MATSCIFUN>
2807
2808<MATSCIFUN>
2809<MATNAME>mkdir</MATNAME>
2810<SCINAME>mkdir</SCINAME>
2811<DESCR></DESCR>
2812<NOTE>
2813<P>
2814Scilab <B>mkdir</B> returns 1 or 2 values but Matlab one can return up to three values (third output is a Matlab messageid).
2815</P>
2816</NOTE>
2817</MATSCIFUN>
2818
2819<MATSCIFUN>
2820<MATNAME>mod</MATNAME>
2821<SCINAME>pmodulo</SCINAME>
2822<DESCR>Modulus after division</DESCR>
2823<NOTE>
2824<P>
2825Scilab <B>pmodulo</B> can work with Complex values what Matlab <B>mod</B> can not.
2826</P>
2827</NOTE>
2828</MATSCIFUN>
2829
2830<MATSCIFUN>
2831<MATNAME>more</MATNAME>
2832<SCINAME>lines</SCINAME>
2833<DESCR>Display Command Window output one screenful at a time</DESCR>
2834<NOTE>
2835See examples.
2836</NOTE>
2837<MATEX>
2838more off
2839more on
2840more(30)
2841</MATEX>
2842<SCIEX>
2843lines(0)
2844lines(60)
2845lines(30)
2846</SCIEX>
2847</MATSCIFUN>
2848
2849<MATSCIFUN>
2850<MATNAME>ndims</MATNAME>
2851<SCINAME>No equivalent</SCINAME>
2852<DESCR>Number of array dimensions</DESCR>
2853<NOTE>
2854<P>
2855There is no Scilab equivalent function for <B>ndims(A)</B> but it can be emuled by: <B>size(size(A),"*")</B>
2856</P>
2857</NOTE>
2858</MATSCIFUN>
2859
2860<MATSCIFUN>
2861<MATNAME>norm</MATNAME>
2862<SCINAME>norm</SCINAME>
2863<DESCR>Vector and matrix norms</DESCR>
2864</MATSCIFUN>
2865
2866<MATSCIFUN>
2867<MATNAME>num2str</MATNAME>
2868<SCINAME>string |-| msprintf</SCINAME>
2869<DESCR>Number to string conversion</DESCR>
2870<NOTE>
2871<NOTE_ITEM LABEL="num2str(a,precision)">
2872There is no Scilab equivalent for this Matlab expression.
2873</NOTE_ITEM>
2874<NOTE_ITEM LABEL="num2str(a,format)">
2875Scilab equivalent for Matlab <B>num2str(a,format)</B> is <B>msprintf(format,a)</B>.
2876</NOTE_ITEM>
2877</NOTE>
2878</MATSCIFUN>
2879
2880<MATSCIFUN>
2881<MATNAME>pause</MATNAME>
2882<SCINAME>xpause |-| halt</SCINAME>
2883<DESCR>Halt execution temporarily</DESCR>
2884<NOTE>
2885<P>
2886Scilab equivalent for Matlab <B>pause(n)</B> is <B>xpause(1000*n)</B>.
2887</P>
2888<NOTE_ITEM LABEL="pause |-| halt()">
2889Scilab halt() and Matlab pause are equivalents.
2890</NOTE_ITEM>
2891<NOTE_ITEM LABEL="pause on/off">
2892There is no Scilab equivalent for Matlab <B>pause</B> on or <B>pause off</B>
2893</NOTE_ITEM>
2894</NOTE>
2895</MATSCIFUN>
2896
2897<MATSCIFUN>
2898<MATNAME>permute</MATNAME>
2899<SCINAME>permute</SCINAME>
2900<DESCR>Permute the dimensions of an array</DESCR>
2901</MATSCIFUN>
2902
2903<MATSCIFUN>
2904<MATNAME>pie</MATNAME>
2905<SCINAME>pie</SCINAME>
2906<DESCR>circular graphic</DESCR>
2907</MATSCIFUN>
2908
2909<MATSCIFUN>
2910<MATNAME>plot</MATNAME>
2911<SCINAME>plot</SCINAME>
2912<DESCR>Linear 2-D plot</DESCR>
2913<NOTE>
2914<P>
2915Scilab <B>plot</B> doesn't accept all the properties of the Matlab <B>plot</B>
2916</P>
2917</NOTE>
2918</MATSCIFUN>
2919
2920<MATSCIFUN>
2921<MATNAME>pow2</MATNAME>
2922<SCINAME>No equivalent</SCINAME>
2923<DESCR>Base 2 power and scale floating-point numbers</DESCR>
2924<NOTE>
2925<NOTE_ITEM LABEL="X=pow2(Y)">
2926There is not equivalent function for <B>pow2</B> in Scilab but, when called with one input argument it can be emulated by: <B>2<MATH>^</MATH> Y</B>
2927</NOTE_ITEM>
2928<NOTE_ITEM LABEL="X=pow2(F,E)">
2929In this case, Matlab <B>pow2()</B> ignores imaginary part of input arguments. An equivalent expression for this use of <B>pow2</B> is: <B>F.<MATH>*</MATH> 2 .<MATH>^</MATH> E </B>(Note that 2 must be preceeded and followed by a white space).
2930</NOTE_ITEM>
2931</NOTE>
2932</MATSCIFUN>
2933
2934<MATSCIFUN>
2935<MATNAME>qr</MATNAME>
2936<SCINAME>qr</SCINAME>
2937<DESCR>Orthogonal-triangular decomposition</DESCR>
2938<NOTE>
2939<P>
2940When used with two input values and tree output values, Scilab and Matlab <B>qr</B> results can differ. Use <B>mtlb_qr</B> instead.
2941</P>
2942</NOTE>
2943</MATSCIFUN>
2944
2945<MATSCIFUN>
2946<MATNAME>quit</MATNAME>
2947<SCINAME>quit</SCINAME>
2948<DESCR>Terminate session</DESCR>
2949</MATSCIFUN>
2950
2951<MATSCIFUN>
2952<MATNAME>realmin</MATNAME>
2953<SCINAME>number_properties("tiny")</SCINAME>
2954<DESCR>Smallest positive floating-point number</DESCR>
2955<NOTE>
2956<P>
2957There is no Scilab equivalent for Matlab <B>realmin('single')</B>.
2958</P>
2959</NOTE>
2960</MATSCIFUN>
2961
2962<MATSCIFUN>
2963<MATNAME>realmax</MATNAME>
2964<SCINAME>number_properties("huge")</SCINAME>
2965<DESCR>Largest positive floating-point number</DESCR>
2966<NOTE>
2967<P>
2968There is no Scilab equivalent for Matlab <B>realmax('single')</B>.
2969</P>
2970</NOTE>
2971</MATSCIFUN>
2972
2973<MATSCIFUN>
2974<MATNAME>rcond</MATNAME>
2975<SCINAME>rcond</SCINAME>
2976<DESCR>Matrix reciprocal condition number estimate</DESCR>
2977<NOTE>
2978<P>
2979Scilab and Matlab values differ for empty matrix.
2980</P>
2981</NOTE>
2982<MATEX>
2983c = rcond([])
2984c = Inf
2985</MATEX>
2986<SCIEX>
2987c = rcond([])
2988c = []
2989</SCIEX>
2990</MATSCIFUN>
2991
2992<MATSCIFUN>
2993<MATNAME>rem(X,Y)</MATNAME>
2994<SCINAME>X-fix(X./Y).<MATH>*</MATH>Y</SCINAME>
2995<DESCR>Remainder after division</DESCR>
2996</MATSCIFUN>
2997
2998<MATSCIFUN>
2999<MATNAME>repmat</MATNAME>
3000<SCINAME>No equivalent</SCINAME>
3001<DESCR>Replicate and tile an array</DESCR>
3002<NOTE>
3003<P>
3004There is no Scilab equivalent function for Matlab <B>repmat</B> but it can be replaced by the following expressions (considering <B>m</B> and <B>n</B> being real values):
3005</P>
3006<NOTE_ITEM LABEL="repmat(A,m) with m a scalar">
3007can be replaced by <B>ones(m,m).*.A</B> if <B>A</B> is of Double type, by <B>ones(m,m).*.bool2s(A)</B> if <B>A</B> is of Boolean type and by <B>asciimat(ones(m,m).*.asciimat(A)</B> if <B>A</B> is of String type
3008</NOTE_ITEM>
3009<NOTE_ITEM LABEL="repmat(A,m) with m a vector">
3010can be replaced by <B>ones(m(1),m(2),...).*.A</B> is of Double type, by <B>ones(m(1),m(2),...).*.bool2s(A)</B> if <B>A</B> is of Boolean type and by <B>asciimat(ones(m(1),m(2),...).*.asciimat(A)</B> if <B>A</B> is of String type
3011</NOTE_ITEM>
3012<NOTE_ITEM LABEL="repmat(A,m,n)">
3013can be replaced by <B>ones(m,n).*.A</B> if <B>A</B> is of Double type, by <B>ones(m,n).*.bool2s(A)</B> if <B>A</B> is of Boolean type and by <B>asciimat(ones(m,n).*.asciimat(A)</B> if <B>A</B> is of String type
3014</NOTE_ITEM>
3015</NOTE>
3016</MATSCIFUN>
3017
3018<MATSCIFUN>
3019<MATNAME>reshape</MATNAME>
3020<SCINAME>matrix</SCINAME>
3021<DESCR>Reshape array</DESCR>
3022<NOTE>
3023<P>
3024To get the same result for character string matrices in Scilab than in Matlab, convert Scilab character string matrices using <B>mstr2sci</B>.
3025</P>
3026<P>
3027All unspecified dimensions are represented by a <B>[]</B> input in Matlab while in Scilab they are given by a <B>-1</B>.
3028</P>
3029<P>
3030Matlab <B>reshape</B> suppresses singleton higher dimension, it is not the case for <B>matrix</B> in Scilab...
3031</P>
3032</NOTE>
3033</MATSCIFUN>
3034
3035<MATSCIFUN>
3036<MATNAME>return</MATNAME>
3037<SCINAME>return</SCINAME>
3038<DESCR>Return to the invoking function</DESCR>
3039</MATSCIFUN>
3040
3041<MATSCIFUN>
3042<MATNAME>save</MATNAME>
3043<SCINAME>mtlb_save</SCINAME>
3044<DESCR>Save workspace variables from disk</DESCR>
3045<NOTE>
3046<P>
3047Scilab <B>mtlb_save</B> does not handle options <B>-v4</B> <B>-mat</B> and <B>-append</B> yet.
3048</P>
3049</NOTE>
3050</MATSCIFUN>
3051
3052<MATSCIFUN>
3053<MATNAME>schur</MATNAME>
3054<SCINAME>schur</SCINAME>
3055<DESCR>Schur decomposition</DESCR>
3056</MATSCIFUN>
3057
3058<MATSCIFUN>
3059<MATNAME>setstr</MATNAME>
3060<SCINAME>ascii</SCINAME>
3061<DESCR>Set string flag</DESCR>
3062<NOTE>
3063<NOTE_ITEM LABEL="S = setstr(A) with A a caracter string">
3064In this case, Scilab <B>ascii</B> function convert string to ascii code matrix, but <B>setstr</B> keeps string format.
3065</NOTE_ITEM>
3066</NOTE>
3067</MATSCIFUN>
3068
3069<MATSCIFUN>
3070<MATNAME>size</MATNAME>
3071<SCINAME>size</SCINAME>
3072<DESCR>Array dimension</DESCR>
3073<NOTE>
3074<P>
3075Due to the fact that strings or not considered in the same way in Matlab and in Scilab, results are not equal for string matrices, convert it using <B>m2scistr</B> to have the same result.
3076</P>
3077<NOTE_ITEM LABEL="d = size(X,dim)">
3078If <B>dim</B> is greater than number of dimensions of <B>X</B>, Matlab returns <B>d=1</B>, but in Scilab, you get an error message. Scilab <B>mtlb_size</B> can work with <B>dim</B> greater than number of dimensions of <B>X</B>.
3079</NOTE_ITEM>
3080<NOTE_ITEM LABEL="[d1,...dn] = size(X)">
3081If <B>n</B> is greater than number of dimensions of <B>X</B>, all "extra" variables are set to <B>1</B> in Matlab but Scilab returns an error message. Scilab <B>mtlb_size</B> returns a Matlab like result in these cases. When <B>n</B> is less than number of dimensions of <B>X</B>, <B>dn</B> contains the product of the sizes of the remaining dimensions in Matlab but in Scilab <B>dn = size(X,n)</B>, use <B>mtlb_size</B> for such uses.
3082</NOTE_ITEM>
3083</NOTE>
3084</MATSCIFUN>
3085
3086<MATSCIFUN>
3087<MATNAME>sparse</MATNAME>
3088<SCINAME>sparse</SCINAME>
3089<DESCR>Create sparse matrix</DESCR>
3090<NOTE>
3091<P>
3092Matlab and Scilab equivalents:
3093</P>
3094<NOTE_ITEM LABEL="sparse(A) |-| sparse(A)">
3095</NOTE_ITEM>
3096<NOTE_ITEM LABEL="sparse(m,n) |-| sparse([],[],[m,n])">
3097</NOTE_ITEM>
3098<NOTE_ITEM LABEL="sparse(i,j,s) |-| sparse([i,j],s)">
3099This equivalence is true considering <B>i</B>, <B>j</B> and <B>s</B> have the same length and that <B>i</B> and <B>j</B> are column vectors.
3100</NOTE_ITEM>
3101<NOTE_ITEM LABEL="sparse(i,j,s,m,n) |-| sparse([i,j],s,[m,n])">
3102This equivalence is true considering <B>i</B>, <B>j</B> and <B>s</B> have the same length and that <B>i</B> and <B>j</B> are column vectors.
3103</NOTE_ITEM>
3104<NOTE_ITEM LABEL="sparse(i,j,s,m,n,nzmax)">
3105There is no Scilab equivalent for this use of Matlab <B>sparse</B>.
3106</NOTE_ITEM>
3107</NOTE>
3108</MATSCIFUN>
3109
3110<MATSCIFUN>
3111<MATNAME>sort</MATNAME>
3112<SCINAME>No equivalent</SCINAME>
3113<DESCR>Sort elements in ascending order</DESCR>
3114<NOTE>
3115<P>
3116Scilab <B>sort</B> and Matlab <B>sort</B> are different functions !
3117</P>
3118<P>
3119For character string inputs, please use better <B>mtlb_sort</B> in Scilab...
3120</P>
3121<NOTE_ITEM LABEL="B = sort(A)">
3122Scilab <B>gsort</B> can be used as an equivalent for Matlb <B>sort</B> giving it the good inputs. If <B>A</B> is a vector, call <B>gsort(A,"g","i")</B>. If <B>A</B> is a matrix then call <B>gsort(A,"r","i")</B>. Note that <B>gsort</B> does not work with multidimensional arrays...
3123</NOTE_ITEM>
3124<NOTE_ITEM LABEL="B = sort(A,dim)">
3125If in Matlab, <B>dim</B> is <B>1</B> (respectively <B>2</B>) then replace it by <B>"r"</B> (respectively <B>"c"</B>) in Scilab when calling <B>gsort(A,dim,"i")</B>. Note that <B>gsort</B> does not work with multidimensional arrays...
3126</NOTE_ITEM>
3127</NOTE>
3128</MATSCIFUN>
3129
3130<MATSCIFUN>
3131<MATNAME>strcmp(str1,str2)</MATNAME>
3132<SCINAME>str1==str2</SCINAME>
3133<DESCR>Compare strings</DESCR>
3134<NOTE>
3135<P>
3136Note that <B>strcmp</B> can be use with not string inputs, in this case Matlab returns <B>0</B>. Scilab <B>==</B> will in this case return <B>%T</B> if both inputs are equal...
3137</P>
3138</NOTE>
3139</MATSCIFUN>
3140
3141<MATSCIFUN>
3142<MATNAME>strcmpi(str1,str2)</MATNAME>
3143<SCINAME>convstr(str1)==convstr(str2)</SCINAME>
3144<DESCR>Compare strings ignoring case</DESCR>
3145<NOTE>
3146<P>
3147Note that <B>strcmpi</B> can be use with not string inputs, in this case Matlab returns <B>0</B>. Scilab <B>==</B> will in this case return <B>%T</B> if both inputs are equal...
3148</P>
3149</NOTE>
3150</MATSCIFUN>
3151
3152<MATSCIFUN>
3153<MATNAME>strfind</MATNAME>
3154<SCINAME>strindex</SCINAME>
3155<DESCR>Find one string within another</DESCR>
3156<NOTE>
3157<P>
3158Note that <B>strfind</B> can be use with not string inputs, in this case Matlab returns <B>1</B> if inputs are equal and <B>0</B> else but <B>strindex</B> can not do such comparison...
3159</P>
3160</NOTE>
3161</MATSCIFUN>
3162
3163<MATSCIFUN>
3164<MATNAME>strrep</MATNAME>
3165<SCINAME>strsubst</SCINAME>
3166<DESCR>String search and replace</DESCR>
3167<NOTE>
3168<P>
3169Note that Matlab <B>strrep</B> can be use with not string inputs, what Scilab <B>strsubst</B> can not. In this case use <B>mtlb_strrep</B> instead.
3170</P>
3171</NOTE>
3172</MATSCIFUN>
3173
3174<MATSCIFUN>
3175<MATNAME>struct</MATNAME>
3176<SCINAME>struct</SCINAME>
3177<DESCR>Create struct array</DESCR>
3178</MATSCIFUN>
3179
3180<MATSCIFUN>
3181<MATNAME>svd</MATNAME>
3182<SCINAME>svd</SCINAME>
3183<DESCR>Singular value decomposition</DESCR>
3184</MATSCIFUN>
3185
3186<MATSCIFUN>
3187<MATNAME>surf</MATNAME>
3188<SCINAME>surf</SCINAME>
3189<DESCR>3-D surface plot</DESCR>
3190<NOTE>
3191<P>
3192Scilab <B>surf</B> doesn't accept all the properties of the Matlab <B>surf</B>
3193</P>
3194</NOTE>
3195</MATSCIFUN>
3196
3197<MATSCIFUN>
3198<MATNAME>type</MATNAME>
3199<SCINAME>No equivalent</SCINAME>
3200<DESCR>List file</DESCR>
3201<NOTE>
3202<P>
3203Scilab <B>mtlb_type</B> is a partial emulation of Matlab <B>type</B> function.
3204</P>
3205<P>
3206Scilab <B>type</B> function does not match with Matlab <B>type</B> !
3207</P>
3208</NOTE>
3209</MATSCIFUN>
3210
3211<MATSCIFUN>
3212<MATNAME>uigetdir</MATNAME>
3213<SCINAME>tk_getdir</SCINAME>
3214<DESCR>Standard dialog box for selecting a directory</DESCR>
3215</MATSCIFUN>
3216
3217<MATSCIFUN>
3218<MATNAME>vertcat</MATNAME>
3219<SCINAME>No equivalent</SCINAME>
3220<DESCR>Vertical concatenation</DESCR>
3221<NOTE>
3222<P>
3223Scilab equivalent for Matlab <B>vertcat(A1,A2,...,An)</B> is <B>[A1;A2;...;An]</B>.
3224</P>
3225</NOTE>
3226</MATSCIFUN>
3227
3228<MATSCIFUN>
3229<MATNAME>waitforbuttonpress</MATNAME>
3230<SCINAME>No equivalent</SCINAME>
3231<DESCR>Wait for key or mouse button press</DESCR>
3232<NOTE>
3233<P>
3234There is no equivalent function for Matlab <B>w=waitforbuttonpress</B> in Scilab however it can be replaced by: <B>[%v0,%v1,%v2,%v3,%v4] = xclick();w = bool2s(%v0>64);</B>
3235</P>
3236</NOTE>
3237</MATSCIFUN>
3238
3239<MATSCIFUN>
3240<MATNAME>warning</MATNAME>
3241<SCINAME>warning</SCINAME>
3242<DESCR>Display warning messages</DESCR>
3243<NOTE>
3244<P>
3245Scilab <B>warning</B> function can only take one character string as input but Matlab function can take more than one character string as input and also numerical values...
3246</P>
3247</NOTE>
3248</MATSCIFUN>
3249
3250<MATSCIFUN>
3251<MATNAME>tic</MATNAME>
3252<SCINAME>tic()</SCINAME>
3253<DESCR>Starts a stopwatch timer</DESCR>
3254<NOTE>
3255<P>
3256In Scilab, <B>tic</B> can be called as a command when output value is just displayed.
3257</P>
3258</NOTE>
3259</MATSCIFUN>
3260
3261<MATSCIFUN>
3262<MATNAME>toc</MATNAME>
3263<SCINAME>toc()</SCINAME>
3264<DESCR>Read the stopwatch timer</DESCR>
3265<NOTE>
3266<P>
3267In Scilab, <B>toc</B> can be called as a command when output value is just displayed.
3268</P>
3269</NOTE>
3270</MATSCIFUN>
3271
3272<MATSCIFUN>
3273<MATNAME>toeplitz</MATNAME>
3274<SCINAME>toeplitz</SCINAME>
3275<DESCR>Toeplitz matrix</DESCR>
3276<NOTE>
3277<P>
3278<B>toeplitz</B> can be used with empty matrices in Scilab but not in Matlab.
3279</P>
3280<NOTE_ITEM LABEL="T=toeplitz(c)">
3281If <B>c</B> is complex, use <B>mtlb_toeplitz</B> in Scilab to have the same result than Matlab.
3282Else if <B>c</B> is not a scalar or a vector, use <B>mtlb_toeplitz</B> in Scilab to have the same result than Matlab.
3283</NOTE_ITEM>
3284<NOTE_ITEM LABEL="T=toeplitz(c,r)">
3285If <B>c</B> and <B>r</B> are not scalars or vectors or if <B>c(1,1)&lt;&gt;r(1,1)</B>, use: <B>mtlb_toeplitz</B> in Scilab to have the same result than Matlab.
3286</NOTE_ITEM>
3287</NOTE>
3288</MATSCIFUN>
3289
3290<MATSCIFUN>
3291<MATNAME>winqueryreg</MATNAME>
3292<SCINAME>winqueryreg</SCINAME>
3293<DESCR>Get item from Microsoft Windows registry</DESCR>
3294<NOTE>
3295<P>
3296Scilab function returns a matrix of strings or a int32 value but Matlab function returns a Cell of strings or a int32 value.
3297</P>
3298</NOTE>
3299</MATSCIFUN>
3300
3301<!-- Operators -->
3302<MATSCIFUN>
3303<MATNAME>+</MATNAME>
3304<SCINAME>+</SCINAME>
3305<DESCR>Plus</DESCR>
3306<NOTE>
3307<NOTE_ITEM LABEL="Character strings addition">
3308In Scilab, string addition is the same as string concatenation, what is done in Matlab by <B>strcat</B> function. In Matlab, string addition is the equivalent of the addition of corresponding ASCII codes.
3309</NOTE_ITEM>
3310<NOTE_ITEM LABEL="Empty matrix and addition">
3311In Matlab, addition can only be made if the operands have the same size unless one is a scalar. For exemple, empty matrices can only be added to another empty matrix or a scalar. Note that when you add a scalar and an empty matrix, Matlab result is always an empty matrix while in Scilab, result is equal to the scalar.
3312</NOTE_ITEM>
3313<NOTE_ITEM LABEL="Unary plus">
3314In Matlab, unary plus exists, but in Scilab it is automatically deleted when compiling so we can consider that Scilab unary plus does not exist.
3315</NOTE_ITEM>
3316</NOTE>
3317<MATEX>
3318str = 'str1'+'str2'
3319str = [230,232,228,99]
3320str = strcat('str1','str2')
3321str = 'str1str2'
3322A = 1 + []
3323A = []
3324</MATEX>
3325<SCIEX>
3326str = 'str1'+'str2'
3327str = 'str1str2'
3328str = strcat(['str1','str2'])
3329str = 'str1str2'
3330A = 1 + []
3331A = 1
3332</SCIEX>
3333</MATSCIFUN>
3334
3335<MATSCIFUN>
3336<MATNAME>-</MATNAME>
3337<SCINAME>-</SCINAME>
3338<DESCR>Minus</DESCR>
3339<NOTE>
3340<NOTE_ITEM LABEL="Empty matrix and substraction">
3341In Matlab, substraction can only be made if the operands have the same size unless one is a scalar. For exemple, empty matrices can only be substracted to another empty matrix or a scalar. Note that when you substract an empty matrix to a scalar and inversely, Matlab result is always an empty matrix while in Scilab, result is equal to the scalar.
3342</NOTE_ITEM>
3343</NOTE>
3344<MATEX>
3345A = 1 - []
3346A = []
3347</MATEX>
3348<SCIEX>
3349A = 1 - []
3350A = 1
3351</SCIEX>
3352</MATSCIFUN>
3353
3354<MATSCIFUN>
3355 <MATNAME>*</MATNAME>
3356 <SCINAME>*</SCINAME>
3357 <DESCR>Mutiplication</DESCR>
3358</MATSCIFUN>
3359
3360<MATSCIFUN>
3361<MATNAME>.*</MATNAME>
3362<SCINAME>.*</SCINAME>
3363<DESCR>Elementwise mutiplication</DESCR>
3364<NOTE>
3365<P>
3366WARNING: Expressions like <B>X.<MATH>*</MATH>.23</B> are interpreted in Matlab as <B>X</B> elementwisely multiplied by <B>0.23</B> while Scilab computes the Kronecker product of <B>X</B> and <B>23</B>, to have the same result, insert a blank between <MATH>*</MATH> and <B>.23</B>
3367</P>
3368</NOTE>
3369</MATSCIFUN>
3370
3371<MATSCIFUN>
3372<MATNAME>/</MATNAME>
3373<SCINAME>/</SCINAME>
3374<DESCR>Right division</DESCR>
3375</MATSCIFUN>
3376
3377<MATSCIFUN>
3378<MATNAME>./</MATNAME>
3379<SCINAME>./</SCINAME>
3380<DESCR>Elementwise right division</DESCR>
3381<NOTE>
3382<P>
3383WARNING: Expressions like <B>X./.23</B> are interpreted in Matlab as the elementwise right division of <B>X</B> by <B>0.23</B> while Scilab computes the Kronecker right division of <B>X</B> and <B>23</B>, to have the same result, insert a blank between <B>/</B> and <B>.23</B>
3384</P>
3385</NOTE>
3386</MATSCIFUN>
3387
3388<MATSCIFUN>
3389<MATNAME>\</MATNAME>
3390<SCINAME>\</SCINAME>
3391<DESCR>Left division</DESCR>
3392<NOTE>
3393<P>
3394Note that Matlab left division gives strange results when one operand is a character string matrix and not the other one...
3395</P>
3396</NOTE>
3397</MATSCIFUN>
3398
3399<MATSCIFUN>
3400<MATNAME>.\</MATNAME>
3401<SCINAME>.\</SCINAME>
3402<DESCR>Elementwise left division</DESCR>
3403<NOTE>
3404<P>
3405WARNING: Expressions like <B>X.\.23</B> are interpreted in Matlab as the elementwise division of <B>0.23</B> by <B>X</B> while Scilab computes the Kronecker left division of <B>X</B> and <B>23</B>, to have the same result, inser a blank between <B>\</B> and <B>.23</B>
3406</P>
3407</NOTE>
3408</MATSCIFUN>
3409
3410<MATSCIFUN>
3411<MATNAME><MATH>^</MATH></MATNAME>
3412<SCINAME><MATH>^</MATH></SCINAME>
3413<DESCR>Exponent</DESCR>
3414<NOTE>
3415<P>
3416Note that Matlab seems to have a bug for <B>X<MATH>^</MATH>(Y)</B> when <B>X</B> is a character and that in Scilab operations such as <B>X<MATH>^</MATH>(Y)</B> with <B>X</B> a scalar and <B>Y</B> a matrix is equivalent to <B>X.<MATH>^</MATH>(Y)</B> (Will change in next Scilab versions...).
3417</P>
3418</NOTE>
3419</MATSCIFUN>
3420
3421<MATSCIFUN>
3422<MATNAME><MATH>&lt;</MATH></MATNAME>
3423<SCINAME><MATH>&lt;</MATH></SCINAME>
3424<DESCR>Smaller than</DESCR>
3425<NOTE>
3426<P>
3427When both operands are empty matrices, Matlab result is an empty matrix while in Scilab you get an error.
3428</P>
3429<P>
3430In Scilab this operator does not work with complex values while in Matlab it considers Real part of them for comparison.
3431</P>
3432</NOTE>
3433</MATSCIFUN>
3434
3435<MATSCIFUN>
3436<MATNAME><MATH>&lt;</MATH>=</MATNAME>
3437<SCINAME><MATH>&lt;</MATH>=</SCINAME>
3438<DESCR>Smaller or equal to</DESCR>
3439<NOTE>
3440<P>
3441When both operands are empty matrices, Matlab result is an empty matrix while in Scilab you get an error.
3442</P>
3443<P>
3444In Scilab this operator does not work with complex values while in Matlab it considers Real part of them for comparison.
3445</P>
3446</NOTE>
3447</MATSCIFUN>
3448
3449<MATSCIFUN>
3450<MATNAME><MATH>&gt;</MATH></MATNAME>
3451<SCINAME><MATH>&gt;</MATH></SCINAME>
3452<DESCR>Greater than</DESCR>
3453<NOTE>
3454<P>
3455When both operands are empty matrices, Matlab result is an empty matrix while in Scilab you get an error.
3456</P>
3457<P>
3458In Scilab this operator does not work with complex values while in Matlab it considers Real part of them for comparison.
3459</P>
3460</NOTE>
3461</MATSCIFUN>
3462
3463<MATSCIFUN>
3464<MATNAME><MATH>&gt;</MATH>=</MATNAME>
3465<SCINAME><MATH>&gt;</MATH>=</SCINAME>
3466<DESCR>Greater or equal to</DESCR>
3467<NOTE>
3468<P>
3469When both operands are empty matrices, Matlab result is an empty matrix while in Scilab you get an error.
3470</P>
3471<P>
3472In Scilab this operator does not work with complex values while in Matlab it considers Real part of them for comparison.
3473</P>
3474</NOTE>
3475</MATSCIFUN>
3476
3477<MATSCIFUN>
3478<MATNAME>==</MATNAME>
3479<SCINAME>==</SCINAME>
3480<DESCR>Equal to</DESCR>
3481</MATSCIFUN>
3482
3483<MATSCIFUN>
3484<MATNAME>~=</MATNAME>
3485<SCINAME>~=</SCINAME>
3486<DESCR>Not equal to</DESCR>
3487</MATSCIFUN>
3488
3489<MATSCIFUN>
3490<MATNAME>:</MATNAME>
3491<SCINAME>:</SCINAME>
3492<DESCR>Colon</DESCR>
3493<NOTE>
3494<NOTE_ITEM LABEL="Using colon with empty matrices">
3495In Matlab if almost one operand is an empty matrix, then result is an empty matrix what gives an error message in Scilab.
3496</NOTE_ITEM>
3497<NOTE_ITEM LABEL="Using colon with NaNs and Infs">
3498In Matlab if almost one operand is an empty matrix, then result is a NaN what make Scilab returning an error.
3499</NOTE_ITEM>
3500</NOTE>
3501</MATSCIFUN>
3502
3503<MATSCIFUN>
3504<MATNAME>'</MATNAME>
3505<SCINAME>'</SCINAME>
3506<DESCR>Transpose</DESCR>
3507<NOTE>
3508<NOTE_ITEM LABEL="Character string transpose">
3509In Scilab, the result of a character string transpose is the string itself; but in Matlab, transpose of a character string gives a column vector of characters. To have the same result in Scilab, use: <B>mtlb_t</B>.
3510</NOTE_ITEM>
3511</NOTE>
3512<MATEX>
3513s = ('str1')'
3514s = ['s';'t';'r';'1']
3515</MATEX>
3516<SCIEX>
3517s = ('str1')'
3518s = 'str1'
3519s = mtlb_t('str1')
3520s = ['s';'t';'r';'1']
3521</SCIEX>
3522</MATSCIFUN>
3523
3524<MATSCIFUN>
3525<MATNAME><MATH>|</MATH></MATNAME>
3526<SCINAME><MATH>|</MATH></SCINAME>
3527<DESCR>Logical OR</DESCR>
3528<NOTE>
3529<P>
3530Due to the fact that strings or not considered in the same way in Matlab and in Scilab, results are not equal for string matrices, convert it to ASCII code matrices using <B>m2scistr</B> to have the same result.
3531</P>
3532<P>
3533Scilab function has a bug!
3534</P>
3535</NOTE>
3536</MATSCIFUN>
3537
3538<MATSCIFUN>
3539<MATNAME>&amp;</MATNAME>
3540<SCINAME>&amp;</SCINAME>
3541<DESCR>Logical AND</DESCR>
3542<NOTE>
3543<P>
3544Due to the fact that strings or not considered in the same way in Matlab and in Scilab, results are not equal for string matrices, convert it to ascii code matrices using <B>m2scistr</B> to have the same result.
3545</P>
3546<P>
3547Scilab function has a bug!
3548</P>
3549</NOTE>
3550</MATSCIFUN>
3551
3552<MATSCIFUN>
3553<MATNAME>~</MATNAME>
3554<SCINAME>~</SCINAME>
3555<DESCR>Negation</DESCR>
3556<NOTE>
3557<P>
3558Due to the fact that strings or not considered in the same way in Matlab and in Scilab, results are not equal for string matrices, convert it to ascii code matrices using <B>m2scistr</B> to have the same result.
3559</P>
3560</NOTE>
3561</MATSCIFUN>
3562
3563<MATSCIFUN>
3564<MATNAME>.<MATH>^</MATH></MATNAME>
3565<SCINAME>.<MATH>^</MATH></SCINAME>
3566<DESCR>Elementwise exponent</DESCR>
3567<NOTE>
3568<P>
3569Note that Matlab seems to have a bug when exposant is a character...
3570</P>
3571<P>
3572WARNING: Expressions like <B>X.<MATH>^</MATH>.23</B> are interpreted in Matlab as <B>X</B> to the power of <B>0.23</B> while Scilab executes <B>X</B> elementwisely powered to <B>23</B>, to have the same result, inser a blank between <MATH>^</MATH> and <B>.23</B>
3573</P>
3574</NOTE>
3575</MATSCIFUN>
3576
3577<MATSCIFUN>
3578<MATNAME>.'</MATNAME>
3579<SCINAME>.'</SCINAME>
3580<DESCR>Elementwise transpose</DESCR>
3581<NOTE>
3582<NOTE_ITEM LABEL="Character string elementwise transpose">
3583In Scilab, the result of a character string elementwise transpose is the string itself; but in Matlab, elementwise transpose of a character string gives a column vector of characters. To have the same result in Scilab, use: <B>mtlb_0</B>.
3584</NOTE_ITEM>
3585</NOTE>
3586<MATEX>
3587s = ('str1')'
3588s = ['s';'t';'r';'1']
3589</MATEX>
3590<SCIEX>
3591s = ('str1')'
3592s = 'str1'
3593s = mtlb_0('str1')
3594s = ['s';'t';'r';'1']
3595</SCIEX>
3596</MATSCIFUN>
3597
3598</MATSCIDOC> \ No newline at end of file