summaryrefslogtreecommitdiffstats
path: root/scilab/modules/compatibility_functions
diff options
context:
space:
mode:
authorVincent COUVERT <vincent.couvert@scilab.org>2010-03-08 13:33:16 +0100
committerVincent COUVERT <vincent.couvert@scilab.org>2010-03-08 13:33:16 +0100
commit1cdb09754241dc587ad6ad1c975a29be34262762 (patch)
treee012c58c36e71000c8710dab165cdcc126dc9052 /scilab/modules/compatibility_functions
parentd9f70eb9da0860586c315cf90144634127b2d373 (diff)
downloadscilab-1cdb09754241dc587ad6ad1c975a29be34262762.zip
scilab-1cdb09754241dc587ad6ad1c975a29be34262762.tar.gz
Clean + update
Diffstat (limited to 'scilab/modules/compatibility_functions')
-rw-r--r--scilab/modules/compatibility_functions/macros/mtlb_l.sci37
1 files changed, 13 insertions, 24 deletions
diff --git a/scilab/modules/compatibility_functions/macros/mtlb_l.sci b/scilab/modules/compatibility_functions/macros/mtlb_l.sci
index e17f232..3887f74 100644
--- a/scilab/modules/compatibility_functions/macros/mtlb_l.sci
+++ b/scilab/modules/compatibility_functions/macros/mtlb_l.sci
@@ -10,31 +10,20 @@
10function y=mtlb_l(a,b) 10function y=mtlb_l(a,b)
11// Emulation function for Matlab left division 11// Emulation function for Matlab left division
12 12
13// Warning: this function should not work if only a or b is a string matrix... 13if type(a)==10 then
14// In these case Matlab result is very strange ! 14 a=asciimat(a)
15end
16if type(b)==10 then
17 b=asciimat(b)
18end
15 19
16 transpose=%F 20if or(type(a)==[4,6]) then
21 a=bool2s(a)
22end
23if or(type(b)==[4,6]) then
24 b=bool2s(b)
25end
17 26
18 if type(a)==10 & type(b)==10 then 27y=a\b
19 transpose=%T
20 end
21 if type(a)==10 then
22 a=asciimat(a)'
23 end
24 if type(b)==10 then
25 b=asciimat(b)'
26 end
27 28
28 if or(type(a)==[4,6]) then
29 a=bool2s(a)
30 end
31 if or(type(b)==[4,6]) then
32 b=bool2s(b)
33 end
34
35 y=a\b
36
37 if transpose then
38 y=y($:-1:1,$:-1:1)'
39 end
40endfunction 29endfunction