summaryrefslogtreecommitdiff
path: root/modules/overloading/macros
diff options
context:
space:
mode:
authorShashank2017-05-29 12:40:26 +0530
committerShashank2017-05-29 12:40:26 +0530
commit0345245e860375a32c9a437c4a9d9cae807134e9 (patch)
treead51ecbfa7bcd3cc5f09834f1bb8c08feaa526a4 /modules/overloading/macros
downloadscilab_for_xcos_on_cloud-0345245e860375a32c9a437c4a9d9cae807134e9.tar.gz
scilab_for_xcos_on_cloud-0345245e860375a32c9a437c4a9d9cae807134e9.tar.bz2
scilab_for_xcos_on_cloud-0345245e860375a32c9a437c4a9d9cae807134e9.zip
CMSCOPE changed
Diffstat (limited to 'modules/overloading/macros')
-rwxr-xr-xmodules/overloading/macros/%0_i_st.binbin0 -> 2272 bytes
-rwxr-xr-xmodules/overloading/macros/%0_i_st.sci24
-rwxr-xr-xmodules/overloading/macros/%3d_i_h.binbin0 -> 5456 bytes
-rwxr-xr-xmodules/overloading/macros/%3d_i_h.sci43
-rwxr-xr-xmodules/overloading/macros/%ar_p.binbin0 -> 23716 bytes
-rwxr-xr-xmodules/overloading/macros/%ar_p.sci163
-rwxr-xr-xmodules/overloading/macros/%b_c_spb.binbin0 -> 640 bytes
-rwxr-xr-xmodules/overloading/macros/%b_c_spb.sci13
-rwxr-xr-xmodules/overloading/macros/%b_diag.binbin0 -> 3436 bytes
-rwxr-xr-xmodules/overloading/macros/%b_diag.sci32
-rwxr-xr-xmodules/overloading/macros/%b_e.binbin0 -> 4028 bytes
-rwxr-xr-xmodules/overloading/macros/%b_e.sci34
-rwxr-xr-xmodules/overloading/macros/%b_f_spb.binbin0 -> 640 bytes
-rwxr-xr-xmodules/overloading/macros/%b_f_spb.sci13
-rwxr-xr-xmodules/overloading/macros/%b_g_s.binbin0 -> 328 bytes
-rwxr-xr-xmodules/overloading/macros/%b_g_s.sci13
-rwxr-xr-xmodules/overloading/macros/%b_g_spb.binbin0 -> 708 bytes
-rwxr-xr-xmodules/overloading/macros/%b_g_spb.sci13
-rwxr-xr-xmodules/overloading/macros/%b_h_s.binbin0 -> 328 bytes
-rwxr-xr-xmodules/overloading/macros/%b_h_s.sci13
-rwxr-xr-xmodules/overloading/macros/%b_h_spb.binbin0 -> 724 bytes
-rwxr-xr-xmodules/overloading/macros/%b_h_spb.sci13
-rwxr-xr-xmodules/overloading/macros/%b_i_b.binbin0 -> 1440 bytes
-rwxr-xr-xmodules/overloading/macros/%b_i_b.sci17
-rwxr-xr-xmodules/overloading/macros/%b_i_ce.binbin0 -> 452 bytes
-rwxr-xr-xmodules/overloading/macros/%b_i_ce.sci13
-rwxr-xr-xmodules/overloading/macros/%b_i_h.binbin0 -> 360 bytes
-rwxr-xr-xmodules/overloading/macros/%b_i_h.sci15
-rwxr-xr-xmodules/overloading/macros/%b_i_hm.binbin0 -> 532 bytes
-rwxr-xr-xmodules/overloading/macros/%b_i_hm.sci15
-rwxr-xr-xmodules/overloading/macros/%b_i_s.binbin0 -> 4544 bytes
-rwxr-xr-xmodules/overloading/macros/%b_i_s.sci35
-rwxr-xr-xmodules/overloading/macros/%b_i_sp.binbin0 -> 1788 bytes
-rwxr-xr-xmodules/overloading/macros/%b_i_sp.sci24
-rwxr-xr-xmodules/overloading/macros/%b_i_spb.binbin0 -> 2760 bytes
-rwxr-xr-xmodules/overloading/macros/%b_i_spb.sci30
-rwxr-xr-xmodules/overloading/macros/%b_i_st.binbin0 -> 360 bytes
-rwxr-xr-xmodules/overloading/macros/%b_i_st.sci11
-rwxr-xr-xmodules/overloading/macros/%b_iconvert.binbin0 -> 1120 bytes
-rwxr-xr-xmodules/overloading/macros/%b_iconvert.sci16
-rwxr-xr-xmodules/overloading/macros/%b_matrix.binbin0 -> 340 bytes
-rwxr-xr-xmodules/overloading/macros/%b_matrix.sci11
-rwxr-xr-xmodules/overloading/macros/%b_n_hm.binbin0 -> 644 bytes
-rwxr-xr-xmodules/overloading/macros/%b_n_hm.sci16
-rwxr-xr-xmodules/overloading/macros/%b_o_hm.binbin0 -> 644 bytes
-rwxr-xr-xmodules/overloading/macros/%b_o_hm.sci16
-rwxr-xr-xmodules/overloading/macros/%b_string.binbin0 -> 724 bytes
-rwxr-xr-xmodules/overloading/macros/%b_string.sci14
-rwxr-xr-xmodules/overloading/macros/%b_tril.binbin0 -> 1592 bytes
-rwxr-xr-xmodules/overloading/macros/%b_tril.sci17
-rwxr-xr-xmodules/overloading/macros/%b_triu.binbin0 -> 1592 bytes
-rwxr-xr-xmodules/overloading/macros/%b_triu.sci17
-rwxr-xr-xmodules/overloading/macros/%c_a_c.binbin0 -> 2896 bytes
-rwxr-xr-xmodules/overloading/macros/%c_a_c.sci32
-rwxr-xr-xmodules/overloading/macros/%c_b_c.binbin0 -> 2360 bytes
-rwxr-xr-xmodules/overloading/macros/%c_b_c.sci21
-rwxr-xr-xmodules/overloading/macros/%c_b_s.binbin0 -> 1408 bytes
-rwxr-xr-xmodules/overloading/macros/%c_b_s.sci18
-rwxr-xr-xmodules/overloading/macros/%c_diag.binbin0 -> 3436 bytes
-rwxr-xr-xmodules/overloading/macros/%c_diag.sci33
-rwxr-xr-xmodules/overloading/macros/%c_dsearch.binbin0 -> 8968 bytes
-rwxr-xr-xmodules/overloading/macros/%c_dsearch.sci73
-rwxr-xr-xmodules/overloading/macros/%c_e.binbin0 -> 4028 bytes
-rwxr-xr-xmodules/overloading/macros/%c_e.sci34
-rwxr-xr-xmodules/overloading/macros/%c_eye.binbin0 -> 444 bytes
-rwxr-xr-xmodules/overloading/macros/%c_eye.sci14
-rwxr-xr-xmodules/overloading/macros/%c_f_s.binbin0 -> 448 bytes
-rwxr-xr-xmodules/overloading/macros/%c_f_s.sci17
-rwxr-xr-xmodules/overloading/macros/%c_i_c.binbin0 -> 1292 bytes
-rwxr-xr-xmodules/overloading/macros/%c_i_c.sci16
-rwxr-xr-xmodules/overloading/macros/%c_i_ce.binbin0 -> 448 bytes
-rwxr-xr-xmodules/overloading/macros/%c_i_ce.sci13
-rwxr-xr-xmodules/overloading/macros/%c_i_h.binbin0 -> 360 bytes
-rwxr-xr-xmodules/overloading/macros/%c_i_h.sci16
-rwxr-xr-xmodules/overloading/macros/%c_i_hm.binbin0 -> 508 bytes
-rwxr-xr-xmodules/overloading/macros/%c_i_hm.sci14
-rwxr-xr-xmodules/overloading/macros/%c_i_lss.binbin0 -> 2368 bytes
-rwxr-xr-xmodules/overloading/macros/%c_i_lss.sci25
-rwxr-xr-xmodules/overloading/macros/%c_i_r.binbin0 -> 2352 bytes
-rwxr-xr-xmodules/overloading/macros/%c_i_r.sci25
-rwxr-xr-xmodules/overloading/macros/%c_i_s.binbin0 -> 6448 bytes
-rwxr-xr-xmodules/overloading/macros/%c_i_s.sci54
-rwxr-xr-xmodules/overloading/macros/%c_i_st.binbin0 -> 360 bytes
-rwxr-xr-xmodules/overloading/macros/%c_i_st.sci12
-rwxr-xr-xmodules/overloading/macros/%c_matrix.binbin0 -> 340 bytes
-rwxr-xr-xmodules/overloading/macros/%c_matrix.sci11
-rwxr-xr-xmodules/overloading/macros/%c_n_l.binbin0 -> 332 bytes
-rwxr-xr-xmodules/overloading/macros/%c_n_l.sci14
-rwxr-xr-xmodules/overloading/macros/%c_n_st.binbin0 -> 468 bytes
-rwxr-xr-xmodules/overloading/macros/%c_n_st.sci14
-rwxr-xr-xmodules/overloading/macros/%c_o_l.binbin0 -> 324 bytes
-rwxr-xr-xmodules/overloading/macros/%c_o_l.sci14
-rwxr-xr-xmodules/overloading/macros/%c_o_st.binbin0 -> 468 bytes
-rwxr-xr-xmodules/overloading/macros/%c_o_st.sci14
-rwxr-xr-xmodules/overloading/macros/%c_ones.binbin0 -> 516 bytes
-rwxr-xr-xmodules/overloading/macros/%c_ones.sci14
-rwxr-xr-xmodules/overloading/macros/%c_rand.binbin0 -> 444 bytes
-rwxr-xr-xmodules/overloading/macros/%c_rand.sci14
-rwxr-xr-xmodules/overloading/macros/%c_tril.binbin0 -> 1716 bytes
-rwxr-xr-xmodules/overloading/macros/%c_tril.sci21
-rwxr-xr-xmodules/overloading/macros/%c_triu.binbin0 -> 2632 bytes
-rwxr-xr-xmodules/overloading/macros/%c_triu.sci26
-rwxr-xr-xmodules/overloading/macros/%cblock_c_cblock.binbin0 -> 2836 bytes
-rwxr-xr-xmodules/overloading/macros/%cblock_c_cblock.sci27
-rwxr-xr-xmodules/overloading/macros/%cblock_c_s.binbin0 -> 1572 bytes
-rwxr-xr-xmodules/overloading/macros/%cblock_c_s.sci19
-rwxr-xr-xmodules/overloading/macros/%cblock_e.binbin0 -> 7172 bytes
-rwxr-xr-xmodules/overloading/macros/%cblock_e.sci63
-rwxr-xr-xmodules/overloading/macros/%cblock_f_cblock.binbin0 -> 1548 bytes
-rwxr-xr-xmodules/overloading/macros/%cblock_f_cblock.sci17
-rwxr-xr-xmodules/overloading/macros/%cblock_p.binbin0 -> 5148 bytes
-rwxr-xr-xmodules/overloading/macros/%cblock_p.sci43
-rwxr-xr-xmodules/overloading/macros/%cblock_size.binbin0 -> 1444 bytes
-rwxr-xr-xmodules/overloading/macros/%cblock_size.sci17
-rwxr-xr-xmodules/overloading/macros/%ce_6.binbin0 -> 7044 bytes
-rwxr-xr-xmodules/overloading/macros/%ce_6.sci50
-rwxr-xr-xmodules/overloading/macros/%ce_c_ce.binbin0 -> 5436 bytes
-rwxr-xr-xmodules/overloading/macros/%ce_c_ce.sci38
-rwxr-xr-xmodules/overloading/macros/%ce_e.binbin0 -> 14224 bytes
-rwxr-xr-xmodules/overloading/macros/%ce_e.sci103
-rwxr-xr-xmodules/overloading/macros/%ce_f_ce.binbin0 -> 528 bytes
-rwxr-xr-xmodules/overloading/macros/%ce_f_ce.sci16
-rwxr-xr-xmodules/overloading/macros/%ce_i_ce.binbin0 -> 15108 bytes
-rwxr-xr-xmodules/overloading/macros/%ce_i_ce.sci118
-rwxr-xr-xmodules/overloading/macros/%ce_i_s.binbin0 -> 396 bytes
-rwxr-xr-xmodules/overloading/macros/%ce_i_s.sci13
-rwxr-xr-xmodules/overloading/macros/%ce_i_st.binbin0 -> 360 bytes
-rwxr-xr-xmodules/overloading/macros/%ce_i_st.sci11
-rwxr-xr-xmodules/overloading/macros/%ce_matrix.binbin0 -> 2288 bytes
-rwxr-xr-xmodules/overloading/macros/%ce_matrix.sci25
-rwxr-xr-xmodules/overloading/macros/%ce_p.binbin0 -> 272 bytes
-rwxr-xr-xmodules/overloading/macros/%ce_p.sci11
-rwxr-xr-xmodules/overloading/macros/%ce_size.binbin0 -> 4420 bytes
-rwxr-xr-xmodules/overloading/macros/%ce_size.sci37
-rwxr-xr-xmodules/overloading/macros/%ce_string.binbin0 -> 6016 bytes
-rwxr-xr-xmodules/overloading/macros/%ce_string.sci60
-rwxr-xr-xmodules/overloading/macros/%ce_t.binbin0 -> 2556 bytes
-rwxr-xr-xmodules/overloading/macros/%ce_t.sci22
-rwxr-xr-xmodules/overloading/macros/%champdat_i_h.binbin0 -> 5408 bytes
-rwxr-xr-xmodules/overloading/macros/%champdat_i_h.sci43
-rwxr-xr-xmodules/overloading/macros/%choose.binbin0 -> 6572 bytes
-rwxr-xr-xmodules/overloading/macros/%choose.sci49
-rwxr-xr-xmodules/overloading/macros/%fptr_i_st.binbin0 -> 360 bytes
-rwxr-xr-xmodules/overloading/macros/%fptr_i_st.sci12
-rwxr-xr-xmodules/overloading/macros/%grayplot_i_h.binbin0 -> 5408 bytes
-rwxr-xr-xmodules/overloading/macros/%grayplot_i_h.sci43
-rwxr-xr-xmodules/overloading/macros/%h_i_st.binbin0 -> 360 bytes
-rwxr-xr-xmodules/overloading/macros/%h_i_st.sci11
-rwxr-xr-xmodules/overloading/macros/%hmS_k_hmS_generic.binbin0 -> 4832 bytes
-rwxr-xr-xmodules/overloading/macros/%hmS_k_hmS_generic.sci36
-rwxr-xr-xmodules/overloading/macros/%hm_1_hm.binbin0 -> 1332 bytes
-rwxr-xr-xmodules/overloading/macros/%hm_1_hm.sci14
-rwxr-xr-xmodules/overloading/macros/%hm_1_s.binbin0 -> 1076 bytes
-rwxr-xr-xmodules/overloading/macros/%hm_1_s.sci16
-rwxr-xr-xmodules/overloading/macros/%hm_2_hm.binbin0 -> 1332 bytes
-rwxr-xr-xmodules/overloading/macros/%hm_2_hm.sci15
-rwxr-xr-xmodules/overloading/macros/%hm_2_s.binbin0 -> 1076 bytes
-rwxr-xr-xmodules/overloading/macros/%hm_2_s.sci15
-rwxr-xr-xmodules/overloading/macros/%hm_3_hm.binbin0 -> 1332 bytes
-rwxr-xr-xmodules/overloading/macros/%hm_3_hm.sci14
-rwxr-xr-xmodules/overloading/macros/%hm_3_s.binbin0 -> 1080 bytes
-rwxr-xr-xmodules/overloading/macros/%hm_3_s.sci15
-rwxr-xr-xmodules/overloading/macros/%hm_4_hm.binbin0 -> 1332 bytes
-rwxr-xr-xmodules/overloading/macros/%hm_4_hm.sci14
-rwxr-xr-xmodules/overloading/macros/%hm_4_s.binbin0 -> 1084 bytes
-rwxr-xr-xmodules/overloading/macros/%hm_4_s.sci16
-rwxr-xr-xmodules/overloading/macros/%hm_5.binbin0 -> 280 bytes
-rwxr-xr-xmodules/overloading/macros/%hm_5.sci11
-rwxr-xr-xmodules/overloading/macros/%hm_a_hm.binbin0 -> 896 bytes
-rwxr-xr-xmodules/overloading/macros/%hm_a_hm.sci16
-rwxr-xr-xmodules/overloading/macros/%hm_a_r.binbin0 -> 2876 bytes
-rwxr-xr-xmodules/overloading/macros/%hm_a_r.sci31
-rwxr-xr-xmodules/overloading/macros/%hm_a_s.binbin0 -> 1988 bytes
-rwxr-xr-xmodules/overloading/macros/%hm_a_s.sci26
-rwxr-xr-xmodules/overloading/macros/%hm_abs.binbin0 -> 340 bytes
-rwxr-xr-xmodules/overloading/macros/%hm_abs.sci13
-rwxr-xr-xmodules/overloading/macros/%hm_and.binbin0 -> 6220 bytes
-rwxr-xr-xmodules/overloading/macros/%hm_and.sci58
-rwxr-xr-xmodules/overloading/macros/%hm_bool2s.binbin0 -> 428 bytes
-rwxr-xr-xmodules/overloading/macros/%hm_bool2s.sci12
-rwxr-xr-xmodules/overloading/macros/%hm_c_hm.binbin0 -> 3304 bytes
-rwxr-xr-xmodules/overloading/macros/%hm_c_hm.sci27
-rwxr-xr-xmodules/overloading/macros/%hm_ceil.binbin0 -> 340 bytes
-rwxr-xr-xmodules/overloading/macros/%hm_ceil.sci13
-rwxr-xr-xmodules/overloading/macros/%hm_conj.binbin0 -> 340 bytes
-rwxr-xr-xmodules/overloading/macros/%hm_conj.sci13
-rwxr-xr-xmodules/overloading/macros/%hm_cos.binbin0 -> 340 bytes
-rwxr-xr-xmodules/overloading/macros/%hm_cos.sci13
-rwxr-xr-xmodules/overloading/macros/%hm_cumprod.binbin0 -> 12932 bytes
-rwxr-xr-xmodules/overloading/macros/%hm_cumprod.sci97
-rwxr-xr-xmodules/overloading/macros/%hm_cumsum.binbin0 -> 14648 bytes
-rwxr-xr-xmodules/overloading/macros/%hm_cumsum.sci110
-rwxr-xr-xmodules/overloading/macros/%hm_d_hm.binbin0 -> 1144 bytes
-rwxr-xr-xmodules/overloading/macros/%hm_d_hm.sci17
-rwxr-xr-xmodules/overloading/macros/%hm_d_s.binbin0 -> 984 bytes
-rwxr-xr-xmodules/overloading/macros/%hm_d_s.sci17
-rwxr-xr-xmodules/overloading/macros/%hm_degree.binbin0 -> 336 bytes
-rwxr-xr-xmodules/overloading/macros/%hm_degree.sci12
-rwxr-xr-xmodules/overloading/macros/%hm_dsearch.binbin0 -> 944 bytes
-rwxr-xr-xmodules/overloading/macros/%hm_dsearch.sci17
-rwxr-xr-xmodules/overloading/macros/%hm_e.binbin0 -> 13800 bytes
-rwxr-xr-xmodules/overloading/macros/%hm_e.sci96
-rwxr-xr-xmodules/overloading/macros/%hm_exp.binbin0 -> 336 bytes
-rwxr-xr-xmodules/overloading/macros/%hm_exp.sci12
-rwxr-xr-xmodules/overloading/macros/%hm_eye.binbin0 -> 2364 bytes
-rwxr-xr-xmodules/overloading/macros/%hm_eye.sci22
-rwxr-xr-xmodules/overloading/macros/%hm_f_hm.binbin0 -> 3136 bytes
-rwxr-xr-xmodules/overloading/macros/%hm_f_hm.sci27
-rwxr-xr-xmodules/overloading/macros/%hm_find.binbin0 -> 2768 bytes
-rwxr-xr-xmodules/overloading/macros/%hm_find.sci33
-rwxr-xr-xmodules/overloading/macros/%hm_floor.binbin0 -> 340 bytes
-rwxr-xr-xmodules/overloading/macros/%hm_floor.sci13
-rwxr-xr-xmodules/overloading/macros/%hm_g_hm.binbin0 -> 4132 bytes
-rwxr-xr-xmodules/overloading/macros/%hm_g_hm.sci27
-rwxr-xr-xmodules/overloading/macros/%hm_h_hm.binbin0 -> 4204 bytes
-rwxr-xr-xmodules/overloading/macros/%hm_h_hm.sci28
-rwxr-xr-xmodules/overloading/macros/%hm_i_b.binbin0 -> 8108 bytes
-rwxr-xr-xmodules/overloading/macros/%hm_i_b.sci72
-rwxr-xr-xmodules/overloading/macros/%hm_i_ce.binbin0 -> 440 bytes
-rwxr-xr-xmodules/overloading/macros/%hm_i_ce.sci13
-rwxr-xr-xmodules/overloading/macros/%hm_i_h.binbin0 -> 360 bytes
-rwxr-xr-xmodules/overloading/macros/%hm_i_h.sci12
-rwxr-xr-xmodules/overloading/macros/%hm_i_hm.binbin0 -> 8256 bytes
-rwxr-xr-xmodules/overloading/macros/%hm_i_hm.sci72
-rwxr-xr-xmodules/overloading/macros/%hm_i_i.binbin0 -> 8164 bytes
-rwxr-xr-xmodules/overloading/macros/%hm_i_i.sci71
-rwxr-xr-xmodules/overloading/macros/%hm_i_p.binbin0 -> 8112 bytes
-rwxr-xr-xmodules/overloading/macros/%hm_i_p.sci71
-rwxr-xr-xmodules/overloading/macros/%hm_i_r.binbin0 -> 1564 bytes
-rwxr-xr-xmodules/overloading/macros/%hm_i_r.sci20
-rwxr-xr-xmodules/overloading/macros/%hm_i_s.binbin0 -> 9192 bytes
-rwxr-xr-xmodules/overloading/macros/%hm_i_s.sci78
-rwxr-xr-xmodules/overloading/macros/%hm_i_st.binbin0 -> 360 bytes
-rwxr-xr-xmodules/overloading/macros/%hm_i_st.sci12
-rwxr-xr-xmodules/overloading/macros/%hm_iconvert.binbin0 -> 380 bytes
-rwxr-xr-xmodules/overloading/macros/%hm_iconvert.sci12
-rwxr-xr-xmodules/overloading/macros/%hm_imag.binbin0 -> 340 bytes
-rwxr-xr-xmodules/overloading/macros/%hm_imag.sci13
-rwxr-xr-xmodules/overloading/macros/%hm_int.binbin0 -> 336 bytes
-rwxr-xr-xmodules/overloading/macros/%hm_int.sci12
-rwxr-xr-xmodules/overloading/macros/%hm_isnan.binbin0 -> 428 bytes
-rwxr-xr-xmodules/overloading/macros/%hm_isnan.sci12
-rwxr-xr-xmodules/overloading/macros/%hm_isreal.binbin0 -> 696 bytes
-rwxr-xr-xmodules/overloading/macros/%hm_isreal.sci16
-rwxr-xr-xmodules/overloading/macros/%hm_j_hm.binbin0 -> 1144 bytes
-rwxr-xr-xmodules/overloading/macros/%hm_j_hm.sci17
-rwxr-xr-xmodules/overloading/macros/%hm_j_s.binbin0 -> 952 bytes
-rwxr-xr-xmodules/overloading/macros/%hm_j_s.sci17
-rwxr-xr-xmodules/overloading/macros/%hm_k_hm.binbin0 -> 300 bytes
-rwxr-xr-xmodules/overloading/macros/%hm_k_hm.sci12
-rwxr-xr-xmodules/overloading/macros/%hm_k_s.binbin0 -> 300 bytes
-rwxr-xr-xmodules/overloading/macros/%hm_k_s.sci12
-rwxr-xr-xmodules/overloading/macros/%hm_log.binbin0 -> 340 bytes
-rwxr-xr-xmodules/overloading/macros/%hm_log.sci13
-rwxr-xr-xmodules/overloading/macros/%hm_m_p.binbin0 -> 1024 bytes
-rwxr-xr-xmodules/overloading/macros/%hm_m_p.sci16
-rwxr-xr-xmodules/overloading/macros/%hm_m_r.binbin0 -> 2704 bytes
-rwxr-xr-xmodules/overloading/macros/%hm_m_r.sci34
-rwxr-xr-xmodules/overloading/macros/%hm_m_s.binbin0 -> 3040 bytes
-rwxr-xr-xmodules/overloading/macros/%hm_m_s.sci31
-rwxr-xr-xmodules/overloading/macros/%hm_matrix.binbin0 -> 6772 bytes
-rwxr-xr-xmodules/overloading/macros/%hm_matrix.sci53
-rwxr-xr-xmodules/overloading/macros/%hm_max.binbin0 -> 12680 bytes
-rwxr-xr-xmodules/overloading/macros/%hm_max.sci107
-rwxr-xr-xmodules/overloading/macros/%hm_mean.binbin0 -> 5196 bytes
-rwxr-xr-xmodules/overloading/macros/%hm_mean.sci39
-rwxr-xr-xmodules/overloading/macros/%hm_median.binbin0 -> 4496 bytes
-rwxr-xr-xmodules/overloading/macros/%hm_median.sci37
-rwxr-xr-xmodules/overloading/macros/%hm_min.binbin0 -> 12536 bytes
-rwxr-xr-xmodules/overloading/macros/%hm_min.sci98
-rwxr-xr-xmodules/overloading/macros/%hm_n_b.binbin0 -> 648 bytes
-rwxr-xr-xmodules/overloading/macros/%hm_n_b.sci17
-rwxr-xr-xmodules/overloading/macros/%hm_n_c.binbin0 -> 648 bytes
-rwxr-xr-xmodules/overloading/macros/%hm_n_c.sci17
-rwxr-xr-xmodules/overloading/macros/%hm_n_hm.binbin0 -> 964 bytes
-rwxr-xr-xmodules/overloading/macros/%hm_n_hm.sci16
-rwxr-xr-xmodules/overloading/macros/%hm_n_i.binbin0 -> 648 bytes
-rwxr-xr-xmodules/overloading/macros/%hm_n_i.sci17
-rwxr-xr-xmodules/overloading/macros/%hm_n_p.binbin0 -> 648 bytes
-rwxr-xr-xmodules/overloading/macros/%hm_n_p.sci17
-rwxr-xr-xmodules/overloading/macros/%hm_n_s.binbin0 -> 660 bytes
-rwxr-xr-xmodules/overloading/macros/%hm_n_s.sci16
-rwxr-xr-xmodules/overloading/macros/%hm_o_b.binbin0 -> 648 bytes
-rwxr-xr-xmodules/overloading/macros/%hm_o_b.sci16
-rwxr-xr-xmodules/overloading/macros/%hm_o_c.binbin0 -> 648 bytes
-rwxr-xr-xmodules/overloading/macros/%hm_o_c.sci17
-rwxr-xr-xmodules/overloading/macros/%hm_o_hm.binbin0 -> 964 bytes
-rwxr-xr-xmodules/overloading/macros/%hm_o_hm.sci17
-rwxr-xr-xmodules/overloading/macros/%hm_o_i.binbin0 -> 724 bytes
-rwxr-xr-xmodules/overloading/macros/%hm_o_i.sci17
-rwxr-xr-xmodules/overloading/macros/%hm_o_p.binbin0 -> 648 bytes
-rwxr-xr-xmodules/overloading/macros/%hm_o_p.sci17
-rwxr-xr-xmodules/overloading/macros/%hm_o_s.binbin0 -> 668 bytes
-rwxr-xr-xmodules/overloading/macros/%hm_o_s.sci19
-rwxr-xr-xmodules/overloading/macros/%hm_ones.binbin0 -> 3592 bytes
-rwxr-xr-xmodules/overloading/macros/%hm_ones.sci34
-rwxr-xr-xmodules/overloading/macros/%hm_or.binbin0 -> 6216 bytes
-rwxr-xr-xmodules/overloading/macros/%hm_or.sci58
-rwxr-xr-xmodules/overloading/macros/%hm_p.binbin0 -> 3708 bytes
-rwxr-xr-xmodules/overloading/macros/%hm_p.sci34
-rwxr-xr-xmodules/overloading/macros/%hm_prod.binbin0 -> 13400 bytes
-rwxr-xr-xmodules/overloading/macros/%hm_prod.sci103
-rwxr-xr-xmodules/overloading/macros/%hm_q_hm.binbin0 -> 1144 bytes
-rwxr-xr-xmodules/overloading/macros/%hm_q_hm.sci17
-rwxr-xr-xmodules/overloading/macros/%hm_r_s.binbin0 -> 824 bytes
-rwxr-xr-xmodules/overloading/macros/%hm_r_s.sci17
-rwxr-xr-xmodules/overloading/macros/%hm_rand.binbin0 -> 6880 bytes
-rwxr-xr-xmodules/overloading/macros/%hm_rand.sci52
-rwxr-xr-xmodules/overloading/macros/%hm_real.binbin0 -> 340 bytes
-rwxr-xr-xmodules/overloading/macros/%hm_real.sci13
-rwxr-xr-xmodules/overloading/macros/%hm_round.binbin0 -> 340 bytes
-rwxr-xr-xmodules/overloading/macros/%hm_round.sci13
-rwxr-xr-xmodules/overloading/macros/%hm_s.binbin0 -> 408 bytes
-rwxr-xr-xmodules/overloading/macros/%hm_s.sci14
-rwxr-xr-xmodules/overloading/macros/%hm_s_hm.binbin0 -> 1008 bytes
-rwxr-xr-xmodules/overloading/macros/%hm_s_hm.sci17
-rwxr-xr-xmodules/overloading/macros/%hm_s_r.binbin0 -> 2996 bytes
-rwxr-xr-xmodules/overloading/macros/%hm_s_r.sci31
-rwxr-xr-xmodules/overloading/macros/%hm_s_s.binbin0 -> 1988 bytes
-rwxr-xr-xmodules/overloading/macros/%hm_s_s.sci26
-rwxr-xr-xmodules/overloading/macros/%hm_sign.binbin0 -> 340 bytes
-rwxr-xr-xmodules/overloading/macros/%hm_sign.sci13
-rwxr-xr-xmodules/overloading/macros/%hm_sin.binbin0 -> 340 bytes
-rwxr-xr-xmodules/overloading/macros/%hm_sin.sci13
-rwxr-xr-xmodules/overloading/macros/%hm_size.binbin0 -> 5280 bytes
-rwxr-xr-xmodules/overloading/macros/%hm_size.sci54
-rwxr-xr-xmodules/overloading/macros/%hm_sqrt.binbin0 -> 340 bytes
-rwxr-xr-xmodules/overloading/macros/%hm_sqrt.sci13
-rwxr-xr-xmodules/overloading/macros/%hm_stdev.binbin0 -> 8276 bytes
-rwxr-xr-xmodules/overloading/macros/%hm_stdev.sci66
-rwxr-xr-xmodules/overloading/macros/%hm_string.binbin0 -> 320 bytes
-rwxr-xr-xmodules/overloading/macros/%hm_string.sci11
-rwxr-xr-xmodules/overloading/macros/%hm_sum.binbin0 -> 13364 bytes
-rwxr-xr-xmodules/overloading/macros/%hm_sum.sci103
-rwxr-xr-xmodules/overloading/macros/%hm_x_hm.binbin0 -> 1144 bytes
-rwxr-xr-xmodules/overloading/macros/%hm_x_hm.sci17
-rwxr-xr-xmodules/overloading/macros/%hm_x_p.binbin0 -> 1048 bytes
-rwxr-xr-xmodules/overloading/macros/%hm_x_p.sci17
-rwxr-xr-xmodules/overloading/macros/%hm_x_s.binbin0 -> 1048 bytes
-rwxr-xr-xmodules/overloading/macros/%hm_x_s.sci17
-rwxr-xr-xmodules/overloading/macros/%hm_zeros.binbin0 -> 3956 bytes
-rwxr-xr-xmodules/overloading/macros/%hm_zeros.sci37
-rwxr-xr-xmodules/overloading/macros/%i_a_i.binbin0 -> 2484 bytes
-rwxr-xr-xmodules/overloading/macros/%i_a_i.sci19
-rwxr-xr-xmodules/overloading/macros/%i_and.binbin0 -> 1448 bytes
-rwxr-xr-xmodules/overloading/macros/%i_and.sci21
-rwxr-xr-xmodules/overloading/macros/%i_ascii.binbin0 -> 676 bytes
-rwxr-xr-xmodules/overloading/macros/%i_ascii.sci16
-rwxr-xr-xmodules/overloading/macros/%i_b_s.binbin0 -> 2516 bytes
-rwxr-xr-xmodules/overloading/macros/%i_b_s.sci25
-rwxr-xr-xmodules/overloading/macros/%i_bezout.binbin0 -> 3920 bytes
-rwxr-xr-xmodules/overloading/macros/%i_bezout.sci32
-rwxr-xr-xmodules/overloading/macros/%i_d_i.binbin0 -> 2484 bytes
-rwxr-xr-xmodules/overloading/macros/%i_d_i.sci19
-rwxr-xr-xmodules/overloading/macros/%i_dsearch.binbin0 -> 972 bytes
-rwxr-xr-xmodules/overloading/macros/%i_dsearch.sci18
-rwxr-xr-xmodules/overloading/macros/%i_e.binbin0 -> 3804 bytes
-rwxr-xr-xmodules/overloading/macros/%i_e.sci33
-rwxr-xr-xmodules/overloading/macros/%i_g_i.binbin0 -> 2484 bytes
-rwxr-xr-xmodules/overloading/macros/%i_g_i.sci19
-rwxr-xr-xmodules/overloading/macros/%i_gcd.binbin0 -> 5332 bytes
-rwxr-xr-xmodules/overloading/macros/%i_gcd.sci40
-rwxr-xr-xmodules/overloading/macros/%i_h_i.binbin0 -> 2484 bytes
-rwxr-xr-xmodules/overloading/macros/%i_h_i.sci19
-rwxr-xr-xmodules/overloading/macros/%i_i_ce.binbin0 -> 460 bytes
-rwxr-xr-xmodules/overloading/macros/%i_i_ce.sci14
-rwxr-xr-xmodules/overloading/macros/%i_i_h.binbin0 -> 360 bytes
-rwxr-xr-xmodules/overloading/macros/%i_i_h.sci16
-rwxr-xr-xmodules/overloading/macros/%i_i_hm.binbin0 -> 844 bytes
-rwxr-xr-xmodules/overloading/macros/%i_i_hm.sci15
-rwxr-xr-xmodules/overloading/macros/%i_i_i.binbin0 -> 2936 bytes
-rwxr-xr-xmodules/overloading/macros/%i_i_i.sci27
-rwxr-xr-xmodules/overloading/macros/%i_i_s.binbin0 -> 5760 bytes
-rwxr-xr-xmodules/overloading/macros/%i_i_s.sci46
-rwxr-xr-xmodules/overloading/macros/%i_i_st.binbin0 -> 360 bytes
-rwxr-xr-xmodules/overloading/macros/%i_i_st.sci12
-rwxr-xr-xmodules/overloading/macros/%i_lcm.binbin0 -> 2264 bytes
-rwxr-xr-xmodules/overloading/macros/%i_lcm.sci24
-rwxr-xr-xmodules/overloading/macros/%i_length.binbin0 -> 296 bytes
-rwxr-xr-xmodules/overloading/macros/%i_length.sci12
-rwxr-xr-xmodules/overloading/macros/%i_m_i.binbin0 -> 2484 bytes
-rwxr-xr-xmodules/overloading/macros/%i_m_i.sci19
-rwxr-xr-xmodules/overloading/macros/%i_or.binbin0 -> 1332 bytes
-rwxr-xr-xmodules/overloading/macros/%i_or.sci21
-rwxr-xr-xmodules/overloading/macros/%i_r_i.binbin0 -> 2484 bytes
-rwxr-xr-xmodules/overloading/macros/%i_r_i.sci19
-rwxr-xr-xmodules/overloading/macros/%i_round.binbin0 -> 104 bytes
-rwxr-xr-xmodules/overloading/macros/%i_round.sci11
-rwxr-xr-xmodules/overloading/macros/%i_s_i.binbin0 -> 2484 bytes
-rwxr-xr-xmodules/overloading/macros/%i_s_i.sci19
-rwxr-xr-xmodules/overloading/macros/%i_x_i.binbin0 -> 2484 bytes
-rwxr-xr-xmodules/overloading/macros/%i_x_i.sci19
-rwxr-xr-xmodules/overloading/macros/%ip_a_s.binbin0 -> 876 bytes
-rwxr-xr-xmodules/overloading/macros/%ip_a_s.sci14
-rwxr-xr-xmodules/overloading/macros/%ip_i_st.binbin0 -> 360 bytes
-rwxr-xr-xmodules/overloading/macros/%ip_i_st.sci12
-rwxr-xr-xmodules/overloading/macros/%ip_m_s.binbin0 -> 876 bytes
-rwxr-xr-xmodules/overloading/macros/%ip_m_s.sci14
-rwxr-xr-xmodules/overloading/macros/%ip_n_ip.binbin0 -> 660 bytes
-rwxr-xr-xmodules/overloading/macros/%ip_n_ip.sci12
-rwxr-xr-xmodules/overloading/macros/%ip_o_ip.binbin0 -> 660 bytes
-rwxr-xr-xmodules/overloading/macros/%ip_o_ip.sci12
-rwxr-xr-xmodules/overloading/macros/%ip_p.binbin0 -> 676 bytes
-rwxr-xr-xmodules/overloading/macros/%ip_p.sci12
-rwxr-xr-xmodules/overloading/macros/%ip_s_s.binbin0 -> 876 bytes
-rwxr-xr-xmodules/overloading/macros/%ip_s_s.sci14
-rwxr-xr-xmodules/overloading/macros/%ip_string.binbin0 -> 2100 bytes
-rwxr-xr-xmodules/overloading/macros/%ip_string.sci22
-rwxr-xr-xmodules/overloading/macros/%l_i_h.binbin0 -> 360 bytes
-rwxr-xr-xmodules/overloading/macros/%l_i_h.sci16
-rwxr-xr-xmodules/overloading/macros/%l_i_s.binbin0 -> 280 bytes
-rwxr-xr-xmodules/overloading/macros/%l_i_s.sci13
-rwxr-xr-xmodules/overloading/macros/%l_i_st.binbin0 -> 360 bytes
-rwxr-xr-xmodules/overloading/macros/%l_i_st.sci12
-rwxr-xr-xmodules/overloading/macros/%l_isequal.binbin0 -> 2540 bytes
-rwxr-xr-xmodules/overloading/macros/%l_isequal.sci30
-rwxr-xr-xmodules/overloading/macros/%l_n_c.binbin0 -> 328 bytes
-rwxr-xr-xmodules/overloading/macros/%l_n_c.sci15
-rwxr-xr-xmodules/overloading/macros/%l_n_l.binbin0 -> 3112 bytes
-rwxr-xr-xmodules/overloading/macros/%l_n_l.sci30
-rwxr-xr-xmodules/overloading/macros/%l_n_m.binbin0 -> 412 bytes
-rwxr-xr-xmodules/overloading/macros/%l_n_m.sci15
-rwxr-xr-xmodules/overloading/macros/%l_n_p.binbin0 -> 228 bytes
-rwxr-xr-xmodules/overloading/macros/%l_n_p.sci14
-rwxr-xr-xmodules/overloading/macros/%l_n_s.binbin0 -> 212 bytes
-rwxr-xr-xmodules/overloading/macros/%l_n_s.sci12
-rwxr-xr-xmodules/overloading/macros/%l_n_st.binbin0 -> 416 bytes
-rwxr-xr-xmodules/overloading/macros/%l_n_st.sci14
-rwxr-xr-xmodules/overloading/macros/%l_o_c.binbin0 -> 416 bytes
-rwxr-xr-xmodules/overloading/macros/%l_o_c.sci15
-rwxr-xr-xmodules/overloading/macros/%l_o_l.binbin0 -> 3760 bytes
-rwxr-xr-xmodules/overloading/macros/%l_o_l.sci37
-rwxr-xr-xmodules/overloading/macros/%l_o_m.binbin0 -> 532 bytes
-rwxr-xr-xmodules/overloading/macros/%l_o_m.sci14
-rwxr-xr-xmodules/overloading/macros/%l_o_p.binbin0 -> 480 bytes
-rwxr-xr-xmodules/overloading/macros/%l_o_p.sci15
-rwxr-xr-xmodules/overloading/macros/%l_o_s.binbin0 -> 428 bytes
-rwxr-xr-xmodules/overloading/macros/%l_o_s.sci15
-rwxr-xr-xmodules/overloading/macros/%l_o_st.binbin0 -> 416 bytes
-rwxr-xr-xmodules/overloading/macros/%l_o_st.sci14
-rwxr-xr-xmodules/overloading/macros/%lss_a_lss.binbin0 -> 2576 bytes
-rwxr-xr-xmodules/overloading/macros/%lss_a_lss.sci21
-rwxr-xr-xmodules/overloading/macros/%lss_a_p.binbin0 -> 472 bytes
-rwxr-xr-xmodules/overloading/macros/%lss_a_p.sci16
-rwxr-xr-xmodules/overloading/macros/%lss_a_r.binbin0 -> 612 bytes
-rwxr-xr-xmodules/overloading/macros/%lss_a_r.sci15
-rwxr-xr-xmodules/overloading/macros/%lss_a_s.binbin0 -> 460 bytes
-rwxr-xr-xmodules/overloading/macros/%lss_a_s.sci15
-rwxr-xr-xmodules/overloading/macros/%lss_c_lss.binbin0 -> 3384 bytes
-rwxr-xr-xmodules/overloading/macros/%lss_c_lss.sci22
-rwxr-xr-xmodules/overloading/macros/%lss_c_p.binbin0 -> 1712 bytes
-rwxr-xr-xmodules/overloading/macros/%lss_c_p.sci18
-rwxr-xr-xmodules/overloading/macros/%lss_c_r.binbin0 -> 596 bytes
-rwxr-xr-xmodules/overloading/macros/%lss_c_r.sci14
-rwxr-xr-xmodules/overloading/macros/%lss_c_s.binbin0 -> 1628 bytes
-rwxr-xr-xmodules/overloading/macros/%lss_c_s.sci17
-rwxr-xr-xmodules/overloading/macros/%lss_e.binbin0 -> 3988 bytes
-rwxr-xr-xmodules/overloading/macros/%lss_e.sci29
-rwxr-xr-xmodules/overloading/macros/%lss_eye.binbin0 -> 276 bytes
-rwxr-xr-xmodules/overloading/macros/%lss_eye.sci13
-rwxr-xr-xmodules/overloading/macros/%lss_f_lss.binbin0 -> 3248 bytes
-rwxr-xr-xmodules/overloading/macros/%lss_f_lss.sci21
-rwxr-xr-xmodules/overloading/macros/%lss_f_p.binbin0 -> 1640 bytes
-rwxr-xr-xmodules/overloading/macros/%lss_f_p.sci17
-rwxr-xr-xmodules/overloading/macros/%lss_f_r.binbin0 -> 460 bytes
-rwxr-xr-xmodules/overloading/macros/%lss_f_r.sci13
-rwxr-xr-xmodules/overloading/macros/%lss_f_s.binbin0 -> 1576 bytes
-rwxr-xr-xmodules/overloading/macros/%lss_f_s.sci16
-rwxr-xr-xmodules/overloading/macros/%lss_i_ce.binbin0 -> 408 bytes
-rwxr-xr-xmodules/overloading/macros/%lss_i_ce.sci13
-rwxr-xr-xmodules/overloading/macros/%lss_i_lss.binbin0 -> 7276 bytes
-rwxr-xr-xmodules/overloading/macros/%lss_i_lss.sci38
-rwxr-xr-xmodules/overloading/macros/%lss_i_p.binbin0 -> 4692 bytes
-rwxr-xr-xmodules/overloading/macros/%lss_i_p.sci41
-rwxr-xr-xmodules/overloading/macros/%lss_i_r.binbin0 -> 696 bytes
-rwxr-xr-xmodules/overloading/macros/%lss_i_r.sci14
-rwxr-xr-xmodules/overloading/macros/%lss_i_s.binbin0 -> 6140 bytes
-rwxr-xr-xmodules/overloading/macros/%lss_i_s.sci51
-rwxr-xr-xmodules/overloading/macros/%lss_i_st.binbin0 -> 360 bytes
-rwxr-xr-xmodules/overloading/macros/%lss_i_st.sci12
-rwxr-xr-xmodules/overloading/macros/%lss_inv.binbin0 -> 7028 bytes
-rwxr-xr-xmodules/overloading/macros/%lss_inv.sci62
-rwxr-xr-xmodules/overloading/macros/%lss_l_lss.binbin0 -> 520 bytes
-rwxr-xr-xmodules/overloading/macros/%lss_l_lss.sci14
-rwxr-xr-xmodules/overloading/macros/%lss_l_p.binbin0 -> 828 bytes
-rwxr-xr-xmodules/overloading/macros/%lss_l_p.sci16
-rwxr-xr-xmodules/overloading/macros/%lss_l_r.binbin0 -> 460 bytes
-rwxr-xr-xmodules/overloading/macros/%lss_l_r.sci13
-rwxr-xr-xmodules/overloading/macros/%lss_l_s.binbin0 -> 336 bytes
-rwxr-xr-xmodules/overloading/macros/%lss_l_s.sci14
-rwxr-xr-xmodules/overloading/macros/%lss_m_lss.binbin0 -> 9044 bytes
-rwxr-xr-xmodules/overloading/macros/%lss_m_lss.sci63
-rwxr-xr-xmodules/overloading/macros/%lss_m_p.binbin0 -> 912 bytes
-rwxr-xr-xmodules/overloading/macros/%lss_m_p.sci18
-rwxr-xr-xmodules/overloading/macros/%lss_m_r.binbin0 -> 608 bytes
-rwxr-xr-xmodules/overloading/macros/%lss_m_r.sci15
-rwxr-xr-xmodules/overloading/macros/%lss_m_s.binbin0 -> 5128 bytes
-rwxr-xr-xmodules/overloading/macros/%lss_m_s.sci37
-rwxr-xr-xmodules/overloading/macros/%lss_n_lss.binbin0 -> 784 bytes
-rwxr-xr-xmodules/overloading/macros/%lss_n_lss.sci13
-rwxr-xr-xmodules/overloading/macros/%lss_n_p.binbin0 -> 328 bytes
-rwxr-xr-xmodules/overloading/macros/%lss_n_p.sci13
-rwxr-xr-xmodules/overloading/macros/%lss_n_r.binbin0 -> 328 bytes
-rwxr-xr-xmodules/overloading/macros/%lss_n_r.sci13
-rwxr-xr-xmodules/overloading/macros/%lss_n_s.binbin0 -> 516 bytes
-rwxr-xr-xmodules/overloading/macros/%lss_n_s.sci13
-rwxr-xr-xmodules/overloading/macros/%lss_norm.binbin0 -> 1492 bytes
-rwxr-xr-xmodules/overloading/macros/%lss_norm.sci19
-rwxr-xr-xmodules/overloading/macros/%lss_o_lss.binbin0 -> 752 bytes
-rwxr-xr-xmodules/overloading/macros/%lss_o_lss.sci14
-rwxr-xr-xmodules/overloading/macros/%lss_o_p.binbin0 -> 332 bytes
-rwxr-xr-xmodules/overloading/macros/%lss_o_p.sci13
-rwxr-xr-xmodules/overloading/macros/%lss_o_r.binbin0 -> 324 bytes
-rwxr-xr-xmodules/overloading/macros/%lss_o_r.sci13
-rwxr-xr-xmodules/overloading/macros/%lss_o_s.binbin0 -> 516 bytes
-rwxr-xr-xmodules/overloading/macros/%lss_o_s.sci13
-rwxr-xr-xmodules/overloading/macros/%lss_ones.binbin0 -> 276 bytes
-rwxr-xr-xmodules/overloading/macros/%lss_ones.sci13
-rwxr-xr-xmodules/overloading/macros/%lss_r_lss.binbin0 -> 528 bytes
-rwxr-xr-xmodules/overloading/macros/%lss_r_lss.sci14
-rwxr-xr-xmodules/overloading/macros/%lss_r_p.binbin0 -> 852 bytes
-rwxr-xr-xmodules/overloading/macros/%lss_r_p.sci17
-rwxr-xr-xmodules/overloading/macros/%lss_r_r.binbin0 -> 472 bytes
-rwxr-xr-xmodules/overloading/macros/%lss_r_r.sci14
-rwxr-xr-xmodules/overloading/macros/%lss_r_s.binbin0 -> 644 bytes
-rwxr-xr-xmodules/overloading/macros/%lss_r_s.sci16
-rwxr-xr-xmodules/overloading/macros/%lss_rand.binbin0 -> 276 bytes
-rwxr-xr-xmodules/overloading/macros/%lss_rand.sci13
-rwxr-xr-xmodules/overloading/macros/%lss_s.binbin0 -> 444 bytes
-rwxr-xr-xmodules/overloading/macros/%lss_s.sci15
-rwxr-xr-xmodules/overloading/macros/%lss_s_lss.binbin0 -> 2648 bytes
-rwxr-xr-xmodules/overloading/macros/%lss_s_lss.sci21
-rwxr-xr-xmodules/overloading/macros/%lss_s_p.binbin0 -> 692 bytes
-rwxr-xr-xmodules/overloading/macros/%lss_s_p.sci16
-rwxr-xr-xmodules/overloading/macros/%lss_s_r.binbin0 -> 784 bytes
-rwxr-xr-xmodules/overloading/macros/%lss_s_r.sci18
-rwxr-xr-xmodules/overloading/macros/%lss_s_s.binbin0 -> 352 bytes
-rwxr-xr-xmodules/overloading/macros/%lss_s_s.sci14
-rwxr-xr-xmodules/overloading/macros/%lss_size.binbin0 -> 3252 bytes
-rwxr-xr-xmodules/overloading/macros/%lss_size.sci41
-rwxr-xr-xmodules/overloading/macros/%lss_t.binbin0 -> 1140 bytes
-rwxr-xr-xmodules/overloading/macros/%lss_t.sci16
-rwxr-xr-xmodules/overloading/macros/%lss_v_lss.binbin0 -> 3588 bytes
-rwxr-xr-xmodules/overloading/macros/%lss_v_lss.sci22
-rwxr-xr-xmodules/overloading/macros/%lss_v_p.binbin0 -> 1000 bytes
-rwxr-xr-xmodules/overloading/macros/%lss_v_p.sci17
-rwxr-xr-xmodules/overloading/macros/%lss_v_r.binbin0 -> 684 bytes
-rwxr-xr-xmodules/overloading/macros/%lss_v_r.sci14
-rwxr-xr-xmodules/overloading/macros/%lss_v_s.binbin0 -> 2184 bytes
-rwxr-xr-xmodules/overloading/macros/%lss_v_s.sci18
-rwxr-xr-xmodules/overloading/macros/%lt_i_s.binbin0 -> 280 bytes
-rwxr-xr-xmodules/overloading/macros/%lt_i_s.sci13
-rwxr-xr-xmodules/overloading/macros/%m_n_l.binbin0 -> 428 bytes
-rwxr-xr-xmodules/overloading/macros/%m_n_l.sci14
-rwxr-xr-xmodules/overloading/macros/%m_o_l.binbin0 -> 440 bytes
-rwxr-xr-xmodules/overloading/macros/%m_o_l.sci15
-rwxr-xr-xmodules/overloading/macros/%mc_i_h.binbin0 -> 360 bytes
-rwxr-xr-xmodules/overloading/macros/%mc_i_h.sci16
-rwxr-xr-xmodules/overloading/macros/%mc_i_s.binbin0 -> 280 bytes
-rwxr-xr-xmodules/overloading/macros/%mc_i_s.sci12
-rwxr-xr-xmodules/overloading/macros/%mc_i_st.binbin0 -> 360 bytes
-rwxr-xr-xmodules/overloading/macros/%mc_i_st.sci12
-rwxr-xr-xmodules/overloading/macros/%mc_n_st.binbin0 -> 436 bytes
-rwxr-xr-xmodules/overloading/macros/%mc_n_st.sci14
-rwxr-xr-xmodules/overloading/macros/%mc_o_st.binbin0 -> 436 bytes
-rwxr-xr-xmodules/overloading/macros/%mc_o_st.sci14
-rwxr-xr-xmodules/overloading/macros/%msp_i_s.binbin0 -> 4564 bytes
-rwxr-xr-xmodules/overloading/macros/%msp_i_s.sci44
-rwxr-xr-xmodules/overloading/macros/%msp_i_st.binbin0 -> 360 bytes
-rwxr-xr-xmodules/overloading/macros/%msp_i_st.sci12
-rwxr-xr-xmodules/overloading/macros/%msp_n_msp.binbin0 -> 1052 bytes
-rwxr-xr-xmodules/overloading/macros/%msp_n_msp.sci14
-rwxr-xr-xmodules/overloading/macros/%msp_o_msp.binbin0 -> 1052 bytes
-rwxr-xr-xmodules/overloading/macros/%msp_o_msp.sci14
-rwxr-xr-xmodules/overloading/macros/%msp_p.binbin0 -> 2772 bytes
-rwxr-xr-xmodules/overloading/macros/%msp_p.sci24
-rwxr-xr-xmodules/overloading/macros/%msp_spones.binbin0 -> 1284 bytes
-rwxr-xr-xmodules/overloading/macros/%msp_spones.sci17
-rwxr-xr-xmodules/overloading/macros/%p_a_lss.binbin0 -> 584 bytes
-rwxr-xr-xmodules/overloading/macros/%p_a_lss.sci14
-rwxr-xr-xmodules/overloading/macros/%p_a_r.binbin0 -> 5496 bytes
-rwxr-xr-xmodules/overloading/macros/%p_a_r.sci45
-rwxr-xr-xmodules/overloading/macros/%p_c_lss.binbin0 -> 1772 bytes
-rwxr-xr-xmodules/overloading/macros/%p_c_lss.sci16
-rwxr-xr-xmodules/overloading/macros/%p_c_r.binbin0 -> 972 bytes
-rwxr-xr-xmodules/overloading/macros/%p_c_r.sci15
-rwxr-xr-xmodules/overloading/macros/%p_cumprod.binbin0 -> 8292 bytes
-rwxr-xr-xmodules/overloading/macros/%p_cumprod.sci71
-rwxr-xr-xmodules/overloading/macros/%p_cumsum.binbin0 -> 7924 bytes
-rwxr-xr-xmodules/overloading/macros/%p_cumsum.sci71
-rwxr-xr-xmodules/overloading/macros/%p_d_p.binbin0 -> 1444 bytes
-rwxr-xr-xmodules/overloading/macros/%p_d_p.sci21
-rwxr-xr-xmodules/overloading/macros/%p_d_r.binbin0 -> 672 bytes
-rwxr-xr-xmodules/overloading/macros/%p_d_r.sci15
-rwxr-xr-xmodules/overloading/macros/%p_d_s.binbin0 -> 1272 bytes
-rwxr-xr-xmodules/overloading/macros/%p_d_s.sci19
-rwxr-xr-xmodules/overloading/macros/%p_det.binbin0 -> 240 bytes
-rwxr-xr-xmodules/overloading/macros/%p_det.sci12
-rwxr-xr-xmodules/overloading/macros/%p_e.binbin0 -> 4012 bytes
-rwxr-xr-xmodules/overloading/macros/%p_e.sci34
-rwxr-xr-xmodules/overloading/macros/%p_f_lss.binbin0 -> 1636 bytes
-rwxr-xr-xmodules/overloading/macros/%p_f_lss.sci17
-rwxr-xr-xmodules/overloading/macros/%p_f_r.binbin0 -> 760 bytes
-rwxr-xr-xmodules/overloading/macros/%p_f_r.sci14
-rwxr-xr-xmodules/overloading/macros/%p_i_ce.binbin0 -> 464 bytes
-rwxr-xr-xmodules/overloading/macros/%p_i_ce.sci13
-rwxr-xr-xmodules/overloading/macros/%p_i_h.binbin0 -> 360 bytes
-rwxr-xr-xmodules/overloading/macros/%p_i_h.sci16
-rwxr-xr-xmodules/overloading/macros/%p_i_hm.binbin0 -> 512 bytes
-rwxr-xr-xmodules/overloading/macros/%p_i_hm.sci14
-rwxr-xr-xmodules/overloading/macros/%p_i_lss.binbin0 -> 3020 bytes
-rwxr-xr-xmodules/overloading/macros/%p_i_lss.sci30
-rwxr-xr-xmodules/overloading/macros/%p_i_p.binbin0 -> 1336 bytes
-rwxr-xr-xmodules/overloading/macros/%p_i_p.sci17
-rwxr-xr-xmodules/overloading/macros/%p_i_r.binbin0 -> 2440 bytes
-rwxr-xr-xmodules/overloading/macros/%p_i_r.sci26
-rwxr-xr-xmodules/overloading/macros/%p_i_s.binbin0 -> 3604 bytes
-rwxr-xr-xmodules/overloading/macros/%p_i_s.sci31
-rwxr-xr-xmodules/overloading/macros/%p_i_st.binbin0 -> 360 bytes
-rwxr-xr-xmodules/overloading/macros/%p_i_st.sci12
-rwxr-xr-xmodules/overloading/macros/%p_inv.binbin0 -> 244 bytes
-rwxr-xr-xmodules/overloading/macros/%p_inv.sci13
-rwxr-xr-xmodules/overloading/macros/%p_j_s.binbin0 -> 8848 bytes
-rwxr-xr-xmodules/overloading/macros/%p_j_s.sci54
-rwxr-xr-xmodules/overloading/macros/%p_k_p.binbin0 -> 1840 bytes
-rwxr-xr-xmodules/overloading/macros/%p_k_p.sci25
-rwxr-xr-xmodules/overloading/macros/%p_k_r.binbin0 -> 1840 bytes
-rwxr-xr-xmodules/overloading/macros/%p_k_r.sci25
-rwxr-xr-xmodules/overloading/macros/%p_k_s.binbin0 -> 1840 bytes
-rwxr-xr-xmodules/overloading/macros/%p_k_s.sci25
-rwxr-xr-xmodules/overloading/macros/%p_l_lss.binbin0 -> 868 bytes
-rwxr-xr-xmodules/overloading/macros/%p_l_lss.sci16
-rwxr-xr-xmodules/overloading/macros/%p_l_p.binbin0 -> 1572 bytes
-rwxr-xr-xmodules/overloading/macros/%p_l_p.sci18
-rwxr-xr-xmodules/overloading/macros/%p_l_r.binbin0 -> 1164 bytes
-rwxr-xr-xmodules/overloading/macros/%p_l_r.sci20
-rwxr-xr-xmodules/overloading/macros/%p_l_s.binbin0 -> 2300 bytes
-rwxr-xr-xmodules/overloading/macros/%p_l_s.sci25
-rwxr-xr-xmodules/overloading/macros/%p_m_hm.binbin0 -> 928 bytes
-rwxr-xr-xmodules/overloading/macros/%p_m_hm.sci17
-rwxr-xr-xmodules/overloading/macros/%p_m_lss.binbin0 -> 896 bytes
-rwxr-xr-xmodules/overloading/macros/%p_m_lss.sci18
-rwxr-xr-xmodules/overloading/macros/%p_m_r.binbin0 -> 8276 bytes
-rwxr-xr-xmodules/overloading/macros/%p_m_r.sci67
-rwxr-xr-xmodules/overloading/macros/%p_matrix.binbin0 -> 340 bytes
-rwxr-xr-xmodules/overloading/macros/%p_matrix.sci12
-rwxr-xr-xmodules/overloading/macros/%p_n_l.binbin0 -> 444 bytes
-rwxr-xr-xmodules/overloading/macros/%p_n_l.sci14
-rwxr-xr-xmodules/overloading/macros/%p_n_lss.binbin0 -> 496 bytes
-rwxr-xr-xmodules/overloading/macros/%p_n_lss.sci14
-rwxr-xr-xmodules/overloading/macros/%p_n_r.binbin0 -> 1092 bytes
-rwxr-xr-xmodules/overloading/macros/%p_n_r.sci17
-rwxr-xr-xmodules/overloading/macros/%p_o_l.binbin0 -> 432 bytes
-rwxr-xr-xmodules/overloading/macros/%p_o_l.sci15
-rwxr-xr-xmodules/overloading/macros/%p_o_lss.binbin0 -> 512 bytes
-rwxr-xr-xmodules/overloading/macros/%p_o_lss.sci15
-rwxr-xr-xmodules/overloading/macros/%p_o_r.binbin0 -> 1000 bytes
-rwxr-xr-xmodules/overloading/macros/%p_o_r.sci16
-rwxr-xr-xmodules/overloading/macros/%p_o_sp.binbin0 -> 488 bytes
-rwxr-xr-xmodules/overloading/macros/%p_o_sp.sci14
-rwxr-xr-xmodules/overloading/macros/%p_p_s.binbin0 -> 7944 bytes
-rwxr-xr-xmodules/overloading/macros/%p_p_s.sci58
-rwxr-xr-xmodules/overloading/macros/%p_prod.binbin0 -> 7844 bytes
-rwxr-xr-xmodules/overloading/macros/%p_prod.sci70
-rwxr-xr-xmodules/overloading/macros/%p_q_p.binbin0 -> 1292 bytes
-rwxr-xr-xmodules/overloading/macros/%p_q_p.sci21
-rwxr-xr-xmodules/overloading/macros/%p_q_r.binbin0 -> 772 bytes
-rwxr-xr-xmodules/overloading/macros/%p_q_r.sci15
-rwxr-xr-xmodules/overloading/macros/%p_q_s.binbin0 -> 1156 bytes
-rwxr-xr-xmodules/overloading/macros/%p_q_s.sci20
-rwxr-xr-xmodules/overloading/macros/%p_r_lss.binbin0 -> 884 bytes
-rwxr-xr-xmodules/overloading/macros/%p_r_lss.sci16
-rwxr-xr-xmodules/overloading/macros/%p_r_p.binbin0 -> 1696 bytes
-rwxr-xr-xmodules/overloading/macros/%p_r_p.sci21
-rwxr-xr-xmodules/overloading/macros/%p_r_r.binbin0 -> 1436 bytes
-rwxr-xr-xmodules/overloading/macros/%p_r_r.sci18
-rwxr-xr-xmodules/overloading/macros/%p_r_s.binbin0 -> 2144 bytes
-rwxr-xr-xmodules/overloading/macros/%p_r_s.sci26
-rwxr-xr-xmodules/overloading/macros/%p_s_lss.binbin0 -> 636 bytes
-rwxr-xr-xmodules/overloading/macros/%p_s_lss.sci17
-rwxr-xr-xmodules/overloading/macros/%p_s_r.binbin0 -> 5552 bytes
-rwxr-xr-xmodules/overloading/macros/%p_s_r.sci44
-rwxr-xr-xmodules/overloading/macros/%p_simp.binbin0 -> 256 bytes
-rwxr-xr-xmodules/overloading/macros/%p_simp.sci12
-rwxr-xr-xmodules/overloading/macros/%p_string.binbin0 -> 8112 bytes
-rwxr-xr-xmodules/overloading/macros/%p_string.sci69
-rwxr-xr-xmodules/overloading/macros/%p_sum.binbin0 -> 7804 bytes
-rwxr-xr-xmodules/overloading/macros/%p_sum.sci68
-rwxr-xr-xmodules/overloading/macros/%p_v_lss.binbin0 -> 1008 bytes
-rwxr-xr-xmodules/overloading/macros/%p_v_lss.sci18
-rwxr-xr-xmodules/overloading/macros/%p_v_p.binbin0 -> 1864 bytes
-rwxr-xr-xmodules/overloading/macros/%p_v_p.sci18
-rwxr-xr-xmodules/overloading/macros/%p_v_r.binbin0 -> 1968 bytes
-rwxr-xr-xmodules/overloading/macros/%p_v_r.sci20
-rwxr-xr-xmodules/overloading/macros/%p_v_s.binbin0 -> 360 bytes
-rwxr-xr-xmodules/overloading/macros/%p_v_s.sci14
-rwxr-xr-xmodules/overloading/macros/%p_x_hm.binbin0 -> 448 bytes
-rwxr-xr-xmodules/overloading/macros/%p_x_hm.sci12
-rwxr-xr-xmodules/overloading/macros/%p_x_r.binbin0 -> 1988 bytes
-rwxr-xr-xmodules/overloading/macros/%p_x_r.sci24
-rwxr-xr-xmodules/overloading/macros/%p_y_p.binbin0 -> 1840 bytes
-rwxr-xr-xmodules/overloading/macros/%p_y_p.sci25
-rwxr-xr-xmodules/overloading/macros/%p_y_r.binbin0 -> 1840 bytes
-rwxr-xr-xmodules/overloading/macros/%p_y_r.sci25
-rwxr-xr-xmodules/overloading/macros/%p_y_s.binbin0 -> 1840 bytes
-rwxr-xr-xmodules/overloading/macros/%p_y_s.sci25
-rwxr-xr-xmodules/overloading/macros/%p_z_p.binbin0 -> 1840 bytes
-rwxr-xr-xmodules/overloading/macros/%p_z_p.sci25
-rwxr-xr-xmodules/overloading/macros/%p_z_r.binbin0 -> 1840 bytes
-rwxr-xr-xmodules/overloading/macros/%p_z_r.sci25
-rwxr-xr-xmodules/overloading/macros/%p_z_s.binbin0 -> 1840 bytes
-rwxr-xr-xmodules/overloading/macros/%p_z_s.sci25
-rwxr-xr-xmodules/overloading/macros/%plist_p.binbin0 -> 704 bytes
-rwxr-xr-xmodules/overloading/macros/%plist_p.sci21
-rwxr-xr-xmodules/overloading/macros/%r_0.binbin0 -> 856 bytes
-rwxr-xr-xmodules/overloading/macros/%r_0.sci15
-rwxr-xr-xmodules/overloading/macros/%r_a_hm.binbin0 -> 3132 bytes
-rwxr-xr-xmodules/overloading/macros/%r_a_hm.sci31
-rwxr-xr-xmodules/overloading/macros/%r_a_lss.binbin0 -> 696 bytes
-rwxr-xr-xmodules/overloading/macros/%r_a_lss.sci14
-rwxr-xr-xmodules/overloading/macros/%r_a_p.binbin0 -> 5672 bytes
-rwxr-xr-xmodules/overloading/macros/%r_a_p.sci46
-rwxr-xr-xmodules/overloading/macros/%r_a_r.binbin0 -> 11192 bytes
-rwxr-xr-xmodules/overloading/macros/%r_a_r.sci71
-rwxr-xr-xmodules/overloading/macros/%r_a_s.binbin0 -> 5692 bytes
-rwxr-xr-xmodules/overloading/macros/%r_a_s.sci45
-rwxr-xr-xmodules/overloading/macros/%r_c_lss.binbin0 -> 712 bytes
-rwxr-xr-xmodules/overloading/macros/%r_c_lss.sci14
-rwxr-xr-xmodules/overloading/macros/%r_c_p.binbin0 -> 828 bytes
-rwxr-xr-xmodules/overloading/macros/%r_c_p.sci14
-rwxr-xr-xmodules/overloading/macros/%r_c_r.binbin0 -> 900 bytes
-rwxr-xr-xmodules/overloading/macros/%r_c_r.sci15
-rwxr-xr-xmodules/overloading/macros/%r_c_s.binbin0 -> 840 bytes
-rwxr-xr-xmodules/overloading/macros/%r_c_s.sci14
-rwxr-xr-xmodules/overloading/macros/%r_clean.binbin0 -> 2576 bytes
-rwxr-xr-xmodules/overloading/macros/%r_clean.sci29
-rwxr-xr-xmodules/overloading/macros/%r_cumprod.binbin0 -> 8716 bytes
-rwxr-xr-xmodules/overloading/macros/%r_cumprod.sci70
-rwxr-xr-xmodules/overloading/macros/%r_cumsum.binbin0 -> 11484 bytes
-rwxr-xr-xmodules/overloading/macros/%r_cumsum.sci80
-rwxr-xr-xmodules/overloading/macros/%r_d_p.binbin0 -> 672 bytes
-rwxr-xr-xmodules/overloading/macros/%r_d_p.sci15
-rwxr-xr-xmodules/overloading/macros/%r_d_r.binbin0 -> 3016 bytes
-rwxr-xr-xmodules/overloading/macros/%r_d_r.sci26
-rwxr-xr-xmodules/overloading/macros/%r_d_s.binbin0 -> 936 bytes
-rwxr-xr-xmodules/overloading/macros/%r_d_s.sci16
-rwxr-xr-xmodules/overloading/macros/%r_det.binbin0 -> 516 bytes
-rwxr-xr-xmodules/overloading/macros/%r_det.sci14
-rwxr-xr-xmodules/overloading/macros/%r_diag.binbin0 -> 3668 bytes
-rwxr-xr-xmodules/overloading/macros/%r_diag.sci28
-rwxr-xr-xmodules/overloading/macros/%r_e.binbin0 -> 1636 bytes
-rwxr-xr-xmodules/overloading/macros/%r_e.sci19
-rwxr-xr-xmodules/overloading/macros/%r_eye.binbin0 -> 284 bytes
-rwxr-xr-xmodules/overloading/macros/%r_eye.sci13
-rwxr-xr-xmodules/overloading/macros/%r_f_lss.binbin0 -> 720 bytes
-rwxr-xr-xmodules/overloading/macros/%r_f_lss.sci14
-rwxr-xr-xmodules/overloading/macros/%r_f_p.binbin0 -> 668 bytes
-rwxr-xr-xmodules/overloading/macros/%r_f_p.sci15
-rwxr-xr-xmodules/overloading/macros/%r_f_r.binbin0 -> 904 bytes
-rwxr-xr-xmodules/overloading/macros/%r_f_r.sci16
-rwxr-xr-xmodules/overloading/macros/%r_f_s.binbin0 -> 756 bytes
-rwxr-xr-xmodules/overloading/macros/%r_f_s.sci15
-rwxr-xr-xmodules/overloading/macros/%r_i_ce.binbin0 -> 460 bytes
-rwxr-xr-xmodules/overloading/macros/%r_i_ce.sci13
-rwxr-xr-xmodules/overloading/macros/%r_i_hm.binbin0 -> 1784 bytes
-rwxr-xr-xmodules/overloading/macros/%r_i_hm.sci21
-rwxr-xr-xmodules/overloading/macros/%r_i_lss.binbin0 -> 1136 bytes
-rwxr-xr-xmodules/overloading/macros/%r_i_lss.sci18
-rwxr-xr-xmodules/overloading/macros/%r_i_p.binbin0 -> 1752 bytes
-rwxr-xr-xmodules/overloading/macros/%r_i_p.sci22
-rwxr-xr-xmodules/overloading/macros/%r_i_r.binbin0 -> 3104 bytes
-rwxr-xr-xmodules/overloading/macros/%r_i_r.sci28
-rwxr-xr-xmodules/overloading/macros/%r_i_s.binbin0 -> 3908 bytes
-rwxr-xr-xmodules/overloading/macros/%r_i_s.sci36
-rwxr-xr-xmodules/overloading/macros/%r_i_st.binbin0 -> 280 bytes
-rwxr-xr-xmodules/overloading/macros/%r_i_st.sci12
-rwxr-xr-xmodules/overloading/macros/%r_inv.binbin0 -> 244 bytes
-rwxr-xr-xmodules/overloading/macros/%r_inv.sci13
-rwxr-xr-xmodules/overloading/macros/%r_j_s.binbin0 -> 9416 bytes
-rwxr-xr-xmodules/overloading/macros/%r_j_s.sci58
-rwxr-xr-xmodules/overloading/macros/%r_k_p.binbin0 -> 1840 bytes
-rwxr-xr-xmodules/overloading/macros/%r_k_p.sci25
-rwxr-xr-xmodules/overloading/macros/%r_k_r.binbin0 -> 1836 bytes
-rwxr-xr-xmodules/overloading/macros/%r_k_r.sci24
-rwxr-xr-xmodules/overloading/macros/%r_k_s.binbin0 -> 1840 bytes
-rwxr-xr-xmodules/overloading/macros/%r_k_s.sci24
-rwxr-xr-xmodules/overloading/macros/%r_l_lss.binbin0 -> 476 bytes
-rwxr-xr-xmodules/overloading/macros/%r_l_lss.sci14
-rwxr-xr-xmodules/overloading/macros/%r_l_p.binbin0 -> 1088 bytes
-rwxr-xr-xmodules/overloading/macros/%r_l_p.sci19
-rwxr-xr-xmodules/overloading/macros/%r_l_r.binbin0 -> 3064 bytes
-rwxr-xr-xmodules/overloading/macros/%r_l_r.sci29
-rwxr-xr-xmodules/overloading/macros/%r_l_s.binbin0 -> 1092 bytes
-rwxr-xr-xmodules/overloading/macros/%r_l_s.sci19
-rwxr-xr-xmodules/overloading/macros/%r_m_hm.binbin0 -> 2616 bytes
-rwxr-xr-xmodules/overloading/macros/%r_m_hm.sci34
-rwxr-xr-xmodules/overloading/macros/%r_m_lss.binbin0 -> 516 bytes
-rwxr-xr-xmodules/overloading/macros/%r_m_lss.sci15
-rwxr-xr-xmodules/overloading/macros/%r_m_p.binbin0 -> 6652 bytes
-rwxr-xr-xmodules/overloading/macros/%r_m_p.sci54
-rwxr-xr-xmodules/overloading/macros/%r_m_r.binbin0 -> 8932 bytes
-rwxr-xr-xmodules/overloading/macros/%r_m_r.sci61
-rwxr-xr-xmodules/overloading/macros/%r_m_s.binbin0 -> 7056 bytes
-rwxr-xr-xmodules/overloading/macros/%r_m_s.sci57
-rwxr-xr-xmodules/overloading/macros/%r_matrix.binbin0 -> 712 bytes
-rwxr-xr-xmodules/overloading/macros/%r_matrix.sci12
-rwxr-xr-xmodules/overloading/macros/%r_n_lss.binbin0 -> 352 bytes
-rwxr-xr-xmodules/overloading/macros/%r_n_lss.sci15
-rwxr-xr-xmodules/overloading/macros/%r_n_p.binbin0 -> 880 bytes
-rwxr-xr-xmodules/overloading/macros/%r_n_p.sci16
-rwxr-xr-xmodules/overloading/macros/%r_n_r.binbin0 -> 1176 bytes
-rwxr-xr-xmodules/overloading/macros/%r_n_r.sci18
-rwxr-xr-xmodules/overloading/macros/%r_n_s.binbin0 -> 1204 bytes
-rwxr-xr-xmodules/overloading/macros/%r_n_s.sci16
-rwxr-xr-xmodules/overloading/macros/%r_norm.binbin0 -> 1484 bytes
-rwxr-xr-xmodules/overloading/macros/%r_norm.sci19
-rwxr-xr-xmodules/overloading/macros/%r_o_lss.binbin0 -> 464 bytes
-rwxr-xr-xmodules/overloading/macros/%r_o_lss.sci15
-rwxr-xr-xmodules/overloading/macros/%r_o_p.binbin0 -> 948 bytes
-rwxr-xr-xmodules/overloading/macros/%r_o_p.sci16
-rwxr-xr-xmodules/overloading/macros/%r_o_r.binbin0 -> 1984 bytes
-rwxr-xr-xmodules/overloading/macros/%r_o_r.sci21
-rwxr-xr-xmodules/overloading/macros/%r_o_s.binbin0 -> 1164 bytes
-rwxr-xr-xmodules/overloading/macros/%r_o_s.sci16
-rwxr-xr-xmodules/overloading/macros/%r_ones.binbin0 -> 284 bytes
-rwxr-xr-xmodules/overloading/macros/%r_ones.sci13
-rwxr-xr-xmodules/overloading/macros/%r_p.binbin0 -> 30648 bytes
-rwxr-xr-xmodules/overloading/macros/%r_p.sci202
-rwxr-xr-xmodules/overloading/macros/%r_p_s.binbin0 -> 9804 bytes
-rwxr-xr-xmodules/overloading/macros/%r_p_s.sci60
-rwxr-xr-xmodules/overloading/macros/%r_prod.binbin0 -> 8648 bytes
-rwxr-xr-xmodules/overloading/macros/%r_prod.sci65
-rwxr-xr-xmodules/overloading/macros/%r_q_p.binbin0 -> 672 bytes
-rwxr-xr-xmodules/overloading/macros/%r_q_p.sci15
-rwxr-xr-xmodules/overloading/macros/%r_q_r.binbin0 -> 3276 bytes
-rwxr-xr-xmodules/overloading/macros/%r_q_r.sci28
-rwxr-xr-xmodules/overloading/macros/%r_q_s.binbin0 -> 904 bytes
-rwxr-xr-xmodules/overloading/macros/%r_q_s.sci16
-rwxr-xr-xmodules/overloading/macros/%r_r_lss.binbin0 -> 480 bytes
-rwxr-xr-xmodules/overloading/macros/%r_r_lss.sci15
-rwxr-xr-xmodules/overloading/macros/%r_r_p.binbin0 -> 1156 bytes
-rwxr-xr-xmodules/overloading/macros/%r_r_p.sci17
-rwxr-xr-xmodules/overloading/macros/%r_r_r.binbin0 -> 3196 bytes
-rwxr-xr-xmodules/overloading/macros/%r_r_r.sci29
-rwxr-xr-xmodules/overloading/macros/%r_r_s.binbin0 -> 4992 bytes
-rwxr-xr-xmodules/overloading/macros/%r_r_s.sci39
-rwxr-xr-xmodules/overloading/macros/%r_rand.binbin0 -> 284 bytes
-rwxr-xr-xmodules/overloading/macros/%r_rand.sci13
-rwxr-xr-xmodules/overloading/macros/%r_s.binbin0 -> 380 bytes
-rwxr-xr-xmodules/overloading/macros/%r_s.sci15
-rwxr-xr-xmodules/overloading/macros/%r_s_hm.binbin0 -> 3132 bytes
-rwxr-xr-xmodules/overloading/macros/%r_s_hm.sci31
-rwxr-xr-xmodules/overloading/macros/%r_s_lss.binbin0 -> 752 bytes
-rwxr-xr-xmodules/overloading/macros/%r_s_lss.sci18
-rwxr-xr-xmodules/overloading/macros/%r_s_p.binbin0 -> 5692 bytes
-rwxr-xr-xmodules/overloading/macros/%r_s_p.sci45
-rwxr-xr-xmodules/overloading/macros/%r_s_r.binbin0 -> 11136 bytes
-rwxr-xr-xmodules/overloading/macros/%r_s_r.sci68
-rwxr-xr-xmodules/overloading/macros/%r_s_s.binbin0 -> 5692 bytes
-rwxr-xr-xmodules/overloading/macros/%r_s_s.sci45
-rwxr-xr-xmodules/overloading/macros/%r_simp.binbin0 -> 212 bytes
-rwxr-xr-xmodules/overloading/macros/%r_simp.sci13
-rwxr-xr-xmodules/overloading/macros/%r_size.binbin0 -> 2088 bytes
-rwxr-xr-xmodules/overloading/macros/%r_size.sci30
-rwxr-xr-xmodules/overloading/macros/%r_string.binbin0 -> 5024 bytes
-rwxr-xr-xmodules/overloading/macros/%r_string.sci30
-rwxr-xr-xmodules/overloading/macros/%r_sum.binbin0 -> 8032 bytes
-rwxr-xr-xmodules/overloading/macros/%r_sum.sci67
-rwxr-xr-xmodules/overloading/macros/%r_t.binbin0 -> 516 bytes
-rwxr-xr-xmodules/overloading/macros/%r_t.sci15
-rwxr-xr-xmodules/overloading/macros/%r_tril.binbin0 -> 2052 bytes
-rwxr-xr-xmodules/overloading/macros/%r_tril.sci20
-rwxr-xr-xmodules/overloading/macros/%r_triu.binbin0 -> 2300 bytes
-rwxr-xr-xmodules/overloading/macros/%r_triu.sci21
-rwxr-xr-xmodules/overloading/macros/%r_v_lss.binbin0 -> 608 bytes
-rwxr-xr-xmodules/overloading/macros/%r_v_lss.sci14
-rwxr-xr-xmodules/overloading/macros/%r_v_p.binbin0 -> 1916 bytes
-rwxr-xr-xmodules/overloading/macros/%r_v_p.sci19
-rwxr-xr-xmodules/overloading/macros/%r_v_r.binbin0 -> 2988 bytes
-rwxr-xr-xmodules/overloading/macros/%r_v_r.sci23
-rwxr-xr-xmodules/overloading/macros/%r_v_s.binbin0 -> 2420 bytes
-rwxr-xr-xmodules/overloading/macros/%r_v_s.sci23
-rwxr-xr-xmodules/overloading/macros/%r_varn.binbin0 -> 1004 bytes
-rwxr-xr-xmodules/overloading/macros/%r_varn.sci16
-rwxr-xr-xmodules/overloading/macros/%r_x_p.binbin0 -> 1856 bytes
-rwxr-xr-xmodules/overloading/macros/%r_x_p.sci24
-rwxr-xr-xmodules/overloading/macros/%r_x_r.binbin0 -> 3248 bytes
-rwxr-xr-xmodules/overloading/macros/%r_x_r.sci27
-rwxr-xr-xmodules/overloading/macros/%r_x_s.binbin0 -> 900 bytes
-rwxr-xr-xmodules/overloading/macros/%r_x_s.sci19
-rwxr-xr-xmodules/overloading/macros/%r_y_p.binbin0 -> 1836 bytes
-rwxr-xr-xmodules/overloading/macros/%r_y_p.sci23
-rwxr-xr-xmodules/overloading/macros/%r_y_r.binbin0 -> 1840 bytes
-rwxr-xr-xmodules/overloading/macros/%r_y_r.sci24
-rwxr-xr-xmodules/overloading/macros/%r_y_s.binbin0 -> 1840 bytes
-rwxr-xr-xmodules/overloading/macros/%r_y_s.sci24
-rwxr-xr-xmodules/overloading/macros/%r_z_p.binbin0 -> 1840 bytes
-rwxr-xr-xmodules/overloading/macros/%r_z_p.sci24
-rwxr-xr-xmodules/overloading/macros/%r_z_r.binbin0 -> 1840 bytes
-rwxr-xr-xmodules/overloading/macros/%r_z_r.sci24
-rwxr-xr-xmodules/overloading/macros/%r_z_s.binbin0 -> 1840 bytes
-rwxr-xr-xmodules/overloading/macros/%r_z_s.sci24
-rwxr-xr-xmodules/overloading/macros/%s_1_hm.binbin0 -> 1080 bytes
-rwxr-xr-xmodules/overloading/macros/%s_1_hm.sci16
-rwxr-xr-xmodules/overloading/macros/%s_2_hm.binbin0 -> 1080 bytes
-rwxr-xr-xmodules/overloading/macros/%s_2_hm.sci16
-rwxr-xr-xmodules/overloading/macros/%s_3_hm.binbin0 -> 1084 bytes
-rwxr-xr-xmodules/overloading/macros/%s_3_hm.sci16
-rwxr-xr-xmodules/overloading/macros/%s_4_hm.binbin0 -> 1084 bytes
-rwxr-xr-xmodules/overloading/macros/%s_4_hm.sci16
-rwxr-xr-xmodules/overloading/macros/%s_5.binbin0 -> 384 bytes
-rwxr-xr-xmodules/overloading/macros/%s_5.sci13
-rwxr-xr-xmodules/overloading/macros/%s_a_hm.binbin0 -> 1984 bytes
-rwxr-xr-xmodules/overloading/macros/%s_a_hm.sci24
-rwxr-xr-xmodules/overloading/macros/%s_a_ip.binbin0 -> 876 bytes
-rwxr-xr-xmodules/overloading/macros/%s_a_ip.sci13
-rwxr-xr-xmodules/overloading/macros/%s_a_lss.binbin0 -> 368 bytes
-rwxr-xr-xmodules/overloading/macros/%s_a_lss.sci13
-rwxr-xr-xmodules/overloading/macros/%s_a_r.binbin0 -> 5496 bytes
-rwxr-xr-xmodules/overloading/macros/%s_a_r.sci44
-rwxr-xr-xmodules/overloading/macros/%s_a_sp.binbin0 -> 1292 bytes
-rwxr-xr-xmodules/overloading/macros/%s_a_sp.sci20
-rwxr-xr-xmodules/overloading/macros/%s_and.binbin0 -> 1580 bytes
-rwxr-xr-xmodules/overloading/macros/%s_and.sci21
-rwxr-xr-xmodules/overloading/macros/%s_b_i.binbin0 -> 2516 bytes
-rwxr-xr-xmodules/overloading/macros/%s_b_i.sci24
-rwxr-xr-xmodules/overloading/macros/%s_b_s.binbin0 -> 2492 bytes
-rwxr-xr-xmodules/overloading/macros/%s_b_s.sci23
-rwxr-xr-xmodules/overloading/macros/%s_c_cblock.binbin0 -> 1652 bytes
-rwxr-xr-xmodules/overloading/macros/%s_c_cblock.sci21
-rwxr-xr-xmodules/overloading/macros/%s_c_lss.binbin0 -> 1848 bytes
-rwxr-xr-xmodules/overloading/macros/%s_c_lss.sci20
-rwxr-xr-xmodules/overloading/macros/%s_c_r.binbin0 -> 716 bytes
-rwxr-xr-xmodules/overloading/macros/%s_c_r.sci15
-rwxr-xr-xmodules/overloading/macros/%s_c_sp.binbin0 -> 416 bytes
-rwxr-xr-xmodules/overloading/macros/%s_c_sp.sci13
-rwxr-xr-xmodules/overloading/macros/%s_d_p.binbin0 -> 1312 bytes
-rwxr-xr-xmodules/overloading/macros/%s_d_p.sci20
-rwxr-xr-xmodules/overloading/macros/%s_d_r.binbin0 -> 908 bytes
-rwxr-xr-xmodules/overloading/macros/%s_d_r.sci16
-rwxr-xr-xmodules/overloading/macros/%s_d_sp.binbin0 -> 1000 bytes
-rwxr-xr-xmodules/overloading/macros/%s_d_sp.sci19
-rwxr-xr-xmodules/overloading/macros/%s_e.binbin0 -> 3748 bytes
-rwxr-xr-xmodules/overloading/macros/%s_e.sci33
-rwxr-xr-xmodules/overloading/macros/%s_f_cblock.binbin0 -> 360 bytes
-rwxr-xr-xmodules/overloading/macros/%s_f_cblock.sci12
-rwxr-xr-xmodules/overloading/macros/%s_f_lss.binbin0 -> 1628 bytes
-rwxr-xr-xmodules/overloading/macros/%s_f_lss.sci17
-rwxr-xr-xmodules/overloading/macros/%s_f_r.binbin0 -> 668 bytes
-rwxr-xr-xmodules/overloading/macros/%s_f_r.sci15
-rwxr-xr-xmodules/overloading/macros/%s_f_sp.binbin0 -> 420 bytes
-rwxr-xr-xmodules/overloading/macros/%s_f_sp.sci14
-rwxr-xr-xmodules/overloading/macros/%s_g_b.binbin0 -> 328 bytes
-rwxr-xr-xmodules/overloading/macros/%s_g_b.sci14
-rwxr-xr-xmodules/overloading/macros/%s_g_s.binbin0 -> 760 bytes
-rwxr-xr-xmodules/overloading/macros/%s_g_s.sci18
-rwxr-xr-xmodules/overloading/macros/%s_h_b.binbin0 -> 324 bytes
-rwxr-xr-xmodules/overloading/macros/%s_h_b.sci13
-rwxr-xr-xmodules/overloading/macros/%s_h_s.binbin0 -> 756 bytes
-rwxr-xr-xmodules/overloading/macros/%s_h_s.sci17
-rwxr-xr-xmodules/overloading/macros/%s_i_b.binbin0 -> 2156 bytes
-rwxr-xr-xmodules/overloading/macros/%s_i_b.sci23
-rwxr-xr-xmodules/overloading/macros/%s_i_c.binbin0 -> 2032 bytes
-rwxr-xr-xmodules/overloading/macros/%s_i_c.sci25
-rwxr-xr-xmodules/overloading/macros/%s_i_ce.binbin0 -> 448 bytes
-rwxr-xr-xmodules/overloading/macros/%s_i_ce.sci16
-rwxr-xr-xmodules/overloading/macros/%s_i_h.binbin0 -> 360 bytes
-rwxr-xr-xmodules/overloading/macros/%s_i_h.sci14
-rwxr-xr-xmodules/overloading/macros/%s_i_hm.binbin0 -> 3836 bytes
-rwxr-xr-xmodules/overloading/macros/%s_i_hm.sci32
-rwxr-xr-xmodules/overloading/macros/%s_i_lss.binbin0 -> 7648 bytes
-rwxr-xr-xmodules/overloading/macros/%s_i_lss.sci61
-rwxr-xr-xmodules/overloading/macros/%s_i_p.binbin0 -> 1316 bytes
-rwxr-xr-xmodules/overloading/macros/%s_i_p.sci16
-rwxr-xr-xmodules/overloading/macros/%s_i_r.binbin0 -> 3252 bytes
-rwxr-xr-xmodules/overloading/macros/%s_i_r.sci29
-rwxr-xr-xmodules/overloading/macros/%s_i_s.binbin0 -> 20660 bytes
-rwxr-xr-xmodules/overloading/macros/%s_i_s.sci164
-rwxr-xr-xmodules/overloading/macros/%s_i_sp.binbin0 -> 1256 bytes
-rwxr-xr-xmodules/overloading/macros/%s_i_sp.sci21
-rwxr-xr-xmodules/overloading/macros/%s_i_spb.binbin0 -> 1312 bytes
-rwxr-xr-xmodules/overloading/macros/%s_i_spb.sci24
-rwxr-xr-xmodules/overloading/macros/%s_i_st.binbin0 -> 13152 bytes
-rwxr-xr-xmodules/overloading/macros/%s_i_st.sci95
-rwxr-xr-xmodules/overloading/macros/%s_k_hm.binbin0 -> 300 bytes
-rwxr-xr-xmodules/overloading/macros/%s_k_hm.sci12
-rwxr-xr-xmodules/overloading/macros/%s_k_p.binbin0 -> 1836 bytes
-rwxr-xr-xmodules/overloading/macros/%s_k_p.sci24
-rwxr-xr-xmodules/overloading/macros/%s_k_r.binbin0 -> 1840 bytes
-rwxr-xr-xmodules/overloading/macros/%s_k_r.sci25
-rwxr-xr-xmodules/overloading/macros/%s_k_sp.binbin0 -> 600 bytes
-rwxr-xr-xmodules/overloading/macros/%s_k_sp.sci15
-rwxr-xr-xmodules/overloading/macros/%s_l_hm.binbin0 -> 824 bytes
-rwxr-xr-xmodules/overloading/macros/%s_l_hm.sci17
-rwxr-xr-xmodules/overloading/macros/%s_l_lss.binbin0 -> 348 bytes
-rwxr-xr-xmodules/overloading/macros/%s_l_lss.sci15
-rwxr-xr-xmodules/overloading/macros/%s_l_p.binbin0 -> 2052 bytes
-rwxr-xr-xmodules/overloading/macros/%s_l_p.sci25
-rwxr-xr-xmodules/overloading/macros/%s_l_r.binbin0 -> 3932 bytes
-rwxr-xr-xmodules/overloading/macros/%s_l_r.sci33
-rwxr-xr-xmodules/overloading/macros/%s_l_s.binbin0 -> 816 bytes
-rwxr-xr-xmodules/overloading/macros/%s_l_s.sci14
-rwxr-xr-xmodules/overloading/macros/%s_l_sp.binbin0 -> 424 bytes
-rwxr-xr-xmodules/overloading/macros/%s_l_sp.sci13
-rwxr-xr-xmodules/overloading/macros/%s_m_hm.binbin0 -> 2996 bytes
-rwxr-xr-xmodules/overloading/macros/%s_m_hm.sci28
-rwxr-xr-xmodules/overloading/macros/%s_m_ip.binbin0 -> 876 bytes
-rwxr-xr-xmodules/overloading/macros/%s_m_ip.sci14
-rwxr-xr-xmodules/overloading/macros/%s_m_lss.binbin0 -> 1804 bytes
-rwxr-xr-xmodules/overloading/macros/%s_m_lss.sci20
-rwxr-xr-xmodules/overloading/macros/%s_m_r.binbin0 -> 7164 bytes
-rwxr-xr-xmodules/overloading/macros/%s_m_r.sci57
-rwxr-xr-xmodules/overloading/macros/%s_matrix.binbin0 -> 340 bytes
-rwxr-xr-xmodules/overloading/macros/%s_matrix.sci12
-rwxr-xr-xmodules/overloading/macros/%s_n_hm.binbin0 -> 660 bytes
-rwxr-xr-xmodules/overloading/macros/%s_n_hm.sci16
-rwxr-xr-xmodules/overloading/macros/%s_n_l.binbin0 -> 348 bytes
-rwxr-xr-xmodules/overloading/macros/%s_n_l.sci14
-rwxr-xr-xmodules/overloading/macros/%s_n_lss.binbin0 -> 608 bytes
-rwxr-xr-xmodules/overloading/macros/%s_n_lss.sci14
-rwxr-xr-xmodules/overloading/macros/%s_n_r.binbin0 -> 1432 bytes
-rwxr-xr-xmodules/overloading/macros/%s_n_r.sci18
-rwxr-xr-xmodules/overloading/macros/%s_n_st.binbin0 -> 528 bytes
-rwxr-xr-xmodules/overloading/macros/%s_n_st.sci14
-rwxr-xr-xmodules/overloading/macros/%s_o_hm.binbin0 -> 664 bytes
-rwxr-xr-xmodules/overloading/macros/%s_o_hm.sci17
-rwxr-xr-xmodules/overloading/macros/%s_o_l.binbin0 -> 348 bytes
-rwxr-xr-xmodules/overloading/macros/%s_o_l.sci14
-rwxr-xr-xmodules/overloading/macros/%s_o_lss.binbin0 -> 576 bytes
-rwxr-xr-xmodules/overloading/macros/%s_o_lss.sci15
-rwxr-xr-xmodules/overloading/macros/%s_o_r.binbin0 -> 1128 bytes
-rwxr-xr-xmodules/overloading/macros/%s_o_r.sci15
-rwxr-xr-xmodules/overloading/macros/%s_o_st.binbin0 -> 528 bytes
-rwxr-xr-xmodules/overloading/macros/%s_o_st.sci14
-rwxr-xr-xmodules/overloading/macros/%s_or.binbin0 -> 1516 bytes
-rwxr-xr-xmodules/overloading/macros/%s_or.sci21
-rwxr-xr-xmodules/overloading/macros/%s_pow.binbin0 -> 9756 bytes
-rwxr-xr-xmodules/overloading/macros/%s_pow.sci72
-rwxr-xr-xmodules/overloading/macros/%s_q_hm.binbin0 -> 988 bytes
-rwxr-xr-xmodules/overloading/macros/%s_q_hm.sci17
-rwxr-xr-xmodules/overloading/macros/%s_q_p.binbin0 -> 1192 bytes
-rwxr-xr-xmodules/overloading/macros/%s_q_p.sci20
-rwxr-xr-xmodules/overloading/macros/%s_q_r.binbin0 -> 964 bytes
-rwxr-xr-xmodules/overloading/macros/%s_q_r.sci16
-rwxr-xr-xmodules/overloading/macros/%s_q_sp.binbin0 -> 356 bytes
-rwxr-xr-xmodules/overloading/macros/%s_q_sp.sci14
-rwxr-xr-xmodules/overloading/macros/%s_r_lss.binbin0 -> 836 bytes
-rwxr-xr-xmodules/overloading/macros/%s_r_lss.sci16
-rwxr-xr-xmodules/overloading/macros/%s_r_p.binbin0 -> 2404 bytes
-rwxr-xr-xmodules/overloading/macros/%s_r_p.sci27
-rwxr-xr-xmodules/overloading/macros/%s_r_r.binbin0 -> 1320 bytes
-rwxr-xr-xmodules/overloading/macros/%s_r_r.sci16
-rwxr-xr-xmodules/overloading/macros/%s_r_s.binbin0 -> 816 bytes
-rwxr-xr-xmodules/overloading/macros/%s_r_s.sci14
-rwxr-xr-xmodules/overloading/macros/%s_r_sp.binbin0 -> 6272 bytes
-rwxr-xr-xmodules/overloading/macros/%s_r_sp.sci40
-rwxr-xr-xmodules/overloading/macros/%s_s_hm.binbin0 -> 1980 bytes
-rwxr-xr-xmodules/overloading/macros/%s_s_hm.sci25
-rwxr-xr-xmodules/overloading/macros/%s_s_ip.binbin0 -> 876 bytes
-rwxr-xr-xmodules/overloading/macros/%s_s_ip.sci14
-rwxr-xr-xmodules/overloading/macros/%s_s_lss.binbin0 -> 1028 bytes
-rwxr-xr-xmodules/overloading/macros/%s_s_lss.sci14
-rwxr-xr-xmodules/overloading/macros/%s_s_r.binbin0 -> 5552 bytes
-rwxr-xr-xmodules/overloading/macros/%s_s_r.sci44
-rwxr-xr-xmodules/overloading/macros/%s_s_sp.binbin0 -> 1328 bytes
-rwxr-xr-xmodules/overloading/macros/%s_s_sp.sci21
-rwxr-xr-xmodules/overloading/macros/%s_simp.binbin0 -> 260 bytes
-rwxr-xr-xmodules/overloading/macros/%s_simp.sci13
-rwxr-xr-xmodules/overloading/macros/%s_v_lss.binbin0 -> 2056 bytes
-rwxr-xr-xmodules/overloading/macros/%s_v_lss.sci17
-rwxr-xr-xmodules/overloading/macros/%s_v_p.binbin0 -> 360 bytes
-rwxr-xr-xmodules/overloading/macros/%s_v_p.sci14
-rwxr-xr-xmodules/overloading/macros/%s_v_r.binbin0 -> 2604 bytes
-rwxr-xr-xmodules/overloading/macros/%s_v_r.sci22
-rwxr-xr-xmodules/overloading/macros/%s_v_s.binbin0 -> 1784 bytes
-rwxr-xr-xmodules/overloading/macros/%s_v_s.sci17
-rwxr-xr-xmodules/overloading/macros/%s_x_hm.binbin0 -> 988 bytes
-rwxr-xr-xmodules/overloading/macros/%s_x_hm.sci17
-rwxr-xr-xmodules/overloading/macros/%s_x_r.binbin0 -> 780 bytes
-rwxr-xr-xmodules/overloading/macros/%s_x_r.sci19
-rwxr-xr-xmodules/overloading/macros/%s_y_p.binbin0 -> 1840 bytes
-rwxr-xr-xmodules/overloading/macros/%s_y_p.sci25
-rwxr-xr-xmodules/overloading/macros/%s_y_r.binbin0 -> 1840 bytes
-rwxr-xr-xmodules/overloading/macros/%s_y_r.sci25
-rwxr-xr-xmodules/overloading/macros/%s_y_sp.binbin0 -> 600 bytes
-rwxr-xr-xmodules/overloading/macros/%s_y_sp.sci15
-rwxr-xr-xmodules/overloading/macros/%s_z_p.binbin0 -> 1840 bytes
-rwxr-xr-xmodules/overloading/macros/%s_z_p.sci25
-rwxr-xr-xmodules/overloading/macros/%s_z_r.binbin0 -> 1840 bytes
-rwxr-xr-xmodules/overloading/macros/%s_z_r.sci25
-rwxr-xr-xmodules/overloading/macros/%s_z_sp.binbin0 -> 600 bytes
-rwxr-xr-xmodules/overloading/macros/%s_z_sp.sci15
-rwxr-xr-xmodules/overloading/macros/%sp_a_s.binbin0 -> 1248 bytes
-rwxr-xr-xmodules/overloading/macros/%sp_a_s.sci20
-rwxr-xr-xmodules/overloading/macros/%sp_a_sp.binbin0 -> 1796 bytes
-rwxr-xr-xmodules/overloading/macros/%sp_a_sp.sci29
-rwxr-xr-xmodules/overloading/macros/%sp_and.binbin0 -> 1588 bytes
-rwxr-xr-xmodules/overloading/macros/%sp_and.sci21
-rwxr-xr-xmodules/overloading/macros/%sp_c_s.binbin0 -> 420 bytes
-rwxr-xr-xmodules/overloading/macros/%sp_c_s.sci14
-rwxr-xr-xmodules/overloading/macros/%sp_ceil.binbin0 -> 564 bytes
-rwxr-xr-xmodules/overloading/macros/%sp_ceil.sci14
-rwxr-xr-xmodules/overloading/macros/%sp_conj.binbin0 -> 408 bytes
-rwxr-xr-xmodules/overloading/macros/%sp_conj.sci14
-rwxr-xr-xmodules/overloading/macros/%sp_cos.binbin0 -> 300 bytes
-rwxr-xr-xmodules/overloading/macros/%sp_cos.sci13
-rwxr-xr-xmodules/overloading/macros/%sp_cumprod.binbin0 -> 15244 bytes
-rwxr-xr-xmodules/overloading/macros/%sp_cumprod.sci112
-rwxr-xr-xmodules/overloading/macros/%sp_cumsum.binbin0 -> 9064 bytes
-rwxr-xr-xmodules/overloading/macros/%sp_cumsum.sci76
-rwxr-xr-xmodules/overloading/macros/%sp_d_s.binbin0 -> 356 bytes
-rwxr-xr-xmodules/overloading/macros/%sp_d_s.sci14
-rwxr-xr-xmodules/overloading/macros/%sp_d_sp.binbin0 -> 412 bytes
-rwxr-xr-xmodules/overloading/macros/%sp_d_sp.sci14
-rwxr-xr-xmodules/overloading/macros/%sp_det.binbin0 -> 2104 bytes
-rwxr-xr-xmodules/overloading/macros/%sp_det.sci27
-rwxr-xr-xmodules/overloading/macros/%sp_diag.binbin0 -> 5316 bytes
-rwxr-xr-xmodules/overloading/macros/%sp_diag.sci43
-rwxr-xr-xmodules/overloading/macros/%sp_e.binbin0 -> 960 bytes
-rwxr-xr-xmodules/overloading/macros/%sp_e.sci20
-rwxr-xr-xmodules/overloading/macros/%sp_exp.binbin0 -> 300 bytes
-rwxr-xr-xmodules/overloading/macros/%sp_exp.sci13
-rwxr-xr-xmodules/overloading/macros/%sp_f_s.binbin0 -> 420 bytes
-rwxr-xr-xmodules/overloading/macros/%sp_f_s.sci14
-rwxr-xr-xmodules/overloading/macros/%sp_floor.binbin0 -> 736 bytes
-rwxr-xr-xmodules/overloading/macros/%sp_floor.sci16
-rwxr-xr-xmodules/overloading/macros/%sp_i_ce.binbin0 -> 448 bytes
-rwxr-xr-xmodules/overloading/macros/%sp_i_ce.sci13
-rwxr-xr-xmodules/overloading/macros/%sp_i_h.binbin0 -> 360 bytes
-rwxr-xr-xmodules/overloading/macros/%sp_i_h.sci16
-rwxr-xr-xmodules/overloading/macros/%sp_i_s.binbin0 -> 4524 bytes
-rwxr-xr-xmodules/overloading/macros/%sp_i_s.sci44
-rwxr-xr-xmodules/overloading/macros/%sp_i_sp.binbin0 -> 3924 bytes
-rwxr-xr-xmodules/overloading/macros/%sp_i_sp.sci36
-rwxr-xr-xmodules/overloading/macros/%sp_i_st.binbin0 -> 360 bytes
-rwxr-xr-xmodules/overloading/macros/%sp_i_st.sci12
-rwxr-xr-xmodules/overloading/macros/%sp_int.binbin0 -> 728 bytes
-rwxr-xr-xmodules/overloading/macros/%sp_int.sci16
-rwxr-xr-xmodules/overloading/macros/%sp_inv.binbin0 -> 1376 bytes
-rwxr-xr-xmodules/overloading/macros/%sp_inv.sci23
-rwxr-xr-xmodules/overloading/macros/%sp_k_s.binbin0 -> 604 bytes
-rwxr-xr-xmodules/overloading/macros/%sp_k_s.sci15
-rwxr-xr-xmodules/overloading/macros/%sp_k_sp.binbin0 -> 2528 bytes
-rwxr-xr-xmodules/overloading/macros/%sp_k_sp.sci21
-rwxr-xr-xmodules/overloading/macros/%sp_l_s.binbin0 -> 5788 bytes
-rwxr-xr-xmodules/overloading/macros/%sp_l_s.sci40
-rwxr-xr-xmodules/overloading/macros/%sp_l_sp.binbin0 -> 2680 bytes
-rwxr-xr-xmodules/overloading/macros/%sp_l_sp.sci27
-rwxr-xr-xmodules/overloading/macros/%sp_length.binbin0 -> 296 bytes
-rwxr-xr-xmodules/overloading/macros/%sp_length.sci13
-rwxr-xr-xmodules/overloading/macros/%sp_norm.binbin0 -> 7060 bytes
-rwxr-xr-xmodules/overloading/macros/%sp_norm.sci68
-rwxr-xr-xmodules/overloading/macros/%sp_or.binbin0 -> 920 bytes
-rwxr-xr-xmodules/overloading/macros/%sp_or.sci18
-rwxr-xr-xmodules/overloading/macros/%sp_p_s.binbin0 -> 3684 bytes
-rwxr-xr-xmodules/overloading/macros/%sp_p_s.sci47
-rwxr-xr-xmodules/overloading/macros/%sp_prod.binbin0 -> 7784 bytes
-rwxr-xr-xmodules/overloading/macros/%sp_prod.sci71
-rwxr-xr-xmodules/overloading/macros/%sp_q_s.binbin0 -> 1000 bytes
-rwxr-xr-xmodules/overloading/macros/%sp_q_s.sci19
-rwxr-xr-xmodules/overloading/macros/%sp_q_sp.binbin0 -> 412 bytes
-rwxr-xr-xmodules/overloading/macros/%sp_q_sp.sci14
-rwxr-xr-xmodules/overloading/macros/%sp_r_s.binbin0 -> 428 bytes
-rwxr-xr-xmodules/overloading/macros/%sp_r_s.sci14
-rwxr-xr-xmodules/overloading/macros/%sp_r_sp.binbin0 -> 2728 bytes
-rwxr-xr-xmodules/overloading/macros/%sp_r_sp.sci27
-rwxr-xr-xmodules/overloading/macros/%sp_round.binbin0 -> 564 bytes
-rwxr-xr-xmodules/overloading/macros/%sp_round.sci14
-rwxr-xr-xmodules/overloading/macros/%sp_s_s.binbin0 -> 1268 bytes
-rwxr-xr-xmodules/overloading/macros/%sp_s_s.sci20
-rwxr-xr-xmodules/overloading/macros/%sp_s_sp.binbin0 -> 1796 bytes
-rwxr-xr-xmodules/overloading/macros/%sp_s_sp.sci29
-rwxr-xr-xmodules/overloading/macros/%sp_sin.binbin0 -> 564 bytes
-rwxr-xr-xmodules/overloading/macros/%sp_sin.sci14
-rwxr-xr-xmodules/overloading/macros/%sp_sqrt.binbin0 -> 564 bytes
-rwxr-xr-xmodules/overloading/macros/%sp_sqrt.sci14
-rwxr-xr-xmodules/overloading/macros/%sp_string.binbin0 -> 1232 bytes
-rwxr-xr-xmodules/overloading/macros/%sp_string.sci14
-rwxr-xr-xmodules/overloading/macros/%sp_sum.binbin0 -> 7324 bytes
-rwxr-xr-xmodules/overloading/macros/%sp_sum.sci65
-rwxr-xr-xmodules/overloading/macros/%sp_tril.binbin0 -> 1596 bytes
-rwxr-xr-xmodules/overloading/macros/%sp_tril.sci19
-rwxr-xr-xmodules/overloading/macros/%sp_triu.binbin0 -> 1596 bytes
-rwxr-xr-xmodules/overloading/macros/%sp_triu.sci19
-rwxr-xr-xmodules/overloading/macros/%sp_y_s.binbin0 -> 604 bytes
-rwxr-xr-xmodules/overloading/macros/%sp_y_s.sci15
-rwxr-xr-xmodules/overloading/macros/%sp_y_sp.binbin0 -> 3052 bytes
-rwxr-xr-xmodules/overloading/macros/%sp_y_sp.sci22
-rwxr-xr-xmodules/overloading/macros/%sp_z_s.binbin0 -> 604 bytes
-rwxr-xr-xmodules/overloading/macros/%sp_z_s.sci15
-rwxr-xr-xmodules/overloading/macros/%sp_z_sp.binbin0 -> 3052 bytes
-rwxr-xr-xmodules/overloading/macros/%sp_z_sp.sci22
-rwxr-xr-xmodules/overloading/macros/%spb_and.binbin0 -> 1408 bytes
-rwxr-xr-xmodules/overloading/macros/%spb_and.sci21
-rwxr-xr-xmodules/overloading/macros/%spb_c_b.binbin0 -> 640 bytes
-rwxr-xr-xmodules/overloading/macros/%spb_c_b.sci15
-rwxr-xr-xmodules/overloading/macros/%spb_cumprod.binbin0 -> 18292 bytes
-rwxr-xr-xmodules/overloading/macros/%spb_cumprod.sci131
-rwxr-xr-xmodules/overloading/macros/%spb_cumsum.binbin0 -> 26288 bytes
-rwxr-xr-xmodules/overloading/macros/%spb_cumsum.sci182
-rwxr-xr-xmodules/overloading/macros/%spb_diag.binbin0 -> 4044 bytes
-rwxr-xr-xmodules/overloading/macros/%spb_diag.sci34
-rwxr-xr-xmodules/overloading/macros/%spb_e.binbin0 -> 960 bytes
-rwxr-xr-xmodules/overloading/macros/%spb_e.sci20
-rwxr-xr-xmodules/overloading/macros/%spb_f_b.binbin0 -> 640 bytes
-rwxr-xr-xmodules/overloading/macros/%spb_f_b.sci15
-rwxr-xr-xmodules/overloading/macros/%spb_g_b.binbin0 -> 632 bytes
-rwxr-xr-xmodules/overloading/macros/%spb_g_b.sci15
-rwxr-xr-xmodules/overloading/macros/%spb_g_spb.binbin0 -> 2404 bytes
-rwxr-xr-xmodules/overloading/macros/%spb_g_spb.sci31
-rwxr-xr-xmodules/overloading/macros/%spb_h_b.binbin0 -> 728 bytes
-rwxr-xr-xmodules/overloading/macros/%spb_h_b.sci15
-rwxr-xr-xmodules/overloading/macros/%spb_h_spb.binbin0 -> 1984 bytes
-rwxr-xr-xmodules/overloading/macros/%spb_h_spb.sci29
-rwxr-xr-xmodules/overloading/macros/%spb_i_b.binbin0 -> 768 bytes
-rwxr-xr-xmodules/overloading/macros/%spb_i_b.sci16
-rwxr-xr-xmodules/overloading/macros/%spb_i_ce.binbin0 -> 480 bytes
-rwxr-xr-xmodules/overloading/macros/%spb_i_ce.sci13
-rwxr-xr-xmodules/overloading/macros/%spb_i_h.binbin0 -> 360 bytes
-rwxr-xr-xmodules/overloading/macros/%spb_i_h.sci16
-rwxr-xr-xmodules/overloading/macros/%spb_i_st.binbin0 -> 360 bytes
-rwxr-xr-xmodules/overloading/macros/%spb_i_st.sci12
-rwxr-xr-xmodules/overloading/macros/%spb_or.binbin0 -> 892 bytes
-rwxr-xr-xmodules/overloading/macros/%spb_or.sci18
-rwxr-xr-xmodules/overloading/macros/%spb_prod.binbin0 -> 21712 bytes
-rwxr-xr-xmodules/overloading/macros/%spb_prod.sci156
-rwxr-xr-xmodules/overloading/macros/%spb_sum.binbin0 -> 24100 bytes
-rwxr-xr-xmodules/overloading/macros/%spb_sum.sci182
-rwxr-xr-xmodules/overloading/macros/%spb_tril.binbin0 -> 1600 bytes
-rwxr-xr-xmodules/overloading/macros/%spb_tril.sci20
-rwxr-xr-xmodules/overloading/macros/%spb_triu.binbin0 -> 1596 bytes
-rwxr-xr-xmodules/overloading/macros/%spb_triu.sci19
-rwxr-xr-xmodules/overloading/macros/%st_6.binbin0 -> 6836 bytes
-rwxr-xr-xmodules/overloading/macros/%st_6.sci54
-rwxr-xr-xmodules/overloading/macros/%st_c_st.binbin0 -> 4856 bytes
-rwxr-xr-xmodules/overloading/macros/%st_c_st.sci35
-rwxr-xr-xmodules/overloading/macros/%st_e.binbin0 -> 14760 bytes
-rwxr-xr-xmodules/overloading/macros/%st_e.sci107
-rwxr-xr-xmodules/overloading/macros/%st_f_st.binbin0 -> 532 bytes
-rwxr-xr-xmodules/overloading/macros/%st_f_st.sci14
-rwxr-xr-xmodules/overloading/macros/%st_i_b.binbin0 -> 280 bytes
-rwxr-xr-xmodules/overloading/macros/%st_i_b.sci12
-rwxr-xr-xmodules/overloading/macros/%st_i_c.binbin0 -> 280 bytes
-rwxr-xr-xmodules/overloading/macros/%st_i_c.sci12
-rwxr-xr-xmodules/overloading/macros/%st_i_fptr.binbin0 -> 280 bytes
-rwxr-xr-xmodules/overloading/macros/%st_i_fptr.sci12
-rwxr-xr-xmodules/overloading/macros/%st_i_h.binbin0 -> 664 bytes
-rwxr-xr-xmodules/overloading/macros/%st_i_h.sci14
-rwxr-xr-xmodules/overloading/macros/%st_i_i.binbin0 -> 280 bytes
-rwxr-xr-xmodules/overloading/macros/%st_i_i.sci12
-rwxr-xr-xmodules/overloading/macros/%st_i_ip.binbin0 -> 280 bytes
-rwxr-xr-xmodules/overloading/macros/%st_i_ip.sci12
-rwxr-xr-xmodules/overloading/macros/%st_i_lss.binbin0 -> 280 bytes
-rwxr-xr-xmodules/overloading/macros/%st_i_lss.sci12
-rwxr-xr-xmodules/overloading/macros/%st_i_msp.binbin0 -> 280 bytes
-rwxr-xr-xmodules/overloading/macros/%st_i_msp.sci12
-rwxr-xr-xmodules/overloading/macros/%st_i_p.binbin0 -> 280 bytes
-rwxr-xr-xmodules/overloading/macros/%st_i_p.sci12
-rwxr-xr-xmodules/overloading/macros/%st_i_r.binbin0 -> 280 bytes
-rwxr-xr-xmodules/overloading/macros/%st_i_r.sci12
-rwxr-xr-xmodules/overloading/macros/%st_i_s.binbin0 -> 280 bytes
-rwxr-xr-xmodules/overloading/macros/%st_i_s.sci12
-rwxr-xr-xmodules/overloading/macros/%st_i_sp.binbin0 -> 280 bytes
-rwxr-xr-xmodules/overloading/macros/%st_i_sp.sci12
-rwxr-xr-xmodules/overloading/macros/%st_i_spb.binbin0 -> 280 bytes
-rwxr-xr-xmodules/overloading/macros/%st_i_spb.sci12
-rwxr-xr-xmodules/overloading/macros/%st_i_st.binbin0 -> 21588 bytes
-rwxr-xr-xmodules/overloading/macros/%st_i_st.sci147
-rwxr-xr-xmodules/overloading/macros/%st_matrix.binbin0 -> 4240 bytes
-rwxr-xr-xmodules/overloading/macros/%st_matrix.sci33
-rwxr-xr-xmodules/overloading/macros/%st_n_c.binbin0 -> 468 bytes
-rwxr-xr-xmodules/overloading/macros/%st_n_c.sci14
-rwxr-xr-xmodules/overloading/macros/%st_n_l.binbin0 -> 416 bytes
-rwxr-xr-xmodules/overloading/macros/%st_n_l.sci14
-rwxr-xr-xmodules/overloading/macros/%st_n_mc.binbin0 -> 432 bytes
-rwxr-xr-xmodules/overloading/macros/%st_n_mc.sci14
-rwxr-xr-xmodules/overloading/macros/%st_n_p.binbin0 -> 484 bytes
-rwxr-xr-xmodules/overloading/macros/%st_n_p.sci14
-rwxr-xr-xmodules/overloading/macros/%st_n_s.binbin0 -> 524 bytes
-rwxr-xr-xmodules/overloading/macros/%st_n_s.sci14
-rwxr-xr-xmodules/overloading/macros/%st_o_c.binbin0 -> 468 bytes
-rwxr-xr-xmodules/overloading/macros/%st_o_c.sci14
-rwxr-xr-xmodules/overloading/macros/%st_o_l.binbin0 -> 416 bytes
-rwxr-xr-xmodules/overloading/macros/%st_o_l.sci14
-rwxr-xr-xmodules/overloading/macros/%st_o_mc.binbin0 -> 432 bytes
-rwxr-xr-xmodules/overloading/macros/%st_o_mc.sci14
-rwxr-xr-xmodules/overloading/macros/%st_o_p.binbin0 -> 484 bytes
-rwxr-xr-xmodules/overloading/macros/%st_o_p.sci14
-rwxr-xr-xmodules/overloading/macros/%st_o_s.binbin0 -> 524 bytes
-rwxr-xr-xmodules/overloading/macros/%st_o_s.sci14
-rwxr-xr-xmodules/overloading/macros/%st_o_tl.binbin0 -> 416 bytes
-rwxr-xr-xmodules/overloading/macros/%st_o_tl.sci14
-rwxr-xr-xmodules/overloading/macros/%st_p.binbin0 -> 9088 bytes
-rwxr-xr-xmodules/overloading/macros/%st_p.sci77
-rwxr-xr-xmodules/overloading/macros/%st_size.binbin0 -> 4500 bytes
-rwxr-xr-xmodules/overloading/macros/%st_size.sci38
-rwxr-xr-xmodules/overloading/macros/%st_string.binbin0 -> 2992 bytes
-rwxr-xr-xmodules/overloading/macros/%st_string.sci34
-rwxr-xr-xmodules/overloading/macros/%st_t.binbin0 -> 2560 bytes
-rwxr-xr-xmodules/overloading/macros/%st_t.sci23
-rwxr-xr-xmodules/overloading/macros/%ticks_i_h.binbin0 -> 5384 bytes
-rwxr-xr-xmodules/overloading/macros/%ticks_i_h.sci44
-rwxr-xr-xmodules/overloading/macros/%xls_e.binbin0 -> 460 bytes
-rwxr-xr-xmodules/overloading/macros/%xls_e.sci13
-rwxr-xr-xmodules/overloading/macros/%xls_p.binbin0 -> 1260 bytes
-rwxr-xr-xmodules/overloading/macros/%xls_p.sci18
-rwxr-xr-xmodules/overloading/macros/%xlssheet_e.binbin0 -> 1952 bytes
-rwxr-xr-xmodules/overloading/macros/%xlssheet_e.sci21
-rwxr-xr-xmodules/overloading/macros/%xlssheet_p.binbin0 -> 1000 bytes
-rwxr-xr-xmodules/overloading/macros/%xlssheet_p.sci17
-rwxr-xr-xmodules/overloading/macros/%xlssheet_size.binbin0 -> 1084 bytes
-rwxr-xr-xmodules/overloading/macros/%xlssheet_size.sci19
-rwxr-xr-xmodules/overloading/macros/%xlssheet_string.binbin0 -> 888 bytes
-rwxr-xr-xmodules/overloading/macros/%xlssheet_string.sci16
-rwxr-xr-xmodules/overloading/macros/buildmacros.bat1
-rwxr-xr-xmodules/overloading/macros/buildmacros.sce14
-rwxr-xr-xmodules/overloading/macros/cleanmacros.bat3
-rwxr-xr-xmodules/overloading/macros/createstruct.binbin0 -> 22280 bytes
-rwxr-xr-xmodules/overloading/macros/createstruct.sci177
-rwxr-xr-xmodules/overloading/macros/generic_i_ce.binbin0 -> 928 bytes
-rwxr-xr-xmodules/overloading/macros/generic_i_ce.sci13
-rwxr-xr-xmodules/overloading/macros/generic_i_h.binbin0 -> 9868 bytes
-rwxr-xr-xmodules/overloading/macros/generic_i_h.sci72
-rwxr-xr-xmodules/overloading/macros/generic_i_hm.binbin0 -> 16692 bytes
-rwxr-xr-xmodules/overloading/macros/generic_i_hm.sci140
-rwxr-xr-xmodules/overloading/macros/generic_i_s.binbin0 -> 3776 bytes
-rwxr-xr-xmodules/overloading/macros/generic_i_s.sci36
-rwxr-xr-xmodules/overloading/macros/generic_i_st.binbin0 -> 2004 bytes
-rwxr-xr-xmodules/overloading/macros/generic_i_st.sci25
-rwxr-xr-xmodules/overloading/macros/libbin0 -> 16216 bytes
-rwxr-xr-xmodules/overloading/macros/names664
-rwxr-xr-xmodules/overloading/macros/st_i_generic.binbin0 -> 2184 bytes
-rwxr-xr-xmodules/overloading/macros/st_i_generic.sci27
1333 files changed, 18180 insertions, 0 deletions
diff --git a/modules/overloading/macros/%0_i_st.bin b/modules/overloading/macros/%0_i_st.bin
new file mode 100755
index 000000000..7fd284a23
--- /dev/null
+++ b/modules/overloading/macros/%0_i_st.bin
Binary files differ
diff --git a/modules/overloading/macros/%0_i_st.sci b/modules/overloading/macros/%0_i_st.sci
new file mode 100755
index 000000000..420e3f9d8
--- /dev/null
+++ b/modules/overloading/macros/%0_i_st.sci
@@ -0,0 +1,24 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2010 - INRIA - Serge Steer <serge.steer@inria.fr>
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function st=%0_i_st(i,void,st)
+ if type(i)==10 then
+ f=getfield(1,st);
+ k=find(f(3:$)==i);
+ if k<>[] then
+ f(k+2)=[];
+ setfield(k+2,null(),st);
+ setfield(1,f,st);
+ else
+ error(msprintf(_("%s: Invalid index.\n"),"%0_i_st"));
+ end
+ else
+ error(msprintf(_("%s: Wrong type for input argument #%d: String expected.\n"),"%0_i_st",1));
+ end
+endfunction
diff --git a/modules/overloading/macros/%3d_i_h.bin b/modules/overloading/macros/%3d_i_h.bin
new file mode 100755
index 000000000..cf1142475
--- /dev/null
+++ b/modules/overloading/macros/%3d_i_h.bin
Binary files differ
diff --git a/modules/overloading/macros/%3d_i_h.sci b/modules/overloading/macros/%3d_i_h.sci
new file mode 100755
index 000000000..a033ef47a
--- /dev/null
+++ b/modules/overloading/macros/%3d_i_h.sci
@@ -0,0 +1,43 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+function h=%3d_i_h(i,v,h)
+ if type(i)==10 then
+ set(h,i,v)
+ elseif type(i)==15 then
+ hdl=h
+ p=i($)
+ if type(p)==1|type(p)==4|type(p)==2|type(p)==129|type(p)==15 then
+ index=i($)
+ i($)=null()
+ else
+ index=:
+ end
+ n=lstsize(i)
+ for k=1:n-1
+ p=i(k)
+ if type(p)==10 then
+ hdl=get(hdl,p),
+ elseif type(p)==1|type(p)==4|type(p)==2|type(p)==129 then
+ hdl=hdl(p)
+ elseif type(p)==15 then
+ hdl=hdl(p(:))
+ else
+ error(msprintf(_("%s: Wrong type for input argument #%d.\n"),"%3d_i_h",1));
+ end
+ end
+ if type(index)==15 then
+ hdl=hdl(index(:))
+ else
+ hdl=hdl(index)
+ end
+ set(hdl,i($),v)
+ else
+ error(msprintf(_("%s: Wrong type for input argument #%d.\n"),"%3d_i_h",1));
+ end
+endfunction
diff --git a/modules/overloading/macros/%ar_p.bin b/modules/overloading/macros/%ar_p.bin
new file mode 100755
index 000000000..01c259184
--- /dev/null
+++ b/modules/overloading/macros/%ar_p.bin
Binary files differ
diff --git a/modules/overloading/macros/%ar_p.sci b/modules/overloading/macros/%ar_p.sci
new file mode 100755
index 000000000..75e8d6327
--- /dev/null
+++ b/modules/overloading/macros/%ar_p.sci
@@ -0,0 +1,163 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) ENPC
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+function %ar_p(l)
+ // to provide automatic print of ar objects with armap
+ //
+ // We use armp_p as the default function for printing
+ armap_p(l)
+
+endfunction
+function armap(ar,out)
+ //used for display of armax objects
+ //!
+ [lhs,rhs]=argn(0)
+ if rhs==1 then out=%io(2),end
+ deff("[ta]=%cv(x)",["[m,n]=size(x);";
+ "frmt=format();frmt=10**frmt(2)/max([1,norm(x)]);";
+ "x=round(frmt*x)/frmt;";
+ "t=[];for k=1:m,t=[t;''|''],end;";
+ "ta=t;for k=1:n,";
+ " aa=string(x(:,k)),";
+ " for l=1:m,";
+ " if part(aa(l),1)<>''-'' then ";
+ " aa(l)='' ''+aa(l),";
+ " end,";
+ " end,";
+ " n=max(length(aa)),";
+ " aa=part(aa+blank,1:n),";
+ " ta=ta+aa+part(blank,1),";
+ "end;ta=ta+t;"])
+
+ // D(x)=Ax + Bu
+ //-------------
+ write(out," ")
+ if ar(1)<>"ar" then write(%io(2)," This is not an ARMAX");return;end;
+ //
+ [ny,vid]=size(ar(2));
+ if ar(3) == [] then
+ write(out," A(z^-1)y= D(z^-1) e(t)");
+ else
+ write(out," A(z^-1)y=B(z^-1)u + D(z^-1) e(t)");
+ end
+
+ write(out," ");
+ M=["A","B","D"];
+ lll=lines();
+ lll=lll(1);
+ if ar(3)==[] then I=[1,3];else I=1:3 ;end
+ for i=I;
+ [a]=ar(i+1)
+ [na,lna]=size(a)
+ nli=int((lna/na));
+ if i==2,nli=int((lna/ar(6)));end;
+ blank=[];for k=1:na,blank=[blank;" "],end
+ blank1=part(blank,1:7)
+ // blank1([na/2,na/2+1])=[' '+M(i)+'(s)= ']
+ blank1([int(na/2)+1])=[" "+M(i)+"(x)="]
+ t=blank1;
+ nna=na;
+ blank1=part(blank,1:6)
+ if i==2;nna=ar(6);end
+ for j=1:nli;
+ ta=a(:,1+(j-1)*nna:j*nna);
+ if t==[],t=blank+%cv(ta);else t=t+%cv(ta);end;
+ str="x^"+string(j-1)
+ if length(str)==3,str=str+" ";end
+ if j<>nli;str=str+"+ ";else str=str+" ";end
+ // blank1([na/2,na/2+1])=[' ';str];
+ blank1([int(na/2)+1])=[str];
+ t=t+blank1
+ if length(t(1))>=lll,write(out,t),write(out," ");t=[];end
+ end
+ write(out,t);
+ write(out," ");
+ end
+ write(%io(2)," e(t)=Sig*w(t); w(t) "+string(ny)+"-dim white noise");
+ write(out," ");
+ [a]=ar(7)
+ [na,lna]=size(a)
+ blank=[];for k=1:na,blank=[blank;" "],end
+ blank1=part(blank,1:8)
+ // blank1([na/2,na/2+1])=[' ';' Sig= ']
+ blank1([int(na/2)+1])=[" Sig= "]
+ t=blank1;
+ ta=a;
+ t=t+%cv(ta);
+ write(out,t);
+ write(out," ");
+
+endfunction
+function armap_p(ar,out)
+ //used for display of armax objects
+ //use Scilan Polynomial matrix display
+ //!
+ [lhs,rhs]=argn(0)
+ if rhs==1 then out=%io(2),end
+ deff("[ta]=%cv(x)",["[m,n]=size(x);";
+ "frmt=format();frmt=10**frmt(2)/max([1,norm(x)]);";
+ "x=round(frmt*x)/frmt;";
+ "t=[];for k=1:m,t=[t;''|''],end;";
+ "ta=t;for k=1:n,";
+ " aa=string(x(:,k)),";
+ " for l=1:m,";
+ " if part(aa(l),1)<>''-'' then ";
+ " aa(l)='' ''+aa(l),";
+ " end,";
+ " end,";
+ " n=max(length(aa)),";
+ " aa=part(aa+blank,1:n),";
+ " ta=ta+aa+part(blank,1),";
+ "end;ta=ta+t;"])
+
+ // D(x)=Ax + Bu
+ //-------------
+ write(out," ")
+ if ar(1)<>"ar" then write(%io(2)," This is not an ARMAX");return;end;
+ //
+ [ny,vid]=size(ar(2));
+ if ar(3) == [] then
+ write(out," A(z^-1)y= D(z^-1) e(t)");
+ else
+ write(out," A(z^-1)y=B(z^-1)u + D(z^-1) e(t)");
+ end
+
+ write(out," ");
+ M=["A","B","D"];
+ lll=lines();
+ lll=lll(1);
+ if ar(3)==[] then I=[1,3];else I=1:3 ;end
+ A=inv_coeff(ar(2));
+ //print(out,A);
+ disp(A,"A(x) =");
+ write(out," ");
+ if ar(3)<>[] then
+ [mb,nb]=size(ar(3));
+ B=inv_coeff(ar(3),(nb/ar("nu"))-1);
+ //print(out,B);
+ disp(B, "B(x) =");
+ write(out," ");
+ end
+ D=inv_coeff(ar(4));
+ //print(out,D);
+ disp(D, "D(x)");
+ write(out," ");
+ write(%io(2)," e(t)=Sig*w(t); w(t) "+string(ny)+"-dim white noise");
+ write(out," ");
+ [a]=ar(7)
+ [na,lna]=size(a)
+ blank=[];for k=1:na,blank=[blank;" "],end
+ blank1=part(blank,1:8)
+ // blank1([na/2,na/2+1])=[' ';' Sig= ']
+ blank1([int(na/2)+1])=[" Sig= "]
+ t=blank1;
+ ta=a;
+ t=t+%cv(ta);
+ write(out,t);
+ write(out," ");
+endfunction
diff --git a/modules/overloading/macros/%b_c_spb.bin b/modules/overloading/macros/%b_c_spb.bin
new file mode 100755
index 000000000..125299035
--- /dev/null
+++ b/modules/overloading/macros/%b_c_spb.bin
Binary files differ
diff --git a/modules/overloading/macros/%b_c_spb.sci b/modules/overloading/macros/%b_c_spb.sci
new file mode 100755
index 000000000..c1a412615
--- /dev/null
+++ b/modules/overloading/macros/%b_c_spb.sci
@@ -0,0 +1,13 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+function r=%b_c_spb(a,b)
+ // perform [a b] where a is a boolean matrix
+ // and b a boolean sparse matrix
+ r=[sparse(a),b]
+endfunction
diff --git a/modules/overloading/macros/%b_diag.bin b/modules/overloading/macros/%b_diag.bin
new file mode 100755
index 000000000..11f2db449
--- /dev/null
+++ b/modules/overloading/macros/%b_diag.bin
Binary files differ
diff --git a/modules/overloading/macros/%b_diag.sci b/modules/overloading/macros/%b_diag.sci
new file mode 100755
index 000000000..f15807a72
--- /dev/null
+++ b/modules/overloading/macros/%b_diag.sci
@@ -0,0 +1,32 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+function d=%b_diag(a,k)
+
+ [lhs,rhs]=argn(0)
+ if rhs==1 then k=0,end
+ [m,n]=size(a)
+ if m>1&n>1 then
+ if k<=0 then
+ mn=min(m+k,n)
+ i0=-k+1
+ else
+ mn=min(m,n-k)
+ i0=k*m+1
+ end
+ a=matrix(a,m*n,1)
+ i=i0+((0:mn-1)*(m+1))
+ d=a(i)
+ else
+ nn = max(m,n)+abs(k)
+ mn=max(m,n)
+ i=(1:mn)+((1:mn)+(k-1))*nn
+ d(i)=a
+ d=matrix(d,nn,nn)
+ end
+endfunction
diff --git a/modules/overloading/macros/%b_e.bin b/modules/overloading/macros/%b_e.bin
new file mode 100755
index 000000000..89759c084
--- /dev/null
+++ b/modules/overloading/macros/%b_e.bin
Binary files differ
diff --git a/modules/overloading/macros/%b_e.sci b/modules/overloading/macros/%b_e.sci
new file mode 100755
index 000000000..a4d137e80
--- /dev/null
+++ b/modules/overloading/macros/%b_e.sci
@@ -0,0 +1,34 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+function f=%b_e(varargin)
+ //A(i,j,k,..)
+
+ rhs=size(varargin)
+ M=varargin(rhs)
+
+ nind=rhs-1
+ dims=[]
+ for k=3:nind
+ ind=varargin(k)
+ if type(ind)==2|type(ind)==129 then ind=horner(ind,1),end
+ if type(ind)==4 then ind=find(ind),end
+ if or(ind<>1) then error(21),end
+ n=size(ind,"*")
+ dims=[dims,n]
+ end
+ f=M(varargin(1:min(2,rhs-1)))
+ k=find(dims>1)
+ if k<>[] then
+ dims(k($)+1:$)=[]
+ N=prod(dims)
+ szf=size(f)
+ f=f(:)
+ f=mlist(["hm","dims","entries"],int32([szf dims]),matrix(f(:,ones(1,N)),-1,1))
+ end
+endfunction
diff --git a/modules/overloading/macros/%b_f_spb.bin b/modules/overloading/macros/%b_f_spb.bin
new file mode 100755
index 000000000..8d9a091e2
--- /dev/null
+++ b/modules/overloading/macros/%b_f_spb.bin
Binary files differ
diff --git a/modules/overloading/macros/%b_f_spb.sci b/modules/overloading/macros/%b_f_spb.sci
new file mode 100755
index 000000000..96402ddb8
--- /dev/null
+++ b/modules/overloading/macros/%b_f_spb.sci
@@ -0,0 +1,13 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+function r=%b_f_spb(a,b)
+ // perform [a;b] where a is a boolean matrix
+ // and b a boolean sparse matrix
+ r=[sparse(a);b]
+endfunction
diff --git a/modules/overloading/macros/%b_g_s.bin b/modules/overloading/macros/%b_g_s.bin
new file mode 100755
index 000000000..e56a10bb0
--- /dev/null
+++ b/modules/overloading/macros/%b_g_s.bin
Binary files differ
diff --git a/modules/overloading/macros/%b_g_s.sci b/modules/overloading/macros/%b_g_s.sci
new file mode 100755
index 000000000..e8cf10b9e
--- /dev/null
+++ b/modules/overloading/macros/%b_g_s.sci
@@ -0,0 +1,13 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+function r=%b_g_s(a,b)
+ // r=a|b
+
+ r=a|(b<>0)
+endfunction
diff --git a/modules/overloading/macros/%b_g_spb.bin b/modules/overloading/macros/%b_g_spb.bin
new file mode 100755
index 000000000..170d3f9ee
--- /dev/null
+++ b/modules/overloading/macros/%b_g_spb.bin
Binary files differ
diff --git a/modules/overloading/macros/%b_g_spb.sci b/modules/overloading/macros/%b_g_spb.sci
new file mode 100755
index 000000000..5509f0e2b
--- /dev/null
+++ b/modules/overloading/macros/%b_g_spb.sci
@@ -0,0 +1,13 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+function r=%b_g_spb(a,b)
+ // perform logical elementwise a|b where a is a boolean sparse matrix
+ // and b a boolean matrix
+ r=sparse(a)|b
+endfunction
diff --git a/modules/overloading/macros/%b_h_s.bin b/modules/overloading/macros/%b_h_s.bin
new file mode 100755
index 000000000..b179ce4ff
--- /dev/null
+++ b/modules/overloading/macros/%b_h_s.bin
Binary files differ
diff --git a/modules/overloading/macros/%b_h_s.sci b/modules/overloading/macros/%b_h_s.sci
new file mode 100755
index 000000000..97ecca492
--- /dev/null
+++ b/modules/overloading/macros/%b_h_s.sci
@@ -0,0 +1,13 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+function r=%b_h_s(a,b)
+ // r=a&b
+
+ r=a&(b<>0)
+endfunction
diff --git a/modules/overloading/macros/%b_h_spb.bin b/modules/overloading/macros/%b_h_spb.bin
new file mode 100755
index 000000000..14269a924
--- /dev/null
+++ b/modules/overloading/macros/%b_h_spb.bin
Binary files differ
diff --git a/modules/overloading/macros/%b_h_spb.sci b/modules/overloading/macros/%b_h_spb.sci
new file mode 100755
index 000000000..8cb166cae
--- /dev/null
+++ b/modules/overloading/macros/%b_h_spb.sci
@@ -0,0 +1,13 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+function r=%b_h_spb(a,b)
+ // perform logical elementwise and a&b where a is a boolean sparse matrix
+ // and b a boolean matrix
+ r=sparse(a)&b
+endfunction
diff --git a/modules/overloading/macros/%b_i_b.bin b/modules/overloading/macros/%b_i_b.bin
new file mode 100755
index 000000000..e29192682
--- /dev/null
+++ b/modules/overloading/macros/%b_i_b.bin
Binary files differ
diff --git a/modules/overloading/macros/%b_i_b.sci b/modules/overloading/macros/%b_i_b.sci
new file mode 100755
index 000000000..afae7fec3
--- /dev/null
+++ b/modules/overloading/macros/%b_i_b.sci
@@ -0,0 +1,17 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+function M=%b_i_b(varargin)
+ //insertion of a boolean matrix in an matrix of boolean for more than 2 indices
+
+ rhs=argn(2)
+ M=varargin(rhs)
+ M=mlist(["hm","dims","entries"],int32(size(M)),M(:))
+ varargin(rhs)=M;
+ M=generic_i_hm(%f,varargin(:))
+endfunction
diff --git a/modules/overloading/macros/%b_i_ce.bin b/modules/overloading/macros/%b_i_ce.bin
new file mode 100755
index 000000000..a2e5db8c6
--- /dev/null
+++ b/modules/overloading/macros/%b_i_ce.bin
Binary files differ
diff --git a/modules/overloading/macros/%b_i_ce.sci b/modules/overloading/macros/%b_i_ce.sci
new file mode 100755
index 000000000..44d8a9faf
--- /dev/null
+++ b/modules/overloading/macros/%b_i_ce.sci
@@ -0,0 +1,13 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA - Vincent Couvert
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+function M=%b_i_ce(varargin)
+ // Insertion of a boolean matrix in a cell
+ M=generic_i_ce(varargin(:))
+endfunction
+
diff --git a/modules/overloading/macros/%b_i_h.bin b/modules/overloading/macros/%b_i_h.bin
new file mode 100755
index 000000000..064b45976
--- /dev/null
+++ b/modules/overloading/macros/%b_i_h.bin
Binary files differ
diff --git a/modules/overloading/macros/%b_i_h.sci b/modules/overloading/macros/%b_i_h.sci
new file mode 100755
index 000000000..1f591f105
--- /dev/null
+++ b/modules/overloading/macros/%b_i_h.sci
@@ -0,0 +1,15 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+function h=%b_i_h(i,v,h)
+ h=generic_i_h(i,v,h)
+endfunction
+
+
+
+
diff --git a/modules/overloading/macros/%b_i_hm.bin b/modules/overloading/macros/%b_i_hm.bin
new file mode 100755
index 000000000..7b69a3817
--- /dev/null
+++ b/modules/overloading/macros/%b_i_hm.bin
Binary files differ
diff --git a/modules/overloading/macros/%b_i_hm.sci b/modules/overloading/macros/%b_i_hm.sci
new file mode 100755
index 000000000..6b4ad7020
--- /dev/null
+++ b/modules/overloading/macros/%b_i_hm.sci
@@ -0,0 +1,15 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+function M=%b_i_hm(varargin)
+
+ //insertion of an boolean matrix in an hypermatrix
+
+ M=generic_i_hm(%f,varargin(:))
+
+endfunction
diff --git a/modules/overloading/macros/%b_i_s.bin b/modules/overloading/macros/%b_i_s.bin
new file mode 100755
index 000000000..3088f1a61
--- /dev/null
+++ b/modules/overloading/macros/%b_i_s.bin
Binary files differ
diff --git a/modules/overloading/macros/%b_i_s.sci b/modules/overloading/macros/%b_i_s.sci
new file mode 100755
index 000000000..26ae99ecb
--- /dev/null
+++ b/modules/overloading/macros/%b_i_s.sci
@@ -0,0 +1,35 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+function M=%b_i_s(varargin)
+
+
+ [lhs,rhs]=argn(0)
+ M=varargin(rhs)
+ //if M<>[] then M=M<>0,end
+ N=varargin(rhs-1)//inserted matrix
+ index=varargin(1) //
+
+ if rhs==3&(type(index)==10|type(index)==15) then
+ M=createstruct(index,N)
+ if type(index(1))<>10 & index(2)=="entries" then
+ // change struct to cell
+ f=getfield(1,M);f(1)="ce"
+ setfield(1,f,M)
+ end
+ elseif rhs>4 then //more than 2 indices: insertion of a boolean in a matrix of numbers
+ M=varargin($)
+ if M<>[] then varargin($-1)=bool2s(varargin($-1)),end
+ M=mlist(["hm","dims","entries"],int32(size(M)),M(:))
+ varargin($)=M;
+ M=generic_i_hm(%f,varargin(:))
+ else //type conversion
+ M=varargin($)
+ M(varargin(1:$-2))=bool2s(varargin($-1))
+ end
+endfunction
diff --git a/modules/overloading/macros/%b_i_sp.bin b/modules/overloading/macros/%b_i_sp.bin
new file mode 100755
index 000000000..e55eb7214
--- /dev/null
+++ b/modules/overloading/macros/%b_i_sp.bin
Binary files differ
diff --git a/modules/overloading/macros/%b_i_sp.sci b/modules/overloading/macros/%b_i_sp.sci
new file mode 100755
index 000000000..a6124005f
--- /dev/null
+++ b/modules/overloading/macros/%b_i_sp.sci
@@ -0,0 +1,24 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+function M=%b_i_sp(varargin)
+
+ [lhs,rhs]=argn(0)
+ M=varargin(rhs)
+ N=bool2s(varargin(rhs-1))//inserted matrix
+ if rhs<=4 then
+ if rhs==3 then
+ M(varargin(1))=N
+ else
+ M(varargin(1),varargin(2))=N
+ end
+ else
+ error(msprintf(_("%s: Multidimensional sparse matrices are not handled.\n"),"%b_i_sp"));
+ end
+
+endfunction
diff --git a/modules/overloading/macros/%b_i_spb.bin b/modules/overloading/macros/%b_i_spb.bin
new file mode 100755
index 000000000..63d9ce57c
--- /dev/null
+++ b/modules/overloading/macros/%b_i_spb.bin
Binary files differ
diff --git a/modules/overloading/macros/%b_i_spb.sci b/modules/overloading/macros/%b_i_spb.sci
new file mode 100755
index 000000000..f26349523
--- /dev/null
+++ b/modules/overloading/macros/%b_i_spb.sci
@@ -0,0 +1,30 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+function a=%b_i_spb(i,j,b,a)
+ // %spis(i,j,b,a) insert full matrix b into sparse matrix a for some special cases
+ // a(i,j)=b
+ //!
+
+ [lhs,rhs]=argn(0)
+ if rhs==3 then
+ a=b;
+ b=j;
+ [m,n]=size(a)
+ a=a(:)
+ a(i)=b
+ end
+ [ij,v]=spget(a)
+ if ij==[] then
+ a=sparse([],[],[m,n])
+ else
+ j=int((ij(:,1)-1)/m)+1
+ i=ij(:,1)-m*(j-1)
+ a=sparse([i j],v,[m,n])
+ end
+endfunction
diff --git a/modules/overloading/macros/%b_i_st.bin b/modules/overloading/macros/%b_i_st.bin
new file mode 100755
index 000000000..939ff8eee
--- /dev/null
+++ b/modules/overloading/macros/%b_i_st.bin
Binary files differ
diff --git a/modules/overloading/macros/%b_i_st.sci b/modules/overloading/macros/%b_i_st.sci
new file mode 100755
index 000000000..6a4aaf2e1
--- /dev/null
+++ b/modules/overloading/macros/%b_i_st.sci
@@ -0,0 +1,11 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+function out=%b_i_st(i,in,out)
+ out=generic_i_st(i,in,out)
+endfunction
diff --git a/modules/overloading/macros/%b_iconvert.bin b/modules/overloading/macros/%b_iconvert.bin
new file mode 100755
index 000000000..5bcba3f95
--- /dev/null
+++ b/modules/overloading/macros/%b_iconvert.bin
Binary files differ
diff --git a/modules/overloading/macros/%b_iconvert.sci b/modules/overloading/macros/%b_iconvert.sci
new file mode 100755
index 000000000..6955d11ee
--- /dev/null
+++ b/modules/overloading/macros/%b_iconvert.sci
@@ -0,0 +1,16 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA - Serge Steer
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+function r=%b_iconvert(val,it)
+
+ [m,n]=size(val)
+ if m*n==0 then r=[],return,end
+ k=find(val)
+ r(m,n)=iconvert(0,it)
+ r(find(val))=iconvert(1,it)
+endfunction
diff --git a/modules/overloading/macros/%b_matrix.bin b/modules/overloading/macros/%b_matrix.bin
new file mode 100755
index 000000000..2e6cc5469
--- /dev/null
+++ b/modules/overloading/macros/%b_matrix.bin
Binary files differ
diff --git a/modules/overloading/macros/%b_matrix.sci b/modules/overloading/macros/%b_matrix.sci
new file mode 100755
index 000000000..22f9dab35
--- /dev/null
+++ b/modules/overloading/macros/%b_matrix.sci
@@ -0,0 +1,11 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+function y=%b_matrix(a,varargin)
+ y=%hm_matrix(a,varargin(:))
+endfunction
diff --git a/modules/overloading/macros/%b_n_hm.bin b/modules/overloading/macros/%b_n_hm.bin
new file mode 100755
index 000000000..31d0f3e13
--- /dev/null
+++ b/modules/overloading/macros/%b_n_hm.bin
Binary files differ
diff --git a/modules/overloading/macros/%b_n_hm.sci b/modules/overloading/macros/%b_n_hm.sci
new file mode 100755
index 000000000..38342097f
--- /dev/null
+++ b/modules/overloading/macros/%b_n_hm.sci
@@ -0,0 +1,16 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2011 - INRIA - Serge Steer
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function M=%b_n_hm(s,M)
+ //s<>M
+ if size(s,"*")<> 1 then
+ M=%t;return
+ end
+ M.entries=s<>M.entries
+endfunction
diff --git a/modules/overloading/macros/%b_o_hm.bin b/modules/overloading/macros/%b_o_hm.bin
new file mode 100755
index 000000000..184c5ab6b
--- /dev/null
+++ b/modules/overloading/macros/%b_o_hm.bin
Binary files differ
diff --git a/modules/overloading/macros/%b_o_hm.sci b/modules/overloading/macros/%b_o_hm.sci
new file mode 100755
index 000000000..6149a3421
--- /dev/null
+++ b/modules/overloading/macros/%b_o_hm.sci
@@ -0,0 +1,16 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2011 - INRIA - Serge Steer
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function M=%b_o_hm(s,M)
+ //s==M
+ if size(s,"*")<> 1 then
+ M=%f;return
+ end
+ M.entries=s==M.entries
+endfunction
diff --git a/modules/overloading/macros/%b_string.bin b/modules/overloading/macros/%b_string.bin
new file mode 100755
index 000000000..96af16b7a
--- /dev/null
+++ b/modules/overloading/macros/%b_string.bin
Binary files differ
diff --git a/modules/overloading/macros/%b_string.sci b/modules/overloading/macros/%b_string.sci
new file mode 100755
index 000000000..4ad1a69ee
--- /dev/null
+++ b/modules/overloading/macros/%b_string.sci
@@ -0,0 +1,14 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA - E. Segre
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+function s=%b_string(b)
+ // thanks to E. Segre for this efficient implementation
+ a=["F" "T"]
+ s=matrix(a(1+b),size(b))
+endfunction
+
diff --git a/modules/overloading/macros/%b_tril.bin b/modules/overloading/macros/%b_tril.bin
new file mode 100755
index 000000000..e2f21212d
--- /dev/null
+++ b/modules/overloading/macros/%b_tril.bin
Binary files differ
diff --git a/modules/overloading/macros/%b_tril.sci b/modules/overloading/macros/%b_tril.sci
new file mode 100755
index 000000000..d9a32e6ab
--- /dev/null
+++ b/modules/overloading/macros/%b_tril.sci
@@ -0,0 +1,17 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA - Bruno Pincon
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+function [d]=%b_tril(a,k)
+ // Copyright INRIA (modified by bruno, June 10 2004)
+ [lhs,rhs] = argn()
+ if rhs==1 then k=0,end
+ [m,n] = size(a)
+ d(m,n) = %f // create an m x n boolean mat with %f elts
+ i = find(tril(ones(a),k))
+ d(i) = a(i)
+endfunction
diff --git a/modules/overloading/macros/%b_triu.bin b/modules/overloading/macros/%b_triu.bin
new file mode 100755
index 000000000..6922127f0
--- /dev/null
+++ b/modules/overloading/macros/%b_triu.bin
Binary files differ
diff --git a/modules/overloading/macros/%b_triu.sci b/modules/overloading/macros/%b_triu.sci
new file mode 100755
index 000000000..be85df8e9
--- /dev/null
+++ b/modules/overloading/macros/%b_triu.sci
@@ -0,0 +1,17 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA - Bruno Pincon
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+function [d]=%b_triu(a,k)
+ // Copyright INRIA (modified by bruno, June 10 2004)
+ [lhs,rhs]= argn()
+ if rhs==1 then k=0,end
+ [m,n] = size(a)
+ d(m,n) = %f // create an m x n boolean mat with %f elts
+ i = find(triu(ones(a),k))
+ d(i) = a(i)
+endfunction
diff --git a/modules/overloading/macros/%c_a_c.bin b/modules/overloading/macros/%c_a_c.bin
new file mode 100755
index 000000000..db2657c2b
--- /dev/null
+++ b/modules/overloading/macros/%c_a_c.bin
Binary files differ
diff --git a/modules/overloading/macros/%c_a_c.sci b/modules/overloading/macros/%c_a_c.sci
new file mode 100755
index 000000000..6881671d5
--- /dev/null
+++ b/modules/overloading/macros/%c_a_c.sci
@@ -0,0 +1,32 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+// Copyright (C) DIGITEO - 2009 - Allan CORNET
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function r=%c_a_c(a,b)
+ // overload string added to a string
+ // see strops.f
+
+ if (type(a)<> 10 | type(b)<> 10) then
+ if ( type(a)<> 10 ) then
+ error(msprintf(_("%s: Wrong type for input argument #%d: String expected.\n"),"%%c_a_c",1));
+ end
+
+ if ( type(b)<> 10 ) then
+ error(msprintf(_("%s: Wrong type for input argument #%d: String expected.\n"),"%%c_a_c",2));
+ end
+ end
+
+ if size(b,"*") == 1 then
+ b = b(ones(a));
+ elseif size(a,"*") == 1 then
+ a = a(ones(b));
+ end
+
+ r = a + b;
+endfunction
diff --git a/modules/overloading/macros/%c_b_c.bin b/modules/overloading/macros/%c_b_c.bin
new file mode 100755
index 000000000..6141284f2
--- /dev/null
+++ b/modules/overloading/macros/%c_b_c.bin
Binary files differ
diff --git a/modules/overloading/macros/%c_b_c.sci b/modules/overloading/macros/%c_b_c.sci
new file mode 100755
index 000000000..620a9bb06
--- /dev/null
+++ b/modules/overloading/macros/%c_b_c.sci
@@ -0,0 +1,21 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+function r=%c_b_c(varargin)
+ if size(varargin)==2 then
+ if type(varargin(1))==10 & type(varargin(2))==10 then
+ r=asciimat(asciimat(varargin(1)):asciimat(varargin(2)))
+ end
+ elseif size(varargin)==3 then
+ if type(varargin(1))==10 & type(varargin(2))==10 & type(varargin(3))==10 then
+ r=asciimat(asciimat(varargin(1)):asciimat(varargin(2)):asciimat(varargin(3)))
+ end
+ else
+ error(43)
+ end
+endfunction
diff --git a/modules/overloading/macros/%c_b_s.bin b/modules/overloading/macros/%c_b_s.bin
new file mode 100755
index 000000000..4b78025e3
--- /dev/null
+++ b/modules/overloading/macros/%c_b_s.bin
Binary files differ
diff --git a/modules/overloading/macros/%c_b_s.sci b/modules/overloading/macros/%c_b_s.sci
new file mode 100755
index 000000000..97c3db06a
--- /dev/null
+++ b/modules/overloading/macros/%c_b_s.sci
@@ -0,0 +1,18 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function r=%c_b_s(varargin)
+ if size(varargin)==3 then
+ if type(varargin(1))==10 & type(varargin(2))==1 & type(varargin(3))==10 then
+ r=asciimat(asciimat(varargin(1)):varargin(2):asciimat(varargin(3)))
+ end
+ else
+ error(43)
+ end
+endfunction
diff --git a/modules/overloading/macros/%c_diag.bin b/modules/overloading/macros/%c_diag.bin
new file mode 100755
index 000000000..e5f4ff4e8
--- /dev/null
+++ b/modules/overloading/macros/%c_diag.bin
Binary files differ
diff --git a/modules/overloading/macros/%c_diag.sci b/modules/overloading/macros/%c_diag.sci
new file mode 100755
index 000000000..d549160c5
--- /dev/null
+++ b/modules/overloading/macros/%c_diag.sci
@@ -0,0 +1,33 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function d=%c_diag(a,k)
+
+ [lhs,rhs]=argn(0)
+ if rhs==1 then k=0,end
+ [m,n]=size(a)
+ if m>1&n>1 then
+ if k<=0 then
+ mn=min(m+k,n)
+ i0=-k+1
+ else
+ mn=min(m,n-k)
+ i0=k*m+1
+ end
+ a=matrix(a,m*n,1)
+ i=i0+((0:mn-1)*(m+1))
+ d=a(i)
+ else
+ nn = max(m,n)+abs(k)
+ mn=max(m,n)
+ i=(1:mn)+((1:mn)+(k-1))*nn
+ d(i)=a
+ d=matrix(d,nn,nn)
+ end
+endfunction
diff --git a/modules/overloading/macros/%c_dsearch.bin b/modules/overloading/macros/%c_dsearch.bin
new file mode 100755
index 000000000..ccf466bbe
--- /dev/null
+++ b/modules/overloading/macros/%c_dsearch.bin
Binary files differ
diff --git a/modules/overloading/macros/%c_dsearch.sci b/modules/overloading/macros/%c_dsearch.sci
new file mode 100755
index 000000000..9261ddb6e
--- /dev/null
+++ b/modules/overloading/macros/%c_dsearch.sci
@@ -0,0 +1,73 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) - 2013 - Samuel GOUGEON
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function [i_bin, counts, outside] = %c_dsearch(T, bins, discrete)
+
+ // CHECKING PARAMETERS
+ // -------------------
+ bins2 = unique(bins)
+ if size(bins2,"*")~=size(bins,"*")
+ msg = _("%c: input argument #%d has duplicates\n")
+ error(msprintf(msg, "dsearch", 2))
+ end
+
+ // DISCRETE CASE
+ // -------------
+ if argn(2)>2 & discrete=="d" then
+ [nb, i_bin] = members(T, bins)
+ outside = sum(bool2s(nb==0))
+ counts = zeros(bins)
+ inds = [ 0 ; gsort(i_bin(:),"g","i") ; size(bins,"*")+1]
+ tmp = find(inds(2:$)~=inds(1:$-1))+1
+ counts(inds(tmp(1:$-1))) = tmp(2:$)-tmp(1:$-1)
+ counts($) = sum(T==bins($))
+
+ // SORTED CASE
+ // -----------
+ else
+ if or(bins2~=bins)
+ msg = _("%c: input argument #%d must be sorted in lexicographic order\n")
+ error(msprintf(msg, "dsearch", 2))
+ end
+ T0 = T
+ [T, k] = gsort(T0,"g","i")
+
+ // index of the first T(i) >= bins(1)
+ i0 = min(find(strcmp(T(:), bins(1))>=0))
+ if i0==[] then
+ i0 = 1
+ end
+ // Initializations
+ i_bin = zeros(T)
+ counts = zeros(bins(2:$))
+
+ // Loop over the bins
+ nT = size(T,"*")
+ for i = 1:size(bins,"*")-1
+ j = find(strcmp(T(i0:$), bins(i+1))<=0)
+ if j==[] then
+ counts(i) = 0
+ else
+ counts(i) = max(j)
+ i_bin(i0+j-1) = i
+ i0 = i0 + max(j)
+ end
+ if i0>nT then
+ break
+ end
+ end
+
+ // Taking into account the original T order
+ i_bin = i_bin(:)
+ i_bin(k(:)) = i_bin
+ i_bin = matrix(i_bin, size(k))
+ //
+ outside = sum(bool2s(i_bin==0))
+ end
+endfunction
diff --git a/modules/overloading/macros/%c_e.bin b/modules/overloading/macros/%c_e.bin
new file mode 100755
index 000000000..8a1cee6c9
--- /dev/null
+++ b/modules/overloading/macros/%c_e.bin
Binary files differ
diff --git a/modules/overloading/macros/%c_e.sci b/modules/overloading/macros/%c_e.sci
new file mode 100755
index 000000000..85e2dd247
--- /dev/null
+++ b/modules/overloading/macros/%c_e.sci
@@ -0,0 +1,34 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+function f=%c_e(varargin)
+ //A(i,j,k,..)
+
+ rhs=size(varargin)
+ M=varargin(rhs)
+
+ nind=rhs-1
+ dims=[]
+ for k=3:nind
+ ind=varargin(k)
+ if type(ind)==2|type(ind)==129 then ind=horner(ind,1),end
+ if type(ind)==4 then ind=find(ind),end
+ if or(ind<>1) then error(21),end
+ n=size(ind,"*")
+ dims=[dims,n]
+ end
+ f=M(varargin(1:min(2,rhs-1)))
+ k=find(dims>1)
+ if k<>[] then
+ dims(k($)+1:$)=[]
+ N=prod(dims)
+ szf=size(f)
+ f=f(:)
+ f=mlist(["hm","dims","entries"],int32([szf dims]),matrix(f(:,ones(1,N)),-1,1))
+ end
+endfunction
diff --git a/modules/overloading/macros/%c_eye.bin b/modules/overloading/macros/%c_eye.bin
new file mode 100755
index 000000000..0638b673b
--- /dev/null
+++ b/modules/overloading/macros/%c_eye.bin
Binary files differ
diff --git a/modules/overloading/macros/%c_eye.sci b/modules/overloading/macros/%c_eye.sci
new file mode 100755
index 000000000..4389512ec
--- /dev/null
+++ b/modules/overloading/macros/%c_eye.sci
@@ -0,0 +1,14 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function x=%c_eye(a)
+
+ [m,n]=size(a)
+ x=eye(m,n)
+endfunction
diff --git a/modules/overloading/macros/%c_f_s.bin b/modules/overloading/macros/%c_f_s.bin
new file mode 100755
index 000000000..08186b576
--- /dev/null
+++ b/modules/overloading/macros/%c_f_s.bin
Binary files differ
diff --git a/modules/overloading/macros/%c_f_s.sci b/modules/overloading/macros/%c_f_s.sci
new file mode 100755
index 000000000..5e4e68ec3
--- /dev/null
+++ b/modules/overloading/macros/%c_f_s.sci
@@ -0,0 +1,17 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function r=%c_f_s(a,b)
+
+ if b==[] then
+ r=a
+ else
+ error(43)
+ end
+endfunction
diff --git a/modules/overloading/macros/%c_i_c.bin b/modules/overloading/macros/%c_i_c.bin
new file mode 100755
index 000000000..0b98a3766
--- /dev/null
+++ b/modules/overloading/macros/%c_i_c.bin
Binary files differ
diff --git a/modules/overloading/macros/%c_i_c.sci b/modules/overloading/macros/%c_i_c.sci
new file mode 100755
index 000000000..95e6c8711
--- /dev/null
+++ b/modules/overloading/macros/%c_i_c.sci
@@ -0,0 +1,16 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA - Serge Steer
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function M=%c_i_c(varargin)
+ //insertion of an string matrix in an matrix of string for more than 2 indices
+ M=varargin($)
+ M=mlist(["hm","dims","entries"],int32(size(M)),M(:))
+ varargin($)=M;
+ M=generic_i_hm("",varargin(:))
+endfunction
diff --git a/modules/overloading/macros/%c_i_ce.bin b/modules/overloading/macros/%c_i_ce.bin
new file mode 100755
index 000000000..0e3300b79
--- /dev/null
+++ b/modules/overloading/macros/%c_i_ce.bin
Binary files differ
diff --git a/modules/overloading/macros/%c_i_ce.sci b/modules/overloading/macros/%c_i_ce.sci
new file mode 100755
index 000000000..0649060e3
--- /dev/null
+++ b/modules/overloading/macros/%c_i_ce.sci
@@ -0,0 +1,13 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA - Vincent Couvert
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function M=%c_i_ce(varargin)
+ // Insertion of a string matrix in a cell
+ M=generic_i_ce(varargin(:))
+endfunction
diff --git a/modules/overloading/macros/%c_i_h.bin b/modules/overloading/macros/%c_i_h.bin
new file mode 100755
index 000000000..d2d29aa72
--- /dev/null
+++ b/modules/overloading/macros/%c_i_h.bin
Binary files differ
diff --git a/modules/overloading/macros/%c_i_h.sci b/modules/overloading/macros/%c_i_h.sci
new file mode 100755
index 000000000..b221ceb01
--- /dev/null
+++ b/modules/overloading/macros/%c_i_h.sci
@@ -0,0 +1,16 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function h=%c_i_h(i,v,h)
+ h=generic_i_h(i,v,h)
+endfunction
+
+
+
+
diff --git a/modules/overloading/macros/%c_i_hm.bin b/modules/overloading/macros/%c_i_hm.bin
new file mode 100755
index 000000000..4c984493f
--- /dev/null
+++ b/modules/overloading/macros/%c_i_hm.bin
Binary files differ
diff --git a/modules/overloading/macros/%c_i_hm.sci b/modules/overloading/macros/%c_i_hm.sci
new file mode 100755
index 000000000..c21db3388
--- /dev/null
+++ b/modules/overloading/macros/%c_i_hm.sci
@@ -0,0 +1,14 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function M=%c_i_hm(varargin)
+
+ //insertion of an polynomial matrix in an hypermatrix
+ M=generic_i_hm("",varargin(:))
+endfunction
diff --git a/modules/overloading/macros/%c_i_lss.bin b/modules/overloading/macros/%c_i_lss.bin
new file mode 100755
index 000000000..0624e5875
--- /dev/null
+++ b/modules/overloading/macros/%c_i_lss.bin
Binary files differ
diff --git a/modules/overloading/macros/%c_i_lss.sci b/modules/overloading/macros/%c_i_lss.sci
new file mode 100755
index 000000000..5881b23b2
--- /dev/null
+++ b/modules/overloading/macros/%c_i_lss.sci
@@ -0,0 +1,25 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function s2=%c_i_lss(i,j,s1,s2)
+
+ if type(i)==10 then // sl('dt')
+ [lhs,rhs]=argn(0)
+ if rhs<>3 then error(21),end
+ if i<>"dt" then
+ error(msprintf(_("%s: Wrong type for input argument #%d.\n"),"%c_i_lss",1));
+ end
+ s2=s1;kf=7
+ if j<>"c"&j<>"d" then
+ error(msprintf(_("%s: Wrong value for input argument #%d: ''c'', ''d'' or a scalar expected.\n"),"%c_i_lss",2));
+ end
+ s2(kf)=j
+ return
+ end
+endfunction
diff --git a/modules/overloading/macros/%c_i_r.bin b/modules/overloading/macros/%c_i_r.bin
new file mode 100755
index 000000000..2c0edf966
--- /dev/null
+++ b/modules/overloading/macros/%c_i_r.bin
Binary files differ
diff --git a/modules/overloading/macros/%c_i_r.sci b/modules/overloading/macros/%c_i_r.sci
new file mode 100755
index 000000000..ac8bd9128
--- /dev/null
+++ b/modules/overloading/macros/%c_i_r.sci
@@ -0,0 +1,25 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function s2=%c_i_r(i,j,s1,s2)
+
+ if type(i)==10 then // sl('dt')
+ [lhs,rhs]=argn(0)
+ if rhs<>3 then error(21),end
+ if i<>"dt" then
+ error(msprintf(_("%s: Wrong type for input argument #%d.\n"),"%c_i_r",1));
+ end
+ s2=s1;kf=4
+ if j<>"c"&j<>"d" then
+ error(msprintf(_("%s: Wrong value for input argument #%d: ''c'', ''d'' or a scalar expected.\n"),"%c_i_r",2));
+ end
+ s2(kf)=j
+ return
+ end
+endfunction
diff --git a/modules/overloading/macros/%c_i_s.bin b/modules/overloading/macros/%c_i_s.bin
new file mode 100755
index 000000000..f1484004d
--- /dev/null
+++ b/modules/overloading/macros/%c_i_s.bin
Binary files differ
diff --git a/modules/overloading/macros/%c_i_s.sci b/modules/overloading/macros/%c_i_s.sci
new file mode 100755
index 000000000..c265fee31
--- /dev/null
+++ b/modules/overloading/macros/%c_i_s.sci
@@ -0,0 +1,54 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function M=%c_i_s(varargin)
+ [lhs,rhs]=argn(0)
+ M=varargin(rhs)
+ N=varargin(rhs-1)//inserted matrix
+ index=varargin(1) //
+ if size(M,"*")<>0 then
+ error(msprintf(_("%s: Affection of a string in a matrix of numbers is not implemented.\n"),"%c_i_s"));
+ end
+ if rhs==3 then
+ if type(index)==10 then //M.x=N or M.entries=N
+ M=struct()
+ M(index)=N
+ if index=="entries" then //M.entries=N
+ // change struct to cell
+ f=getfield(1,M);f(1)="ce"
+ setfield(1,f,M)
+ end
+ return
+ elseif type(index)==15 then
+ //M(i).x=N or M(i,j,..).x=N or M.x(i,j,..)or M(i,j..)
+ //check for a name in the index list
+ isstr=%f; for ii=index,if type(ii)==10 then isstr=%t,break,end,end
+ if isstr then
+ M=createstruct(index,N)
+ if type(index(1))<>10 & index(2)=="entries" then
+ // change struct to cell
+ f=getfield(1,M);f(1)="ce"
+ setfield(1,f,M)
+ end
+ else
+ M(index(:))=N
+ end
+ return
+ end
+
+ elseif rhs>4 then //more than 2 indices: insertion of a string in an empty matrix
+ M=varargin($)
+ M=mlist(["hm","dims","entries"],int32(size(M)),M(:))
+ varargin($)=M;
+ M=generic_i_hm("",varargin(:))
+ else //should not occur (hard coded case)
+ M=var
+ end
+endfunction
+
diff --git a/modules/overloading/macros/%c_i_st.bin b/modules/overloading/macros/%c_i_st.bin
new file mode 100755
index 000000000..a4cae2baf
--- /dev/null
+++ b/modules/overloading/macros/%c_i_st.bin
Binary files differ
diff --git a/modules/overloading/macros/%c_i_st.sci b/modules/overloading/macros/%c_i_st.sci
new file mode 100755
index 000000000..3779a65bb
--- /dev/null
+++ b/modules/overloading/macros/%c_i_st.sci
@@ -0,0 +1,12 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function out=%c_i_st(i,in,out)
+ out=generic_i_st(i,in,out)
+endfunction
diff --git a/modules/overloading/macros/%c_matrix.bin b/modules/overloading/macros/%c_matrix.bin
new file mode 100755
index 000000000..87fcfcc3e
--- /dev/null
+++ b/modules/overloading/macros/%c_matrix.bin
Binary files differ
diff --git a/modules/overloading/macros/%c_matrix.sci b/modules/overloading/macros/%c_matrix.sci
new file mode 100755
index 000000000..2f06566a3
--- /dev/null
+++ b/modules/overloading/macros/%c_matrix.sci
@@ -0,0 +1,11 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+function a=%c_matrix(a,varargin)
+ y=%hm_matrix(a,varargin(:))
+endfunction
diff --git a/modules/overloading/macros/%c_n_l.bin b/modules/overloading/macros/%c_n_l.bin
new file mode 100755
index 000000000..cd29caf9b
--- /dev/null
+++ b/modules/overloading/macros/%c_n_l.bin
Binary files differ
diff --git a/modules/overloading/macros/%c_n_l.sci b/modules/overloading/macros/%c_n_l.sci
new file mode 100755
index 000000000..142a351c2
--- /dev/null
+++ b/modules/overloading/macros/%c_n_l.sci
@@ -0,0 +1,14 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+function r=%c_n_l(l1,l2)
+ //%c_n_l(l1,l2) : l1==l2
+ //!
+
+ r=%t
+endfunction
diff --git a/modules/overloading/macros/%c_n_st.bin b/modules/overloading/macros/%c_n_st.bin
new file mode 100755
index 000000000..9dfb09320
--- /dev/null
+++ b/modules/overloading/macros/%c_n_st.bin
Binary files differ
diff --git a/modules/overloading/macros/%c_n_st.sci b/modules/overloading/macros/%c_n_st.sci
new file mode 100755
index 000000000..e1e0de268
--- /dev/null
+++ b/modules/overloading/macros/%c_n_st.sci
@@ -0,0 +1,14 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA, Serge Steer
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function r=%c_n_st(a,b)
+ // implements r=a~=b
+ // for a a matrix of strings and b a struct
+ r=%t
+endfunction
diff --git a/modules/overloading/macros/%c_o_l.bin b/modules/overloading/macros/%c_o_l.bin
new file mode 100755
index 000000000..5ca0890c8
--- /dev/null
+++ b/modules/overloading/macros/%c_o_l.bin
Binary files differ
diff --git a/modules/overloading/macros/%c_o_l.sci b/modules/overloading/macros/%c_o_l.sci
new file mode 100755
index 000000000..4b81ee8df
--- /dev/null
+++ b/modules/overloading/macros/%c_o_l.sci
@@ -0,0 +1,14 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function [r]=%c_o_l(l1,l2)
+ //%c_o_l(l1,l2) : l1==l2
+ //!
+ r=%f
+endfunction
diff --git a/modules/overloading/macros/%c_o_st.bin b/modules/overloading/macros/%c_o_st.bin
new file mode 100755
index 000000000..061d2b5da
--- /dev/null
+++ b/modules/overloading/macros/%c_o_st.bin
Binary files differ
diff --git a/modules/overloading/macros/%c_o_st.sci b/modules/overloading/macros/%c_o_st.sci
new file mode 100755
index 000000000..306060deb
--- /dev/null
+++ b/modules/overloading/macros/%c_o_st.sci
@@ -0,0 +1,14 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA, Serge Steer
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function r=%c_o_st(a,b)
+ // implements r=a==b
+ // for a a matrix of strings and b a struct
+ r=%f
+endfunction
diff --git a/modules/overloading/macros/%c_ones.bin b/modules/overloading/macros/%c_ones.bin
new file mode 100755
index 000000000..3309a3b96
--- /dev/null
+++ b/modules/overloading/macros/%c_ones.bin
Binary files differ
diff --git a/modules/overloading/macros/%c_ones.sci b/modules/overloading/macros/%c_ones.sci
new file mode 100755
index 000000000..21a1e770b
--- /dev/null
+++ b/modules/overloading/macros/%c_ones.sci
@@ -0,0 +1,14 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function x=%c_ones(a)
+ // Copyright INRIA
+ [m,n]=size(a)
+ x=ones(m,n)
+endfunction
diff --git a/modules/overloading/macros/%c_rand.bin b/modules/overloading/macros/%c_rand.bin
new file mode 100755
index 000000000..8fadf4d7d
--- /dev/null
+++ b/modules/overloading/macros/%c_rand.bin
Binary files differ
diff --git a/modules/overloading/macros/%c_rand.sci b/modules/overloading/macros/%c_rand.sci
new file mode 100755
index 000000000..37d084e40
--- /dev/null
+++ b/modules/overloading/macros/%c_rand.sci
@@ -0,0 +1,14 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function x=%c_rand(a)
+
+ [m,n]=size(a)
+ x=rand(m,n)
+endfunction
diff --git a/modules/overloading/macros/%c_tril.bin b/modules/overloading/macros/%c_tril.bin
new file mode 100755
index 000000000..043469281
--- /dev/null
+++ b/modules/overloading/macros/%c_tril.bin
Binary files differ
diff --git a/modules/overloading/macros/%c_tril.sci b/modules/overloading/macros/%c_tril.sci
new file mode 100755
index 000000000..22822d886
--- /dev/null
+++ b/modules/overloading/macros/%c_tril.sci
@@ -0,0 +1,21 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function d=%c_tril(a,k)
+
+ [lhs,rhs]=argn(0)
+ if rhs==1 then k=0,end
+
+ [m,n]=size(a)
+ i=find(tril(ones(a),k))
+ a=matrix(a,m*n,1)
+ d=emptystr(m*n,1)
+ d(i)=a(i)
+ d=matrix(d,m,n)
+endfunction
diff --git a/modules/overloading/macros/%c_triu.bin b/modules/overloading/macros/%c_triu.bin
new file mode 100755
index 000000000..79f162c49
--- /dev/null
+++ b/modules/overloading/macros/%c_triu.bin
Binary files differ
diff --git a/modules/overloading/macros/%c_triu.sci b/modules/overloading/macros/%c_triu.sci
new file mode 100755
index 000000000..21b874cf1
--- /dev/null
+++ b/modules/overloading/macros/%c_triu.sci
@@ -0,0 +1,26 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function d=%c_triu(a,k)
+ // g_triu - implement triu function for sparse matrix, rationnal matrix ,..
+ [lhs,rhs]=argn(0)
+ if rhs==1 then k=0,end
+
+ [m,n]=size(a)
+ if k<=0 then
+ mn=min(m,n-k)
+ else
+ mn=min(m+k,n)
+ end
+ a=matrix(a,m*n,1)
+ i=(1:mn)+((1:mn)+(k-1))*m
+ d=emptystr(m*n,1)
+ d(i)=a(i)
+ d=matrix(d,m,n)
+endfunction
diff --git a/modules/overloading/macros/%cblock_c_cblock.bin b/modules/overloading/macros/%cblock_c_cblock.bin
new file mode 100755
index 000000000..409e24727
--- /dev/null
+++ b/modules/overloading/macros/%cblock_c_cblock.bin
Binary files differ
diff --git a/modules/overloading/macros/%cblock_c_cblock.sci b/modules/overloading/macros/%cblock_c_cblock.sci
new file mode 100755
index 000000000..3becb6018
--- /dev/null
+++ b/modules/overloading/macros/%cblock_c_cblock.sci
@@ -0,0 +1,27 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+function a=%cblock_c_cblock(a,b)
+ na=length(a)
+ if na==1 then a=b,return,end
+ if length(b)==1 then return,end
+ v1=getfield(na,a)
+ v2=getfield(2,b)
+
+ if size(v1,1)<>size(v2,1) then error(5),end
+ if type(v1)==type(v2) then
+ setfield(na,[v1 v2],a)
+ else
+ setfield(na+1,v2,a);na=na+1
+ end
+
+ for k=3:length(b)
+ setfield(na+1,getfield(k,b),a)
+ na=na+1
+ end
+endfunction
diff --git a/modules/overloading/macros/%cblock_c_s.bin b/modules/overloading/macros/%cblock_c_s.bin
new file mode 100755
index 000000000..0a819efd0
--- /dev/null
+++ b/modules/overloading/macros/%cblock_c_s.bin
Binary files differ
diff --git a/modules/overloading/macros/%cblock_c_s.sci b/modules/overloading/macros/%cblock_c_s.sci
new file mode 100755
index 000000000..875fa71e6
--- /dev/null
+++ b/modules/overloading/macros/%cblock_c_s.sci
@@ -0,0 +1,19 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+function a=%cblock_c_s(a,b)
+ if b==[] then return,end
+ v=getfield($,a)
+
+ if size(v,1)<>size(b,1) then error(5),end
+ if type(b)==type(v) then
+ setfield($,[v b],a)
+ else
+ setfield($+1,b,a)
+ end
+endfunction
diff --git a/modules/overloading/macros/%cblock_e.bin b/modules/overloading/macros/%cblock_e.bin
new file mode 100755
index 000000000..985de8ce0
--- /dev/null
+++ b/modules/overloading/macros/%cblock_e.bin
Binary files differ
diff --git a/modules/overloading/macros/%cblock_e.sci b/modules/overloading/macros/%cblock_e.sci
new file mode 100755
index 000000000..b59e44e34
--- /dev/null
+++ b/modules/overloading/macros/%cblock_e.sci
@@ -0,0 +1,63 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+function y=%cblock_e(varargin)
+ x=varargin($)
+ dims=[];
+ for k=2:length(x)
+ dims=[dims;size(getfield(k,x))];
+ end
+ m=dims(1,1) // common row number
+
+ dims=cumsum([1 dims(:,2)']);
+ n=dims($)-1 // number of columns
+ y=mlist("cblock")
+
+ j=varargin($-1)
+ if type(j)==2|type(j)==129 then
+ j=horner(j,n)
+ elseif type(j)==4 then
+ j=find(j)
+ elseif and(size(j)==[-1,-1]) then
+ j=1:n
+ end
+ if length(varargin)==2 then //y=x(i)
+ if m<>1 then
+ error(msprintf(_("%s: Syntax x(j) only allowed for row cblock''s.\n"),"cblock_e"));
+ end
+ i=1
+ else //y=x(i,j)
+ i=varargin(1)
+ end
+
+ first=%t
+
+ for k=1:size(j,"*")
+ jk=j(k)
+ I=find(jk>=dims(1:$-1)&jk<dims(2:$))
+ if I>1 then jk=jk-dims(I)+1,end
+ v=getfield(I+1,x)
+ if first then
+ temp=v(i,jk)
+ first=%f
+ else
+ if type(v)==type(temp) then
+ temp=[temp v(i,jk)]
+ else
+ setfield(length(y)+1,temp,y)
+ temp=v(i,jk)
+ end
+ end
+ end
+ if length(y)==1 then
+ y=temp
+ else
+ setfield(length(y)+1,temp,y)
+ end
+
+endfunction
diff --git a/modules/overloading/macros/%cblock_f_cblock.bin b/modules/overloading/macros/%cblock_f_cblock.bin
new file mode 100755
index 000000000..d0b8d3de2
--- /dev/null
+++ b/modules/overloading/macros/%cblock_f_cblock.bin
Binary files differ
diff --git a/modules/overloading/macros/%cblock_f_cblock.sci b/modules/overloading/macros/%cblock_f_cblock.sci
new file mode 100755
index 000000000..c6ff50533
--- /dev/null
+++ b/modules/overloading/macros/%cblock_f_cblock.sci
@@ -0,0 +1,17 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+function a=%cblock_f_cblock(a,b)
+ if length(a)==1 then a=b,return,end
+ if length(b)==1 then return,end
+
+ if length(a)<>length(b) then error(6),end
+ for k=2:length(a)
+ setfield(k,[getfield(k,a);getfield(k,b)],a)
+ end
+endfunction
diff --git a/modules/overloading/macros/%cblock_p.bin b/modules/overloading/macros/%cblock_p.bin
new file mode 100755
index 000000000..fc119ac99
--- /dev/null
+++ b/modules/overloading/macros/%cblock_p.bin
Binary files differ
diff --git a/modules/overloading/macros/%cblock_p.sci b/modules/overloading/macros/%cblock_p.sci
new file mode 100755
index 000000000..0e400da78
--- /dev/null
+++ b/modules/overloading/macros/%cblock_p.sci
@@ -0,0 +1,43 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function %cblock_p(m)
+ n=size(definedfields(m),"*")
+ txt=[];
+ for k=2:n
+ txt=[txt string(getfield(k,m))];
+ end
+ l=max(length(txt),"r");
+ n=size(txt,2);
+ for k=1:n
+ txt(:,k)=part(txt(:,k),1:l(k));
+ end
+
+ nlc=lines()
+ k1=1
+ while %t
+ L=cumsum(l(k1:$)+2)
+ k2=max(find(L<nlc(1)-3))
+ if k2==[] then k2=k1 ;else k2=k1-1+k2;end
+ t=emptystr(size(txt,1),1);
+ for i=k1:k2
+ t=t+txt(:,i)+" ";
+ end
+ if k1==1&k2==n then mprintf("%s\n"," "+t),break,end
+
+ if k1==k2 then
+ mprintf("%s\n",["Column "+string(k1);" ";" "+t])
+ else
+ mprintf("%s\n",["Columns "+string(k1)+" to "+string(k2);" ";+" "+t;" "])
+ end
+ if k2==n then break,end
+ k1=k2+1
+ end
+endfunction
+
diff --git a/modules/overloading/macros/%cblock_size.bin b/modules/overloading/macros/%cblock_size.bin
new file mode 100755
index 000000000..690f3be80
--- /dev/null
+++ b/modules/overloading/macros/%cblock_size.bin
Binary files differ
diff --git a/modules/overloading/macros/%cblock_size.sci b/modules/overloading/macros/%cblock_size.sci
new file mode 100755
index 000000000..1d1ce7e0e
--- /dev/null
+++ b/modules/overloading/macros/%cblock_size.sci
@@ -0,0 +1,17 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+function [m,n]=%cblock_size(M)
+ n=size(definedfields(M),"*")-1;
+ m=size(getfield(2,M),1);
+ n=0
+ for k=2:size(definedfields(M),"*")
+ n=n+size(getfield(k,M),2);
+ end
+ if argn(2)==1 then m=[m,n],end
+endfunction
diff --git a/modules/overloading/macros/%ce_6.bin b/modules/overloading/macros/%ce_6.bin
new file mode 100755
index 000000000..166d1118e
--- /dev/null
+++ b/modules/overloading/macros/%ce_6.bin
Binary files differ
diff --git a/modules/overloading/macros/%ce_6.sci b/modules/overloading/macros/%ce_6.sci
new file mode 100755
index 000000000..11c1ffb87
--- /dev/null
+++ b/modules/overloading/macros/%ce_6.sci
@@ -0,0 +1,50 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA - F. Delebecque, S. Steer
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function s=%ce_6(varargin)
+ // called in the context of complex struct insertion
+ // to realize partial extraction
+
+ nind=size(varargin)-1; //the number of indexes
+ s=varargin($); // the struct
+
+ if size(varargin)==2 & type(varargin(1))==10 then //X.b extraction assumed
+ f=getfield(1,s);
+ if or(varargin(1)==f(3:$)) then //field exists
+ // perform standard field extraction
+ s=%st_e(varargin(:));
+ else //field does not exists
+ // return empty struct
+ s=mlist(["ce","dims"],int32([0 0]))
+ end
+
+ else //X(i,j,k) extraction assumed
+ //check if indexes are in the dimension bounds
+ dims=s.dims
+ if size(dims,"*")<nind then dims($:nind)=1;end
+ if size(dims,"*")>nind then dims=[dims(1:nind-1) prod(dims(nind:$))];end // Bug 3833 fix: This line where present in %st_6 but not there
+ indmax=ones(1,nind);
+ for k=1:nind,indmax(k)=max(varargin(k));end
+
+ if and(indmax<=dims) then //Yes
+ // perform standard sub-matrix extraction
+ s=%st_e(varargin(:));
+ else // i,j,k out of bounds
+ f=getfield(1,s);f=f(3:$);
+ if f==[] then
+ // the original struct has no field return an empty struct
+ s.dims=int32([0 0]);
+ else
+ // return a 1x1 struct with fields set to []
+ for k=1:size(f,"*"),setfield(k+2,[],s);end
+ s.dims=int32([1 1]);
+ end
+ end
+ end
+endfunction
diff --git a/modules/overloading/macros/%ce_c_ce.bin b/modules/overloading/macros/%ce_c_ce.bin
new file mode 100755
index 000000000..89bb695e5
--- /dev/null
+++ b/modules/overloading/macros/%ce_c_ce.bin
Binary files differ
diff --git a/modules/overloading/macros/%ce_c_ce.sci b/modules/overloading/macros/%ce_c_ce.sci
new file mode 100755
index 000000000..3445f9b7c
--- /dev/null
+++ b/modules/overloading/macros/%ce_c_ce.sci
@@ -0,0 +1,38 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function r=%ce_c_ce(a,b)
+ da=a.dims;if size(da,"*")<2 then da(2)=1,end
+ db=b.dims;if size(db,"*")<2 then db(2)=1,end
+ da=double(da);db=double(db);
+ if size(da,"*")<>size(db,"*") then
+ error(msprintf(_("%s: In concatenation the number of dimensions for each component must match.\n"),"ce_c_ce"));
+ end
+
+ kd=find(da<>db)
+ kd(find(kd==2))=[]
+ if kd<>[] then
+ error(5)
+ end
+ v=[matrix(1:prod(da),da(1)*da(2),prod(da)/(da(1)*da(2)));
+ -matrix(1:prod(db),db(1)*db(2),prod(db)/(db(1)*db(2)))]
+ val=list()
+ for k=1:size(v,"*")
+ if v(k)>0 then
+ val(k)=a.entries(v(k))
+ else
+ val(k)=b.entries(-v(k))
+ end
+ end
+ da(2)=da(2)+db(2)
+ r=mlist(["ce","dims","entries"],int32(da),val)
+endfunction
+
+
+
diff --git a/modules/overloading/macros/%ce_e.bin b/modules/overloading/macros/%ce_e.bin
new file mode 100755
index 000000000..ca7755fa6
--- /dev/null
+++ b/modules/overloading/macros/%ce_e.bin
Binary files differ
diff --git a/modules/overloading/macros/%ce_e.sci b/modules/overloading/macros/%ce_e.sci
new file mode 100755
index 000000000..646d91b6a
--- /dev/null
+++ b/modules/overloading/macros/%ce_e.sci
@@ -0,0 +1,103 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+function s=%ce_e(varargin)
+ //extraction from struct
+ w=varargin($);
+ if type(varargin(1))==15 //x(i,j,k).f or x.f(i,j,k)
+ index=varargin($-1);
+ if type(index($))==10 then //x(i,j,k).f
+ f=index($);
+ //ijk=list2vec(index(1));
+ [indx,I]=convertindex(double(w.dims),index(1)(:));
+ // I<->ijk
+ all_fields=getfield(1,w);all_fields=all_fields(3:$);
+ fieldnum=find(f==all_fields);
+ if fieldnum==[] then error(msprintf(_("%s: Invalid field name.\n"),"%ce_e"));end
+ good_list=getfield(2+fieldnum,w);
+ if size(I,"*")==1 then
+ s=good_list(I) //list(good_list(I)) ?
+ else
+ s=list();
+ for kk=1:size(I,"*")
+ s(kk)=good_list(I(kk));end
+ end
+ return;
+ else //x.f(i,j,k)
+ f=index(1);
+ li=w(f);
+ [indx,I]=convertindex(double(w.dims),index($)(:));
+ s=li(I);
+ return;
+ end
+ end
+
+ if type(varargin(1))==10 then
+ //field x.f
+ fields=getfield(1,w);nu=find(fields(3:$)==varargin(1));
+ if nu==[] then
+ error(msprintf(_("%s: Wrong value for input argument #%d: a valid field name expected.\n"),"%ce_e",1));return;
+ end
+ s=getfield(nu+2,w);
+ if prod(getfield(2,w))==1 then s=s(1);end
+ return;
+ end
+
+ //substruct x(i,j,k...)
+ nind=size(varargin)-1
+
+ dims1=double(w.dims)
+ if nind<size(dims1,"*") then
+ //reduce the dimension according to the number of indexes
+ dims1=[dims1(1:nind-1) prod(dims1(nind:$))]
+ if size(dims1,"*")==1 then dims1=[dims1 1],end
+ end
+ //get the "linear" vector of indexes
+ [indx,I]=convertindex(dims1,varargin(1:$-1));
+ dims=zeros(1,nind)
+
+ //computing dimensions of the result
+ //following loop should be merged in the convertindex code
+ for kk=1:nind
+ ik=varargin(kk)
+
+ if or(type(ik)==[2 129]) then
+ ik=horner(ik,dims1(kk))
+ end
+ if type(ik)==4 then
+ dims(kk)=max(find(ik))
+ elseif size(ik,1)~=-1 then
+ dims(kk)=size(ik,"*")
+ else
+ dims(kk)=dims1(kk)
+ end
+ end
+
+ while dims($)==1 then dims($)=[],end
+ select size(dims,"*")
+ case 0 then
+ dims=[1,1]
+ case 1 then
+ dims=[dims,1]
+ else
+ dims=matrix(dims,1,-1)
+ end
+ s=mlist(getfield(1,w),int32(dims));
+ sz=size(getfield(1,w),"*");
+ for k=3:sz
+ ww=getfield(k,w);
+ if type(ww)~=15 then ww=list(ww);end
+ if prod(dims)==1
+ setfield(k,ww(I),s);
+ elseif prod(dims)==0 //VC 27/05/2004 after modification in convertindex
+ setfield(k,list(),s);
+ else
+ setfield(k,list(ww(I)),s);
+ end
+ end
+endfunction
diff --git a/modules/overloading/macros/%ce_f_ce.bin b/modules/overloading/macros/%ce_f_ce.bin
new file mode 100755
index 000000000..7bd23351d
--- /dev/null
+++ b/modules/overloading/macros/%ce_f_ce.bin
Binary files differ
diff --git a/modules/overloading/macros/%ce_f_ce.sci b/modules/overloading/macros/%ce_f_ce.sci
new file mode 100755
index 000000000..29b5ca1bb
--- /dev/null
+++ b/modules/overloading/macros/%ce_f_ce.sci
@@ -0,0 +1,16 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function R=%ce_f_ce(M1,M2)
+ //R=[M1' M2']'
+ R=%ce_t(%ce_c_ce(%ce_t(M1),%ce_t(M2)))
+endfunction
+
+
+
diff --git a/modules/overloading/macros/%ce_i_ce.bin b/modules/overloading/macros/%ce_i_ce.bin
new file mode 100755
index 000000000..02757001d
--- /dev/null
+++ b/modules/overloading/macros/%ce_i_ce.bin
Binary files differ
diff --git a/modules/overloading/macros/%ce_i_ce.sci b/modules/overloading/macros/%ce_i_ce.sci
new file mode 100755
index 000000000..5a5008305
--- /dev/null
+++ b/modules/overloading/macros/%ce_i_ce.sci
@@ -0,0 +1,118 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA - F. Delebecque, S. Steer, V. Couvert
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function M=%ce_i_ce(varargin)
+ //insert the cell varargin($-1) into the cell varargin($)
+ //at position varargin(1), varargin(2),varargin(3),...
+ //insert the cell varargin($-1) as the field varargin(1)
+ //of the cell varargin($)
+
+ [lhs,rhs]=argn(0)
+ M=varargin($)
+ N=varargin($-1)//inserted matrix
+ dims=double(matrix(M.dims,1,-1));
+ // Dimensions modified so that convertindex works correctly
+
+ //computing the dimension of the result
+ nd=size(dims,"*")
+
+ olddims=dims
+
+ reduced_index=%f
+ if rhs-2>nd then //more indices than M number of dims
+ dims(nd+1:rhs-2)=1;
+ elseif rhs-2<nd then //less indices than M number of dims
+ dims=[dims(1:rhs-3) prod(dims(rhs-2:$))]
+ if size(find(dims>1),"*")>1 then reduced_index=%t,end
+ end
+ //convert N-dimensional indexes to 1-D and extend dims if necessary
+ [Ndims,I]=convertindex(list(dims,double(matrix(N.dims,1,-1))),varargin(1:$-2));
+ Ndims=matrix(Ndims,1,-1)
+ if reduced_index&or(Ndims<>dims) then error(21),end
+ if or(Ndims>dims) then
+ //extend the destination matrix
+ I1=0
+ for k=size(Ndims,"*"):-1:1
+ ik1=(1:dims(k))';
+ if ik1<>[] then
+ if Ndims(k)>1 then
+ if size(I1,"*")>1 then
+ I1=(Ndims(k)*I1).*.ones(ik1)+ones(I1).*.(ik1-1);
+ else
+ I1=Ndims(k)*I1+ik1-1;
+ end
+ else
+ I1=Ndims(k)*I1+ik1-1;
+ end
+ end
+ end
+ // create the resulting matrix
+ v2=list();for k=1:prod(Ndims),v2(k)=[];end
+
+ // populate it with M entries
+ w=getfield(3,M);
+ if type(w)<>15 then w=list(w),end
+ if type(v2)<>15 then v2=list(v2);end
+ for i=1:size(I1,"*"),
+ if w<>list() then
+ v2(I1(i)+1)=w(i);
+ else
+ v2(I1(i)+1)=[];
+ end
+ end
+ R=mlist(["ce","dims","entries"],int32(Ndims),v2);
+ else //the dimension agree
+ R=M
+ end
+
+ //insert N entries into result
+ for k=1
+ kf=1
+ v2=getfield(3,R);
+ w=getfield(3,N);
+ if type(w)<>15 then w=list(w),end
+ if type(v2)<>15 then v2=list(v2);end
+ for i=1:size(I,"*"),
+ if w<>list() then
+ v2(I(i))=w(i);
+ else
+ v2(I(i))=[];
+ end
+ end
+ if length(v2)==1 then v2=v2(1);end
+ setfield(3,v2,R);
+ end
+
+ //remove trailing unitary dimensions
+ if reduced_index then
+ Ndims=olddims
+ else
+ while Ndims($)==1 then Ndims($)=[],end
+ select size(Ndims,"*")
+ case 0 then
+ Ndims=[1,1]
+ case 1 then
+ k=find(olddims<>1&olddims<>0)
+ if k==[] // M was a scalar
+ if mtlb_mode() then
+ Ndims=[1,Ndims]
+ else
+ Ndims=[Ndims,1]
+ end
+ else // M was a vector
+ olddims(k)=Ndims
+ Ndims=olddims;
+ end
+ else
+ Ndims=matrix(Ndims,1,-1)
+ end
+ end
+ R.dims=int32(Ndims)
+ M=R
+endfunction
diff --git a/modules/overloading/macros/%ce_i_s.bin b/modules/overloading/macros/%ce_i_s.bin
new file mode 100755
index 000000000..878e504c7
--- /dev/null
+++ b/modules/overloading/macros/%ce_i_s.bin
Binary files differ
diff --git a/modules/overloading/macros/%ce_i_s.sci b/modules/overloading/macros/%ce_i_s.sci
new file mode 100755
index 000000000..f147663c5
--- /dev/null
+++ b/modules/overloading/macros/%ce_i_s.sci
@@ -0,0 +1,13 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA - V. Couvert
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function [M]=%ce_i_s(varargin)
+ // Insertion of a cell in []
+ M=generic_i_s(varargin(:))
+endfunction
diff --git a/modules/overloading/macros/%ce_i_st.bin b/modules/overloading/macros/%ce_i_st.bin
new file mode 100755
index 000000000..bd0fe8e1a
--- /dev/null
+++ b/modules/overloading/macros/%ce_i_st.bin
Binary files differ
diff --git a/modules/overloading/macros/%ce_i_st.sci b/modules/overloading/macros/%ce_i_st.sci
new file mode 100755
index 000000000..ce4be0fe9
--- /dev/null
+++ b/modules/overloading/macros/%ce_i_st.sci
@@ -0,0 +1,11 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+function out=%ce_i_st(i,in,out)
+ out=generic_i_st(i,in,out)
+endfunction
diff --git a/modules/overloading/macros/%ce_matrix.bin b/modules/overloading/macros/%ce_matrix.bin
new file mode 100755
index 000000000..4b23b3a83
--- /dev/null
+++ b/modules/overloading/macros/%ce_matrix.bin
Binary files differ
diff --git a/modules/overloading/macros/%ce_matrix.sci b/modules/overloading/macros/%ce_matrix.sci
new file mode 100755
index 000000000..237842ab9
--- /dev/null
+++ b/modules/overloading/macros/%ce_matrix.sci
@@ -0,0 +1,25 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+function m=%ce_matrix(m,varargin)
+ dims=m.dims
+ new=[]
+ for v=varargin
+ new=[new,v]
+ end
+ n=find(new==-1)
+ if size(n,"*")==1 then
+ d=prod(dims)/abs(prod(new))
+ if d<>int(d) then error(60),end
+ new(n)=d
+ elseif n<>[] then
+ error(42)
+ end
+ if prod(new)<>prod(dims) then error(60),end
+ m.dims=new
+endfunction
diff --git a/modules/overloading/macros/%ce_p.bin b/modules/overloading/macros/%ce_p.bin
new file mode 100755
index 000000000..5a241fed1
--- /dev/null
+++ b/modules/overloading/macros/%ce_p.bin
Binary files differ
diff --git a/modules/overloading/macros/%ce_p.sci b/modules/overloading/macros/%ce_p.sci
new file mode 100755
index 000000000..ec0743f9c
--- /dev/null
+++ b/modules/overloading/macros/%ce_p.sci
@@ -0,0 +1,11 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+function %ce_p(c)
+ disp(%ce_string(c))
+endfunction
diff --git a/modules/overloading/macros/%ce_size.bin b/modules/overloading/macros/%ce_size.bin
new file mode 100755
index 000000000..0b63a2b8f
--- /dev/null
+++ b/modules/overloading/macros/%ce_size.bin
Binary files differ
diff --git a/modules/overloading/macros/%ce_size.sci b/modules/overloading/macros/%ce_size.sci
new file mode 100755
index 000000000..36acdafb5
--- /dev/null
+++ b/modules/overloading/macros/%ce_size.sci
@@ -0,0 +1,37 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+function varargout=%ce_size(M,job)
+ // returns dimensions of a cell
+ [lhs,rhs]=argn(0)
+ dims=matrix(double(M.dims),1,-1);
+ if rhs==2 then
+ if job=="*" then
+ varargout(1)=prod(dims)
+ return
+ elseif type(job)==1 then
+ if size(job,"*") >1 then error(msprintf(_("%s: Wrong size for input argument #%d.\n"),"%ce_size",2));end
+ if job<=0|job>size(dims,"*") then
+ error(msprintf(_("%s: Wrong size for input argument #%d.\n"),"%ce_size",2));
+ end
+ varargout(1)=dims(job)
+ else
+ error(msprintf(_("%s: Wrong type for input argument #%d.\n"),"%ce_size",2));
+ end
+ return
+ end
+ if lhs==1 then
+ varargout(1)=matrix(dims,1,-1)
+ else
+ if lhs>size(dims,"*") then error(msprintf(_("%s: Wrong number of output arguments.\n"),"%ce_size")),end
+ for k=1:lhs
+ varargout(k)=dims(k)
+ end
+ end
+endfunction
+
diff --git a/modules/overloading/macros/%ce_string.bin b/modules/overloading/macros/%ce_string.bin
new file mode 100755
index 000000000..9e2ddb842
--- /dev/null
+++ b/modules/overloading/macros/%ce_string.bin
Binary files differ
diff --git a/modules/overloading/macros/%ce_string.sci b/modules/overloading/macros/%ce_string.sci
new file mode 100755
index 000000000..a5e764ab4
--- /dev/null
+++ b/modules/overloading/macros/%ce_string.sci
@@ -0,0 +1,60 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+function str=%ce_string(c)
+ str=[];
+ ll=lines()
+ val=c.entries
+ dims=double(c.dims);
+ if type(val)==15 then // Whole cell array display
+ for k=1:length(val)
+ tp=typeof(val(k))
+ if tp=="st" then
+ str(k)="{"+strcat(string(double(val(k).dims)),"x")+" struct}"
+ //str(k)=%st_string(val(k))
+ else
+ sz=size(val(k))
+ if prod(sz)==0 then
+ str(k)="{}"
+ else
+ tmp=sci2exp(val(k),ll(1))
+ if size(tmp,"*")==1 then
+ str(k)=tmp
+ else
+ str(k)="{"+strcat(string(sz),"x")+" "+tp+"}"
+ end
+ end
+ end
+ end
+ else // cell display
+ tp=typeof(val)
+ dims=[1 1]
+ if tp=="st" then
+ str="{"+strcat(string(double(val.dims)),"x")+" struct}"
+ else
+ sz=size(val)
+ if prod(sz)==0 then
+ str="{}"
+ else
+ tmp=sci2exp(val,ll(1))
+ if size(tmp,"*")==1 then
+ str=tmp
+ else
+ str="{"+strcat(string(sz),"x")+" "+tp+"}"
+ end
+ end
+ end
+ end
+
+ if size(dims,"*")>2 then
+ str=hypermat(dims,str)
+ else
+ str=matrix(str,dims(1),-1)
+ end
+endfunction
+
diff --git a/modules/overloading/macros/%ce_t.bin b/modules/overloading/macros/%ce_t.bin
new file mode 100755
index 000000000..1970c8c96
--- /dev/null
+++ b/modules/overloading/macros/%ce_t.bin
Binary files differ
diff --git a/modules/overloading/macros/%ce_t.sci b/modules/overloading/macros/%ce_t.sci
new file mode 100755
index 000000000..e97a1a093
--- /dev/null
+++ b/modules/overloading/macros/%ce_t.sci
@@ -0,0 +1,22 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function R=%ce_t(M)
+ D=double(M.dims)
+ if size(D,"*")>2 then
+ error(msprintf(_("%s: Wrong size for input argument #%d: Transpose can not be defined.\n"),"%ce_t",1));
+ end
+ NewInd=matrix(matrix(1:prod(D),D)',1,-1)
+ F=getfield(1,M)
+ R=mlist(F,int32([D(2) D(1)]))
+ for k=3:size(F,"*")
+ v=getfield(k,M)
+ setfield(k,list(v(NewInd)),R)
+ end
+endfunction
diff --git a/modules/overloading/macros/%champdat_i_h.bin b/modules/overloading/macros/%champdat_i_h.bin
new file mode 100755
index 000000000..bf17eab5e
--- /dev/null
+++ b/modules/overloading/macros/%champdat_i_h.bin
Binary files differ
diff --git a/modules/overloading/macros/%champdat_i_h.sci b/modules/overloading/macros/%champdat_i_h.sci
new file mode 100755
index 000000000..15d0f47f8
--- /dev/null
+++ b/modules/overloading/macros/%champdat_i_h.sci
@@ -0,0 +1,43 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+function h=%champdat_i_h(i,v,h)
+ if type(i)==10 then
+ set(h,i,v)
+ elseif type(i)==15 then
+ hdl=h
+ p=i($)
+ if type(p)==1|type(p)==4|type(p)==2|type(p)==129|type(p)==15 then
+ index=i($)
+ i($)=null()
+ else
+ index=:
+ end
+ n=lstsize(i)
+ for k=1:n-1
+ p=i(k)
+ if type(p)==10 then
+ hdl=get(hdl,p),
+ elseif type(p)==1|type(p)==4|type(p)==2|type(p)==129 then
+ hdl=hdl(p)
+ elseif type(p)==15 then
+ hdl=hdl(p(:))
+ else
+ error(msprintf(_("%s: Invalid path.\n"),"%champdat_i_h"));
+ end
+ end
+ if type(index)==15 then
+ hdl=hdl(index(:))
+ else
+ hdl=hdl(index)
+ end
+ set(hdl,i($),v)
+ else
+ error(msprintf(_("%s: Wrong type for input argument #%d.\n"),"%champdat_i_h",1));
+ end
+endfunction
diff --git a/modules/overloading/macros/%choose.bin b/modules/overloading/macros/%choose.bin
new file mode 100755
index 000000000..e7a9d1e30
--- /dev/null
+++ b/modules/overloading/macros/%choose.bin
Binary files differ
diff --git a/modules/overloading/macros/%choose.sci b/modules/overloading/macros/%choose.sci
new file mode 100755
index 000000000..21d3ec2a8
--- /dev/null
+++ b/modules/overloading/macros/%choose.sci
@@ -0,0 +1,49 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+
+function [flag]=%choose(x)
+ // Utility function for use with schur
+ // [U,dim]=schur(A,choose) returns orth. basis
+ // for eigenspace associated to selected polynomials
+ //Needs two global variables :
+ // %sel = list of selected polynomials (user defined)
+ // eps = threshold for polynomials selection (eps= 0.0001 as default value)
+ // see below
+ // Example:
+ // A=...
+ // chis=poly(A,'s'); //Characteristic polynomial
+ // w=factors(chis); //Factors of chis in a list
+ // %sel=list(w(2),w(3)); // two selected polynomials
+ // eps=0.01; //Threshold (see almosteq below)
+ // [U,dim]=schur(A,%choose); //Ordered Schur form
+ // U1=U(:,1:dim);chi1=poly(U1'*A*U1,'s') //Check
+ // w1=factors(chi1) // w1 = %sel ?
+ //
+ // Copyright INRIA
+ eps=0.0001; //modify eps here !
+ //
+ flag=0;s=poly(0,"s");
+ select x(1)
+ case 1 then
+ // ASSUME x(3) NOT ZERO (for gev pb. x(3)=0 => eval @ infty)
+ vp=x(2)/x(3);pol=s-vp; //disp(pol);
+ for p=%sel; if almosteq(pol,p,eps) then flag=1;end;end
+ case 2 then
+ pol=s^2-x(2)*s+x(3); //disp(pol);
+ for p=%sel; if almosteq(pol,p,eps) then flag=1;end;end
+ end
+
+endfunction
+function trfa=almosteq(pol,p,eps)
+ // returns %T if pol ~ p %F if not
+ if degree(pol)<>degree(p) then trfa=%F;return;end
+ if norm((coeff(p)-coeff(pol)),1)<=eps then trfa=%T;return;end
+ trfa=%F;
+endfunction
diff --git a/modules/overloading/macros/%fptr_i_st.bin b/modules/overloading/macros/%fptr_i_st.bin
new file mode 100755
index 000000000..3fec0d73d
--- /dev/null
+++ b/modules/overloading/macros/%fptr_i_st.bin
Binary files differ
diff --git a/modules/overloading/macros/%fptr_i_st.sci b/modules/overloading/macros/%fptr_i_st.sci
new file mode 100755
index 000000000..face6de8a
--- /dev/null
+++ b/modules/overloading/macros/%fptr_i_st.sci
@@ -0,0 +1,12 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function out=%fptr_i_st(i,in,out)
+ out=generic_i_st(i,in,out)
+endfunction
diff --git a/modules/overloading/macros/%grayplot_i_h.bin b/modules/overloading/macros/%grayplot_i_h.bin
new file mode 100755
index 000000000..4405ff051
--- /dev/null
+++ b/modules/overloading/macros/%grayplot_i_h.bin
Binary files differ
diff --git a/modules/overloading/macros/%grayplot_i_h.sci b/modules/overloading/macros/%grayplot_i_h.sci
new file mode 100755
index 000000000..140ca0c11
--- /dev/null
+++ b/modules/overloading/macros/%grayplot_i_h.sci
@@ -0,0 +1,43 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+function h=%grayplot_i_h(i,v,h)
+ if type(i)==10 then
+ set(h,i,v)
+ elseif type(i)==15 then
+ hdl=h
+ p=i($)
+ if type(p)==1|type(p)==4|type(p)==2|type(p)==129|type(p)==15 then
+ index=i($)
+ i($)=null()
+ else
+ index=:
+ end
+ n=lstsize(i)
+ for k=1:n-1
+ p=i(k)
+ if type(p)==10 then
+ hdl=get(hdl,p),
+ elseif type(p)==1|type(p)==4|type(p)==2|type(p)==129 then
+ hdl=hdl(p)
+ elseif type(p)==15 then
+ hdl=hdl(p(:))
+ else
+ error(msprintf(_("%s: Invalid path.\n"),"%grayplot_i_h"));
+ end
+ end
+ if type(index)==15 then
+ hdl=hdl(index(:))
+ else
+ hdl=hdl(index)
+ end
+ set(hdl,i($),v)
+ else
+ error(msprintf(_("%s: Wrong type for input argument #%d.\n"),"%grayplot_i_h",1));
+ end
+endfunction
diff --git a/modules/overloading/macros/%h_i_st.bin b/modules/overloading/macros/%h_i_st.bin
new file mode 100755
index 000000000..d52ef80ae
--- /dev/null
+++ b/modules/overloading/macros/%h_i_st.bin
Binary files differ
diff --git a/modules/overloading/macros/%h_i_st.sci b/modules/overloading/macros/%h_i_st.sci
new file mode 100755
index 000000000..d081ddc49
--- /dev/null
+++ b/modules/overloading/macros/%h_i_st.sci
@@ -0,0 +1,11 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+function out=%h_i_st(i,in,out)
+ out=generic_i_st(i,in,out)
+endfunction
diff --git a/modules/overloading/macros/%hmS_k_hmS_generic.bin b/modules/overloading/macros/%hmS_k_hmS_generic.bin
new file mode 100755
index 000000000..1f11760f6
--- /dev/null
+++ b/modules/overloading/macros/%hmS_k_hmS_generic.bin
Binary files differ
diff --git a/modules/overloading/macros/%hmS_k_hmS_generic.sci b/modules/overloading/macros/%hmS_k_hmS_generic.sci
new file mode 100755
index 000000000..6ade511fa
--- /dev/null
+++ b/modules/overloading/macros/%hmS_k_hmS_generic.sci
@@ -0,0 +1,36 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2014 - Samuel GOUGEON
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function r = %hmS_k_hmS_generic(a, b)
+
+ // Code used by %s_k_hm(), %hm_k_s() and %hm_k_hm()
+ // Fully rewritten and factorized after bug http://bugzilla.scilab.org/13339
+
+ sa = size(a)
+ sb = size(b)
+ sa = [sa ones(1,ndims(b)-ndims(a))]
+ sb = [sb ones(1,ndims(a)-ndims(b))]
+ La = length(a)
+ Lb = length(b)
+ a = a(:)
+ b = b(:)
+ ia = (1:La).' .*.ones(b);
+ ib = ones(a) .*. (1:Lb).';
+ ir = (ia-1).*Lb + ib;
+ pa = ind2sub(sa, ia)
+ pb = ind2sub(sb, ib)
+ clear ia ib
+ pr = (pa-1).*repmat(sb, La*Lb, 1) + pb
+ clear pa pb
+ nir = sub2ind(sa.*sb, pr)
+ [v,k] = gsort(nir,"g","i")
+ clear pr nir v
+ r = a.*.b
+ r = matrix(r(ir(k)), sa.*sb)
+endfunction
diff --git a/modules/overloading/macros/%hm_1_hm.bin b/modules/overloading/macros/%hm_1_hm.bin
new file mode 100755
index 000000000..aa2a26967
--- /dev/null
+++ b/modules/overloading/macros/%hm_1_hm.bin
Binary files differ
diff --git a/modules/overloading/macros/%hm_1_hm.sci b/modules/overloading/macros/%hm_1_hm.sci
new file mode 100755
index 000000000..876dc19f8
--- /dev/null
+++ b/modules/overloading/macros/%hm_1_hm.sci
@@ -0,0 +1,14 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+function M1=%hm_1_hm(M1,M2)
+ if and(M1.dims==M2.dims)==%f then
+ error(msprintf(_("%s: Input argument #%d and input argument #%d have incompatible dimensions.\n"),"%hm_1_hm",1,2));
+ end
+ M1.entries=(M1.entries<M2.entries)
+endfunction
diff --git a/modules/overloading/macros/%hm_1_s.bin b/modules/overloading/macros/%hm_1_s.bin
new file mode 100755
index 000000000..df2cebd85
--- /dev/null
+++ b/modules/overloading/macros/%hm_1_s.bin
Binary files differ
diff --git a/modules/overloading/macros/%hm_1_s.sci b/modules/overloading/macros/%hm_1_s.sci
new file mode 100755
index 000000000..42ee4ac14
--- /dev/null
+++ b/modules/overloading/macros/%hm_1_s.sci
@@ -0,0 +1,16 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function M=%hm_1_s(M,s)
+ //M<s
+ if size(s,"*")<> 1 then
+ error(msprintf(_("%s: Wrong type for input argument #%d: A scalar expected.\n"),"%hm_1_s",2));
+ end
+ M("entries")=M("entries")<s
+endfunction
diff --git a/modules/overloading/macros/%hm_2_hm.bin b/modules/overloading/macros/%hm_2_hm.bin
new file mode 100755
index 000000000..8753a7221
--- /dev/null
+++ b/modules/overloading/macros/%hm_2_hm.bin
Binary files differ
diff --git a/modules/overloading/macros/%hm_2_hm.sci b/modules/overloading/macros/%hm_2_hm.sci
new file mode 100755
index 000000000..e4ef8b288
--- /dev/null
+++ b/modules/overloading/macros/%hm_2_hm.sci
@@ -0,0 +1,15 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function M1=%hm_2_hm(M1,M2)
+ if and(M1.dims==M2.dims)==%f then
+ error(msprintf(_("%s: Input argument #%d and input argument #%d have incompatible dimensions.\n"),"%hm_2_hm",1,2));
+ end
+ M1.entries=(M1.entries>M2.entries)
+endfunction
diff --git a/modules/overloading/macros/%hm_2_s.bin b/modules/overloading/macros/%hm_2_s.bin
new file mode 100755
index 000000000..61657865d
--- /dev/null
+++ b/modules/overloading/macros/%hm_2_s.bin
Binary files differ
diff --git a/modules/overloading/macros/%hm_2_s.sci b/modules/overloading/macros/%hm_2_s.sci
new file mode 100755
index 000000000..b1e7a1f75
--- /dev/null
+++ b/modules/overloading/macros/%hm_2_s.sci
@@ -0,0 +1,15 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+function M=%hm_2_s(M,s)
+ //M>s
+ if size(s,"*")<> 1 then
+ error(msprintf(_("%s: Wrong type for input argument #%d: A scalar expected.\n"),"%hm_2_s",2));
+ end
+ M("entries")=M("entries")>s
+endfunction
diff --git a/modules/overloading/macros/%hm_3_hm.bin b/modules/overloading/macros/%hm_3_hm.bin
new file mode 100755
index 000000000..26d2d4559
--- /dev/null
+++ b/modules/overloading/macros/%hm_3_hm.bin
Binary files differ
diff --git a/modules/overloading/macros/%hm_3_hm.sci b/modules/overloading/macros/%hm_3_hm.sci
new file mode 100755
index 000000000..46b35b988
--- /dev/null
+++ b/modules/overloading/macros/%hm_3_hm.sci
@@ -0,0 +1,14 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+function M1=%hm_3_hm(M1,M2)
+ if and(M1.dims==M2.dims)==%f then
+ error(msprintf(_("%s: Input argument #%d and input argument #%d have incompatible dimensions.\n"),"%hm_3_hm",1,2));
+ end
+ M1.entries=(M1.entries>=M2.entries)
+endfunction
diff --git a/modules/overloading/macros/%hm_3_s.bin b/modules/overloading/macros/%hm_3_s.bin
new file mode 100755
index 000000000..0cb55494e
--- /dev/null
+++ b/modules/overloading/macros/%hm_3_s.bin
Binary files differ
diff --git a/modules/overloading/macros/%hm_3_s.sci b/modules/overloading/macros/%hm_3_s.sci
new file mode 100755
index 000000000..14499e330
--- /dev/null
+++ b/modules/overloading/macros/%hm_3_s.sci
@@ -0,0 +1,15 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+function M=%hm_3_s(M,s)
+ //M<=s
+ if size(s,"*")<> 1 then
+ error(msprintf(_("%s: Wrong type for input argument #%d: A scalar expected.\n"),"%hm_3_s",2));
+ end
+ M("entries")=M("entries")<=s
+endfunction
diff --git a/modules/overloading/macros/%hm_4_hm.bin b/modules/overloading/macros/%hm_4_hm.bin
new file mode 100755
index 000000000..80d34a669
--- /dev/null
+++ b/modules/overloading/macros/%hm_4_hm.bin
Binary files differ
diff --git a/modules/overloading/macros/%hm_4_hm.sci b/modules/overloading/macros/%hm_4_hm.sci
new file mode 100755
index 000000000..7d3e6032c
--- /dev/null
+++ b/modules/overloading/macros/%hm_4_hm.sci
@@ -0,0 +1,14 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+function M1=%hm_4_hm(M1,M2)
+ if and(M1.dims==M2.dims)==%f then
+ error(msprintf(_("%s: Input argument #%d and input argument #%d have incompatible dimensions.\n"),"%hm_4_hm",1,2));
+ end
+ M1.entries=(M1.entries<=M2.entries)
+endfunction
diff --git a/modules/overloading/macros/%hm_4_s.bin b/modules/overloading/macros/%hm_4_s.bin
new file mode 100755
index 000000000..36c9966c7
--- /dev/null
+++ b/modules/overloading/macros/%hm_4_s.bin
Binary files differ
diff --git a/modules/overloading/macros/%hm_4_s.sci b/modules/overloading/macros/%hm_4_s.sci
new file mode 100755
index 000000000..1ef73210f
--- /dev/null
+++ b/modules/overloading/macros/%hm_4_s.sci
@@ -0,0 +1,16 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+function M=%hm_4_s(M,s)
+
+ //M>=s
+ if size(s,"*")<> 1 then
+ error(msprintf(_("%s: Wrong type for input argument #%d: A scalar expected.\n"),"%hm_4_s",2));
+ end
+ M("entries")=M("entries")>=s
+endfunction
diff --git a/modules/overloading/macros/%hm_5.bin b/modules/overloading/macros/%hm_5.bin
new file mode 100755
index 000000000..70b45996b
--- /dev/null
+++ b/modules/overloading/macros/%hm_5.bin
Binary files differ
diff --git a/modules/overloading/macros/%hm_5.sci b/modules/overloading/macros/%hm_5.sci
new file mode 100755
index 000000000..5b693bceb
--- /dev/null
+++ b/modules/overloading/macros/%hm_5.sci
@@ -0,0 +1,11 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+function M=%hm_5(M)
+ M.entries=~(M.entries)
+endfunction
diff --git a/modules/overloading/macros/%hm_a_hm.bin b/modules/overloading/macros/%hm_a_hm.bin
new file mode 100755
index 000000000..8a230536b
--- /dev/null
+++ b/modules/overloading/macros/%hm_a_hm.bin
Binary files differ
diff --git a/modules/overloading/macros/%hm_a_hm.sci b/modules/overloading/macros/%hm_a_hm.sci
new file mode 100755
index 000000000..5d26fa48a
--- /dev/null
+++ b/modules/overloading/macros/%hm_a_hm.sci
@@ -0,0 +1,16 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function M1=%hm_a_hm(M1,M2)
+ // hypermatrix addition
+ if or(M1.dims<>M2.dims) then
+ error(8)
+ end
+ M1.entries=M1.entries+M2.entries
+endfunction
diff --git a/modules/overloading/macros/%hm_a_r.bin b/modules/overloading/macros/%hm_a_r.bin
new file mode 100755
index 000000000..9be36a78d
--- /dev/null
+++ b/modules/overloading/macros/%hm_a_r.bin
Binary files differ
diff --git a/modules/overloading/macros/%hm_a_r.sci b/modules/overloading/macros/%hm_a_r.sci
new file mode 100755
index 000000000..76e363162
--- /dev/null
+++ b/modules/overloading/macros/%hm_a_r.sci
@@ -0,0 +1,31 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+function f=%hm_a_r(m,f)
+ //f= m+f
+ //!
+
+ [num,den]=f(["num","den"])
+ szf=size(den)
+ szm=size(m)
+
+ if and(szf>=0)&and(szm>=0) then
+ num=num(:);den=den(:);m=m(:)
+ if prod(szf)==1&prod(szm)>1 then
+ den=den(ones(m))
+ end
+ [num,den]=simp(num+m.*den,den)
+ num=matrix(num,szf)
+ den=matrix(den,szf)
+ f=rlist(num,den,f.dt)
+ else
+ error(8)
+ end
+
+endfunction
+
diff --git a/modules/overloading/macros/%hm_a_s.bin b/modules/overloading/macros/%hm_a_s.bin
new file mode 100755
index 000000000..a1b12e003
--- /dev/null
+++ b/modules/overloading/macros/%hm_a_s.bin
Binary files differ
diff --git a/modules/overloading/macros/%hm_a_s.sci b/modules/overloading/macros/%hm_a_s.sci
new file mode 100755
index 000000000..d8c8e6760
--- /dev/null
+++ b/modules/overloading/macros/%hm_a_s.sci
@@ -0,0 +1,26 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function M1=%hm_a_s(M1,M2)
+
+ // hypermatrix + scalar
+
+ if and(size(M2)==[1 1]) then
+ M1.entries=M1.entries+M2
+ else
+ dims1=matrix(M1.dims,-1,1)
+ dims2=size(M2)';
+ dims2(3:size(dims1,"*"))=1;
+ if and(dims1==dims2) then //should not occur
+ M1.entries=M1.entries+matrix(M2,-1,1)
+ else
+ error(8)
+ end
+ end
+endfunction
diff --git a/modules/overloading/macros/%hm_abs.bin b/modules/overloading/macros/%hm_abs.bin
new file mode 100755
index 000000000..5f28df1db
--- /dev/null
+++ b/modules/overloading/macros/%hm_abs.bin
Binary files differ
diff --git a/modules/overloading/macros/%hm_abs.sci b/modules/overloading/macros/%hm_abs.sci
new file mode 100755
index 000000000..964bf39b3
--- /dev/null
+++ b/modules/overloading/macros/%hm_abs.sci
@@ -0,0 +1,13 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function M=%hm_abs(M)
+
+ M("entries")=abs(M("entries"))
+endfunction
diff --git a/modules/overloading/macros/%hm_and.bin b/modules/overloading/macros/%hm_and.bin
new file mode 100755
index 000000000..7b4545bb5
--- /dev/null
+++ b/modules/overloading/macros/%hm_and.bin
Binary files differ
diff --git a/modules/overloading/macros/%hm_and.sci b/modules/overloading/macros/%hm_and.sci
new file mode 100755
index 000000000..a08083b4a
--- /dev/null
+++ b/modules/overloading/macros/%hm_and.sci
@@ -0,0 +1,58 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2010 - INRIA - Serge Steer
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function x=%hm_and(m,d)
+ if argn(2)==1|d=="*" then
+ x=and(m.entries);
+ return
+ end
+ dims=m.dims;
+ if d=="m" then
+ d=find(dims>1,1)
+ if d==[] then
+ x=and(m.entries);
+ return
+ end
+ end
+ if type(dims)==8 then
+ flag=1;
+ dims=double(dims);
+ else
+ flag=0;
+ end
+ N=size(dims,"*");
+ p1=prod(dims(1:d-1));// step to build one vector on which and is applied
+ p2=p1*dims(d);//step for beginning of next vectors
+ ind=(0:p1:p2-1)';// selection for building one vector
+ deb=(1:p1);
+ I=ind*ones(deb)+ones(ind)*deb
+
+ ind=(0:p2:prod(dims)-1);
+ I=ones(ind).*.I+ind.*.ones(I)
+
+ x=and(matrix(m.entries(I),dims(d),-1),1);
+
+ dims(d)=1
+ while dims($)==1 then
+ dims($)=[];
+ end
+ if d==N then
+ dims=dims(1:$);
+ else
+ dims(d)=1;
+ end
+ if size(dims,"*")==2 then
+ x=matrix(x,dims(1),dims(2));
+ elseif dims<>[] then
+ if flag==1 then
+ dims=int32(dims);
+ end
+ x=hypermat(dims,x);
+ end
+endfunction
diff --git a/modules/overloading/macros/%hm_bool2s.bin b/modules/overloading/macros/%hm_bool2s.bin
new file mode 100755
index 000000000..69740b439
--- /dev/null
+++ b/modules/overloading/macros/%hm_bool2s.bin
Binary files differ
diff --git a/modules/overloading/macros/%hm_bool2s.sci b/modules/overloading/macros/%hm_bool2s.sci
new file mode 100755
index 000000000..81538a478
--- /dev/null
+++ b/modules/overloading/macros/%hm_bool2s.sci
@@ -0,0 +1,12 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function Ms=%hm_bool2s(Mb)
+ Ms=hypermat(Mb.dims,bool2s(Mb.entries))
+endfunction
diff --git a/modules/overloading/macros/%hm_c_hm.bin b/modules/overloading/macros/%hm_c_hm.bin
new file mode 100755
index 000000000..9357e3a96
--- /dev/null
+++ b/modules/overloading/macros/%hm_c_hm.bin
Binary files differ
diff --git a/modules/overloading/macros/%hm_c_hm.sci b/modules/overloading/macros/%hm_c_hm.sci
new file mode 100755
index 000000000..a708f37b3
--- /dev/null
+++ b/modules/overloading/macros/%hm_c_hm.sci
@@ -0,0 +1,27 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function M1=%hm_c_hm(M1,M2)
+
+ d1=M1.dims;
+ d2=M2.dims;
+ if size(d1,"*")<>size(d2,"*") then
+ error(msprintf(_("%s: In concatenation the number of dimensions for each component must match.\n"),"%hm_c_hm"));
+ end
+
+ kd=find(d1<>d2)
+ kd(find(kd==2))=[]
+ if kd<>[] then
+ error(msprintf(_("%s: Inconsistent dimensions.\n"),"%hm_c_hm"));
+ end
+
+ M1.entries=matrix([matrix(M1.entries,double(d1(1)*d1(2)),-1);...
+ matrix(M2.entries,double(d2(1)*d2(2)),-1)] ,-1,1)
+ M1.dims(2)=d1(2)+d2(2)
+endfunction
diff --git a/modules/overloading/macros/%hm_ceil.bin b/modules/overloading/macros/%hm_ceil.bin
new file mode 100755
index 000000000..e87f54603
--- /dev/null
+++ b/modules/overloading/macros/%hm_ceil.bin
Binary files differ
diff --git a/modules/overloading/macros/%hm_ceil.sci b/modules/overloading/macros/%hm_ceil.sci
new file mode 100755
index 000000000..0055c9e8c
--- /dev/null
+++ b/modules/overloading/macros/%hm_ceil.sci
@@ -0,0 +1,13 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function M=%hm_ceil(M)
+
+ M("entries")=ceil(M("entries"))
+endfunction
diff --git a/modules/overloading/macros/%hm_conj.bin b/modules/overloading/macros/%hm_conj.bin
new file mode 100755
index 000000000..4c06aa121
--- /dev/null
+++ b/modules/overloading/macros/%hm_conj.bin
Binary files differ
diff --git a/modules/overloading/macros/%hm_conj.sci b/modules/overloading/macros/%hm_conj.sci
new file mode 100755
index 000000000..1f21b0fa4
--- /dev/null
+++ b/modules/overloading/macros/%hm_conj.sci
@@ -0,0 +1,13 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function M=%hm_conj(M)
+
+ M("entries")=conj(M("entries"))
+endfunction
diff --git a/modules/overloading/macros/%hm_cos.bin b/modules/overloading/macros/%hm_cos.bin
new file mode 100755
index 000000000..3e726a54d
--- /dev/null
+++ b/modules/overloading/macros/%hm_cos.bin
Binary files differ
diff --git a/modules/overloading/macros/%hm_cos.sci b/modules/overloading/macros/%hm_cos.sci
new file mode 100755
index 000000000..e492c9405
--- /dev/null
+++ b/modules/overloading/macros/%hm_cos.sci
@@ -0,0 +1,13 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function M=%hm_cos(M)
+
+ M("entries")=cos(M("entries"))
+endfunction
diff --git a/modules/overloading/macros/%hm_cumprod.bin b/modules/overloading/macros/%hm_cumprod.bin
new file mode 100755
index 000000000..b363aa9fb
--- /dev/null
+++ b/modules/overloading/macros/%hm_cumprod.bin
Binary files differ
diff --git a/modules/overloading/macros/%hm_cumprod.sci b/modules/overloading/macros/%hm_cumprod.sci
new file mode 100755
index 000000000..a0170c97c
--- /dev/null
+++ b/modules/overloading/macros/%hm_cumprod.sci
@@ -0,0 +1,97 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function a = %hm_cumprod(varargin)
+ a = varargin(1)
+ dims = size(a);
+ tm = type(a.entries)
+
+ nargs = size(varargin);
+ select nargs
+ case 1
+ d = 0;
+ if tm == 8 then
+ typ = "native";
+ else
+ typ = "double";
+ end
+ case 2
+ if or(varargin(2) == ["native", "double"]) then
+ d = 0;
+ typ = varargin(2);
+ else
+ d = varargin(2);
+ if tm == 8 then
+ typ = "native";
+ else
+ typ = "double";
+ end
+ end
+ case 3
+ d = varargin(2);
+ typ = varargin(3);
+ else
+ error(msprintf(_("%s: Wrong number of input argument(s): %d to %d expected.\n"),"cumprod", 1, 3));
+ end
+
+ // Check second argument : d
+ select type(d)
+ case 1
+ if size(d,'*') <> 1 then
+ error(msprintf(_("%s: Wrong size for input argument #%d: A scalar expected.\n"),"cumprod", 2))
+ end
+ if int(d) <> d | d < 0 then
+ error(msprintf(_("%s: Wrong value for input argument #%d: Integer >= %d expected.\n"),"cumprod", 2, 1))
+ end
+ case 10
+ if size(d,'*') <> 1 then
+ error(msprintf(_("%s: Wrong size for input argument #%d: A string expected.\n"),"cumprod",2))
+ end
+ if and(d<>["r","c","*","m"]) then
+ error(msprintf(_("%s: Wrong value for input argument #%d: Must be in the set {%s}.\n"),..
+ "cumprod",2,"""*"",""r"",""c"",""m"""))
+ end
+ pos=[1,2,0,find(dims>1,1)];
+ d=pos(find(d==["r","c","*","m"]))
+ else
+ error(msprintf(_("%s: Wrong type for input argument #%d: A string or scalar expected.\n"),"cumprod",2))
+ end
+
+ // Check third argument
+ if type(typ)<>10 then
+ error(msprintf(_("%s: Wrong type for input argument #%d: A string expected.\n"),"cumprod",3))
+ end
+
+ if size(typ,"*")<>1 then
+ error(msprintf(_("%s: Wrong size for input argument #%d: A string expected.\n"),"cumprod",3))
+ end
+
+ if and(typ <> ["native" "double"]) then
+ error(msprintf(_("%s: Wrong value for input argument #%d: ""%s"" or ""%s"" expected.\n"),"cumprod", 3, "native", "double"));
+ end
+
+ if d == 0 then // '*'
+ a=matrix(cumprod(a.entries, "*", typ), dims);
+ elseif d > size(dims,"*") then
+ //requested summation direction exceeds array dims, return the array, converted
+ //to double if necessary.
+ if typ == "double" & or(tm == [4 8]) then
+ a.entries=double(a.entries),
+ end
+ a=a
+ else
+ //permute the array dimension to put the selected dimension first
+ p=1:size(dims,"*");
+ p([1,d])=p([d,1]);
+ a=matrix(permute(a,p),dims(d),-1)
+ a=cumprod(a,1,typ);
+ //permute back
+ a=permute(matrix(a,dims(p)),p)
+ end
+endfunction
diff --git a/modules/overloading/macros/%hm_cumsum.bin b/modules/overloading/macros/%hm_cumsum.bin
new file mode 100755
index 000000000..221114149
--- /dev/null
+++ b/modules/overloading/macros/%hm_cumsum.bin
Binary files differ
diff --git a/modules/overloading/macros/%hm_cumsum.sci b/modules/overloading/macros/%hm_cumsum.sci
new file mode 100755
index 000000000..ddc411fbc
--- /dev/null
+++ b/modules/overloading/macros/%hm_cumsum.sci
@@ -0,0 +1,110 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function a = %hm_cumsum(varargin)
+ a = varargin(1)
+ dims = size(a);
+ tm = type(a.entries)
+
+ nargs = size(varargin);
+ select nargs
+ case 1
+ d = 0;
+ if tm == 8 then
+ typ = "native";
+ else
+ typ = "double";
+ end
+ case 2
+ if or(varargin(2) == ["native", "double"]) then
+ d = 0;
+ typ = varargin(2);
+ else
+ d = varargin(2);
+ if tm == 8 then
+ typ = "native";
+ else
+ typ = "double";
+ end
+ end
+ case 3
+ d = varargin(2);
+ typ = varargin(3);
+ else
+ error(msprintf(_("%s: Wrong number of input argument(s): %d to %d expected.\n"),"cumsum", 1, 3));
+ end
+
+ // Check second argument : d
+ select type(d)
+ case 1
+ if size(d,'*') <> 1 then
+ error(msprintf(_("%s: Wrong size for input argument #%d: A scalar expected.\n"),"cumsum", 2))
+ end
+ if int(d) <> d | d < 0 then
+ error(msprintf(_("%s: Wrong value for input argument #%d: Integer >= %d expected.\n"),"cumsum", 2, 1))
+ end
+ case 10
+ if size(d,'*') <> 1 then
+ error(msprintf(_("%s: Wrong size for input argument #%d: A string expected.\n"),"cumsum",2))
+ end
+ if and(d<>["r","c","*","m"]) then
+ error(msprintf(_("%s: Wrong value for input argument #%d: Must be in the set {%s}.\n"),..
+ "cumsum",2,"""*"",""r"",""c"",""m"""))
+ end
+ pos=[1,2,0,find(dims>1,1)];
+ d=pos(find(d==["r","c","*","m"]))
+ else
+ error(msprintf(_("%s: Wrong type for input argument #%d: A string or scalar expected.\n"),"cumsum",2))
+ end
+
+ // Check third argument
+ if type(typ)<>10 then
+ error(msprintf(_("%s: Wrong type for input argument #%d: A string expected.\n"),"cumsum",3))
+ end
+
+ if size(typ,"*")<>1 then
+ error(msprintf(_("%s: Wrong size for input argument #%d: A string expected.\n"),"cumsum",3))
+ end
+
+ if and(typ <> ["native" "double"]) then
+ error(msprintf(_("%s: Wrong value for input argument #%d: ""%s"" or ""%s"" expected.\n"),"cumsum", 3, "native", "double"));
+ end
+
+ if d == 0 then // '*'
+ a=matrix(cumsum(a.entries, "*", typ), dims);
+ elseif d > size(dims,"*") then
+ //requested summation direction exceeds array dims, return the array, converted
+ //to double if necessary.
+ if typ == "double" & or(tm == [4 8]) then
+ a.entries=double(a.entries),
+ end
+ a=a
+ else
+ //permute the array dimension to put the selected dimension first
+ p=1:size(dims,"*");
+ p([1,d])=p([d,1]);
+ a=matrix(permute(a,p),dims(d),-1)
+ a=cumsum(a,1,typ);
+ //permute back
+ a=permute(matrix(a,dims(p)),p)
+// N=size(dims,"*");
+// p1=prod(dims(1:d-1));//summation step
+// p2=p1*dims(d);//step for next to sum
+// ind=(0:p1:p2-1);// selection for summation
+// deb=(1:p1)';
+// I=deb*ones(ind)+ones(deb)*ind
+//
+//
+// ind=(0:p2:prod(dims)-1)';
+// I=ones(ind).*.I+ind.*.ones(I)
+// a=cumsum(matrix(a.entries(I),-1,dims(d)),2,typ)
+// a(I)=matrix(a,-1,1)
+// a=hypermat(dims,a)
+ end
+endfunction
diff --git a/modules/overloading/macros/%hm_d_hm.bin b/modules/overloading/macros/%hm_d_hm.bin
new file mode 100755
index 000000000..a0df16760
--- /dev/null
+++ b/modules/overloading/macros/%hm_d_hm.bin
Binary files differ
diff --git a/modules/overloading/macros/%hm_d_hm.sci b/modules/overloading/macros/%hm_d_hm.sci
new file mode 100755
index 000000000..2d43f9506
--- /dev/null
+++ b/modules/overloading/macros/%hm_d_hm.sci
@@ -0,0 +1,17 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function M2=%hm_d_hm(M1,M2)
+
+ if and(M1("dims")==M2("dims")) then
+ M2("entries")=M1("entries")./M2("entries")
+ else
+ error(msprintf(_("%s: Inconsistent element-wise operation.\n"),"%hm_d_hm"));
+ end
+endfunction
diff --git a/modules/overloading/macros/%hm_d_s.bin b/modules/overloading/macros/%hm_d_s.bin
new file mode 100755
index 000000000..d0007bf85
--- /dev/null
+++ b/modules/overloading/macros/%hm_d_s.bin
Binary files differ
diff --git a/modules/overloading/macros/%hm_d_s.sci b/modules/overloading/macros/%hm_d_s.sci
new file mode 100755
index 000000000..c3f115b3c
--- /dev/null
+++ b/modules/overloading/macros/%hm_d_s.sci
@@ -0,0 +1,17 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function M1=%hm_d_s(M1,M2)
+
+ if size(M2,"*")<>1 then
+ error(msprintf(_("%s: Inconsistent element-wise operation.\n"),"%hm_d_s"));
+ else
+ M1("entries")=M1("entries")./M2
+ end
+endfunction
diff --git a/modules/overloading/macros/%hm_degree.bin b/modules/overloading/macros/%hm_degree.bin
new file mode 100755
index 000000000..c9ffdaf55
--- /dev/null
+++ b/modules/overloading/macros/%hm_degree.bin
Binary files differ
diff --git a/modules/overloading/macros/%hm_degree.sci b/modules/overloading/macros/%hm_degree.sci
new file mode 100755
index 000000000..782ac47bc
--- /dev/null
+++ b/modules/overloading/macros/%hm_degree.sci
@@ -0,0 +1,12 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function P=%hm_degree(P)
+ P("entries")=degree(P("entries"))
+endfunction
diff --git a/modules/overloading/macros/%hm_dsearch.bin b/modules/overloading/macros/%hm_dsearch.bin
new file mode 100755
index 000000000..637b6750e
--- /dev/null
+++ b/modules/overloading/macros/%hm_dsearch.bin
Binary files differ
diff --git a/modules/overloading/macros/%hm_dsearch.sci b/modules/overloading/macros/%hm_dsearch.sci
new file mode 100755
index 000000000..621cbe01b
--- /dev/null
+++ b/modules/overloading/macros/%hm_dsearch.sci
@@ -0,0 +1,17 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2013 - Samuel Gougeon
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+
+function [ind, occ, info] = %hm_dsearch(H, r, flag)
+ if argn(2)<3 then
+ flag = "c";
+ end
+ [ind, occ, info] = dsearch(H(:), r, flag)
+ ind = matrix(ind, size(H))
+endfunction
diff --git a/modules/overloading/macros/%hm_e.bin b/modules/overloading/macros/%hm_e.bin
new file mode 100755
index 000000000..4a0ed1dd2
--- /dev/null
+++ b/modules/overloading/macros/%hm_e.bin
Binary files differ
diff --git a/modules/overloading/macros/%hm_e.sci b/modules/overloading/macros/%hm_e.sci
new file mode 100755
index 000000000..4b8663b99
--- /dev/null
+++ b/modules/overloading/macros/%hm_e.sci
@@ -0,0 +1,96 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function [M] = %hm_e(varargin)
+
+ // version modified by Bruno
+ // extract an sub_hypermatrix
+ [lhs,rhs]=argn(0)
+ M=varargin(rhs)
+ dims=double(M.dims) // new hypermatrices have an int32 dims field
+ nbdims = size(dims,"*");
+ nb_index_vect = rhs-1;
+
+ if nb_index_vect > nbdims then
+ error(msprintf(_("%s: Too many subscripts.\n"),"%hm_e"));
+ elseif nb_index_vect < nbdims then
+ nbdims = nb_index_vect;
+ dims(nbdims) = prod(dims(nbdims:$))
+ end
+
+ I = 0
+ dims1 = [];
+
+ for k=nb_index_vect:-1:1
+ ik=varargin(k)
+ type_ik = type(ik)
+ if type_ik==1 then // usual subscript
+ if min(size(ik))<0 then
+ if rhs==2 then // subscript is : in fact
+ M=matrix(M.entries,-1,1)
+ return
+ end
+ ik=1:dims(k)
+ else
+ ik=round(ik)
+ if min(ik) <= 0 then, error(21), end
+ if max(ik) > dims(k) then, error(21), end
+ end
+ elseif type_ik==2 then // poly subscript
+ ik=round(horner(ik,dims(k)))
+ if min(ik) <= 0 then, error(21), end
+ if max(ik) > dims(k) then, error(21), end
+ elseif type_ik == 129 then // implicit poly subscript (p.e. 1:$)
+ ik=round(horner(ik(:),dims(k)))
+ if min(ik(1),ik(3)) <= 0 then, error(21), end
+ if max(ik(1),ik(3)) > dims(k) then, error(21), end
+ ik = ik(1):ik(2):ik(3)
+ elseif type_ik==4 | type_ik==6 then // boolean and sparse boolean subscript
+ if size(ik,"*") ~= dims(k) then, error(21), end
+ ik=find(ik)
+ elseif typeof(ik) == "hypermat" then // hm boolean subscript
+ if type(ik.entries) ~= 4 then, error(21), end
+ if size(ik,"*") ~= dims(k) then, error(21), end
+ ik=find(ik.entries)
+ else
+ error(21)
+ end
+
+ nik = size(ik, "*");
+ if (nik == 0) then, M=[], return, end
+ dims1 = [nik, dims1]
+ if nik > 1 then
+ ik=ik(:)
+ if size(I,"*") > 1 then
+ I=(dims(k)*I).*.ones(ik)+ones(I).*.(ik-1)
+ else
+ I=dims(k)*I+ik-1
+ end
+ else
+ I=dims(k)*I+ik-1
+ end
+ end
+ //
+ dims1(max(find(dims1>1))+1:$)=[] // elimine la fin si les dims sont 1
+ // exemple dims1 = [2 4 1 6 7 1 1] alors on obtient dims1 = [2 4 1 6 7]
+ // (pour compatibilite avec Matlab)
+
+ select size(dims1,"*")
+ case 0
+ M = M.entries(I+1)
+ case 1
+ M = M.entries(I+1)
+ case 2
+ M = matrix(M.entries(I+1),dims1(1),dims1(2))
+ else
+ M = mlist(["hm","dims","entries"],int32(dims1),M.entries(I+1))
+ end
+
+endfunction
+
diff --git a/modules/overloading/macros/%hm_exp.bin b/modules/overloading/macros/%hm_exp.bin
new file mode 100755
index 000000000..b69067199
--- /dev/null
+++ b/modules/overloading/macros/%hm_exp.bin
Binary files differ
diff --git a/modules/overloading/macros/%hm_exp.sci b/modules/overloading/macros/%hm_exp.sci
new file mode 100755
index 000000000..910651f1e
--- /dev/null
+++ b/modules/overloading/macros/%hm_exp.sci
@@ -0,0 +1,12 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function M=%hm_exp(M)
+ M("entries")=exp(M("entries"))
+endfunction
diff --git a/modules/overloading/macros/%hm_eye.bin b/modules/overloading/macros/%hm_eye.bin
new file mode 100755
index 000000000..ca847a014
--- /dev/null
+++ b/modules/overloading/macros/%hm_eye.bin
Binary files differ
diff --git a/modules/overloading/macros/%hm_eye.sci b/modules/overloading/macros/%hm_eye.sci
new file mode 100755
index 000000000..21cec6491
--- /dev/null
+++ b/modules/overloading/macros/%hm_eye.sci
@@ -0,0 +1,22 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2013 - Scilab Enterprises - Charlotte HECQUET
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function M=%hm_eye(varargin)
+
+ if size(varargin) <> 1 then
+ error(msprintf(_("%s: Wrong number of input argument: %d to %d expected.\n"), "eye", 1, 2));
+ end
+ if typeof(varargin(1)) <> "hypermat" then
+ error(msprintf(_("%s: Wrong type for input argument #%d: Hypermatrix expected.\n"), "eye", 1));
+ end
+
+ M = zeros(varargin(1));
+ M(sub2ind(size(varargin(1)), (1:min(size(varargin(1))))' .*. ones(1,ndims(varargin(1))))) = 1;
+
+endfunction
diff --git a/modules/overloading/macros/%hm_f_hm.bin b/modules/overloading/macros/%hm_f_hm.bin
new file mode 100755
index 000000000..c32ec03c5
--- /dev/null
+++ b/modules/overloading/macros/%hm_f_hm.bin
Binary files differ
diff --git a/modules/overloading/macros/%hm_f_hm.sci b/modules/overloading/macros/%hm_f_hm.sci
new file mode 100755
index 000000000..86fc5f3c8
--- /dev/null
+++ b/modules/overloading/macros/%hm_f_hm.sci
@@ -0,0 +1,27 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function M1=%hm_f_hm(M1,M2)
+
+ d1=M1.dims;
+ d2=M2.dims;
+ if size(d1,"*")<>size(d2,"*") then
+ error(msprintf(_("%s: In concatenation the number of dimensions for each component must match.\n"),"%hm_f_hm"));
+ end
+
+
+ kd=find(d1(2:$)<>d2(2:$))
+ if kd<>[] then
+ error(msprintf(_("%s: Inconsistent dimensions.\n"),"%hm_f_hm"));
+ end
+
+ M1.entries=matrix([matrix(M1.entries,double(d1(1)),-1);
+ matrix(M2.entries,double(d2(1)),-1)],-1,1)
+ M1.dims(1)=d1(1)+d2(1);
+endfunction
diff --git a/modules/overloading/macros/%hm_find.bin b/modules/overloading/macros/%hm_find.bin
new file mode 100755
index 000000000..a28fb120f
--- /dev/null
+++ b/modules/overloading/macros/%hm_find.bin
Binary files differ
diff --git a/modules/overloading/macros/%hm_find.sci b/modules/overloading/macros/%hm_find.sci
new file mode 100755
index 000000000..456e7bcf4
--- /dev/null
+++ b/modules/overloading/macros/%hm_find.sci
@@ -0,0 +1,33 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) -2011 - INRIA - Serge Steer
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function varargout=%hm_find(Mb,nmax)
+ lhs=argn(1)
+ if argn(2)==2 then
+ I=find(Mb.entries,nmax)
+ else
+ I=find(Mb.entries)
+ end
+ if lhs==1 then
+ varargout=list(I)
+ else
+ dims=size(Mb);
+ nd=size(dims,"*")
+ if nd>lhs then
+ dims=[dims(1:lhs-1) prod(dims(lhs:$))]
+ else
+ dims(nd+1:lhs)=1;
+ end
+ varargout=list()
+ I=ind2sub(dims,I)
+ for k=1:size(I,2)
+ varargout(k)=I(:,k)'
+ end
+ end
+endfunction
diff --git a/modules/overloading/macros/%hm_floor.bin b/modules/overloading/macros/%hm_floor.bin
new file mode 100755
index 000000000..77fef8ffc
--- /dev/null
+++ b/modules/overloading/macros/%hm_floor.bin
Binary files differ
diff --git a/modules/overloading/macros/%hm_floor.sci b/modules/overloading/macros/%hm_floor.sci
new file mode 100755
index 000000000..766ecc29e
--- /dev/null
+++ b/modules/overloading/macros/%hm_floor.sci
@@ -0,0 +1,13 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function M=%hm_floor(M)
+
+ M("entries")=floor(M("entries"))
+endfunction
diff --git a/modules/overloading/macros/%hm_g_hm.bin b/modules/overloading/macros/%hm_g_hm.bin
new file mode 100755
index 000000000..768c26305
--- /dev/null
+++ b/modules/overloading/macros/%hm_g_hm.bin
Binary files differ
diff --git a/modules/overloading/macros/%hm_g_hm.sci b/modules/overloading/macros/%hm_g_hm.sci
new file mode 100755
index 000000000..90bec7041
--- /dev/null
+++ b/modules/overloading/macros/%hm_g_hm.sci
@@ -0,0 +1,27 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) Bruno Pincon
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function r=%hm_g_hm(a,b)
+ // define the operation a | b for boolean hypermatrices a and b
+ // a | b is defined if a and b are boolean hypermatrices
+ // and if a and b have the same dimensions
+ // or if one have only one element
+ if type(a.entries) ~= 4 | type(b.entries) ~= 4 then
+ error(msprintf(_("%s: Operand is not a boolean hypermatrix.\n"),"%hm_g_hm"));
+ end
+ if and(a.dims==b.dims) then
+ r=hypermat(a.dims,a.entries | b.entries)
+ elseif prod(a.dims) == 1 then
+ r=hypermat(b.dims,a.entries | b.entries)
+ elseif prod(b.dims) == 1 then
+ r=hypermat(a.dims,a.entries | b.entries)
+ else
+ error(msprintf(_("%s: Incompatible operand dimensions.\n"),"%hm_g_hm"));
+ end
+endfunction
diff --git a/modules/overloading/macros/%hm_h_hm.bin b/modules/overloading/macros/%hm_h_hm.bin
new file mode 100755
index 000000000..8710e4437
--- /dev/null
+++ b/modules/overloading/macros/%hm_h_hm.bin
Binary files differ
diff --git a/modules/overloading/macros/%hm_h_hm.sci b/modules/overloading/macros/%hm_h_hm.sci
new file mode 100755
index 000000000..41bcf0361
--- /dev/null
+++ b/modules/overloading/macros/%hm_h_hm.sci
@@ -0,0 +1,28 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) Bruno Pincon
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+
+function r=%hm_h_hm(a,b)
+ // define the operation a & b for boolean hypermatrices a and b
+ // a & b is defined if a and b are boolean hypermatrices
+ // and if a and b have the same dimensions
+ // or if one have only one element
+ if type(a.entries) ~= 4 | type(b.entries) ~= 4 then
+ error(msprintf(_("%s: Wrong type for input argument(s): hypermatrix expected.\n"),"%hm_h_hm"));
+ end
+ if and(a.dims==b.dims) then
+ r=hypermat(a.dims,a.entries & b.entries)
+ elseif prod(a.dims) == 1 then
+ r=hypermat(b.dims,a.entries & b.entries)
+ elseif prod(b.dims) == 1 then
+ r=hypermat(a.dims,a.entries & b.entries)
+ else
+ error(msprintf(_("%s: Incompatible operand dimensions.\n"),"%hm_h_hm"));
+ end
+endfunction
diff --git a/modules/overloading/macros/%hm_i_b.bin b/modules/overloading/macros/%hm_i_b.bin
new file mode 100755
index 000000000..45b3012d3
--- /dev/null
+++ b/modules/overloading/macros/%hm_i_b.bin
Binary files differ
diff --git a/modules/overloading/macros/%hm_i_b.sci b/modules/overloading/macros/%hm_i_b.sci
new file mode 100755
index 000000000..d6558b62d
--- /dev/null
+++ b/modules/overloading/macros/%hm_i_b.sci
@@ -0,0 +1,72 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+
+function M=%hm_i_b(varargin)
+ //insertion of an hypermatrix in a matrix derived from %hm_i_hm
+ [lhs,rhs]=argn(0)
+ M=varargin(rhs) //Matrix
+ N=varargin(rhs-1)//inserted hypermatrix
+ dims=size(M)'
+
+ v=M(:)
+
+
+ nd=size(dims,"*")
+ if rhs-2>nd then dims(nd+1:rhs-2)=1;end
+
+ //convert N-dimensional indexes to 1-D
+ [Ndims,I]=convertindex(list(dims,double(matrix(N.dims,1,-1))),varargin(1:$-2))
+
+ if or(Ndims>dims) then
+ //extend the destination matrix
+ I1=0
+ for k=size(Ndims,"*"):-1:1
+ ik1=(1:dims(k))'
+ if ik1<>[] then
+ if Ndims(k)>1 then
+ if size(I1,"*")>1 then
+ I1=(Ndims(k)*I1).*.ones(ik1)+ones(I1).*.(ik1-1)
+ else
+ I1=Ndims(k)*I1+ik1-1
+ end
+ else
+ I1=Ndims(k)*I1+ik1-1
+ end
+ end
+ end
+ select type(v)
+ case 1
+ v1=zeros(prod(Ndims),1)
+ case 2 then
+ v1=zeros(prod(Ndims),1)
+ case 4 then
+ v1=(zeros(prod(Ndims),1)==1)
+ case 8 then
+ v1=iconvert(zeros(prod(Ndims),1),inttype(v))
+ case 10 then
+ v1=emptystr(prod(Ndims),1)
+ end
+ v1(I1+1)=v;v=v1
+ end
+
+ v(I)=matrix(N.entries,-1,1)
+
+ while Ndims($)==1 then Ndims($)=[],end
+ select size(Ndims,"*")
+ case 0
+ M=v
+ case 1
+ M=v
+ case 2
+ M=matrix(v,Ndims(1),Ndims(2))
+ else
+ M=mlist(["hm","dims","entries"],matrix(Ndims,1,-1),v)
+ end
+endfunction
diff --git a/modules/overloading/macros/%hm_i_ce.bin b/modules/overloading/macros/%hm_i_ce.bin
new file mode 100755
index 000000000..54ca2f6a1
--- /dev/null
+++ b/modules/overloading/macros/%hm_i_ce.bin
Binary files differ
diff --git a/modules/overloading/macros/%hm_i_ce.sci b/modules/overloading/macros/%hm_i_ce.sci
new file mode 100755
index 000000000..1208ef47b
--- /dev/null
+++ b/modules/overloading/macros/%hm_i_ce.sci
@@ -0,0 +1,13 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA - Vincent Couvert
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function M=%hm_i_ce(varargin)
+ // Insertion of a hypermatrix in a cell
+ M=generic_i_ce(varargin(:))
+endfunction
diff --git a/modules/overloading/macros/%hm_i_h.bin b/modules/overloading/macros/%hm_i_h.bin
new file mode 100755
index 000000000..a543a2b69
--- /dev/null
+++ b/modules/overloading/macros/%hm_i_h.bin
Binary files differ
diff --git a/modules/overloading/macros/%hm_i_h.sci b/modules/overloading/macros/%hm_i_h.sci
new file mode 100755
index 000000000..ebb12ebe1
--- /dev/null
+++ b/modules/overloading/macros/%hm_i_h.sci
@@ -0,0 +1,12 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function h=%hm_i_h(i,v,h)
+ h=generic_i_h(i,v,h)
+endfunction
diff --git a/modules/overloading/macros/%hm_i_hm.bin b/modules/overloading/macros/%hm_i_hm.bin
new file mode 100755
index 000000000..83c782f74
--- /dev/null
+++ b/modules/overloading/macros/%hm_i_hm.bin
Binary files differ
diff --git a/modules/overloading/macros/%hm_i_hm.sci b/modules/overloading/macros/%hm_i_hm.sci
new file mode 100755
index 000000000..a589561ca
--- /dev/null
+++ b/modules/overloading/macros/%hm_i_hm.sci
@@ -0,0 +1,72 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA - Vincent Couvert
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function M=%hm_i_hm(varargin)
+
+ //insertion of a matrix in an hypermatrix
+ [lhs,rhs]=argn(0)
+ M=varargin(rhs)
+ N=varargin(rhs-1)//inserted matrix
+ dims=matrix(double(M.dims),-1,1);
+
+ v=matrix(M.entries,-1,1);
+
+
+ nd=size(dims,"*")
+ if rhs-2>nd then dims(nd+1:rhs-2)=1;end
+
+ //convert N-dimensional indexes to 1-D
+ [Ndims,I]=convertindex(list(dims,double(matrix(N.dims,1,-1))),varargin(1:$-2))
+
+ if or(Ndims>dims) then
+ //extend the destination matrix
+ I1=0
+ for k=size(Ndims,"*"):-1:1
+ ik1=(1:dims(k))'
+ if ik1<>[] then
+ if Ndims(k)>1 then
+ if size(I1,"*")>1 then
+ I1=(Ndims(k)*I1).*.ones(ik1)+ones(I1).*.(ik1-1)
+ else
+ I1=Ndims(k)*I1+ik1-1
+ end
+ else
+ I1=Ndims(k)*I1+ik1-1
+ end
+ end
+ end
+ select type(v)
+ case 1
+ v1=zeros(prod(Ndims),1)
+ case 2 then
+ v1=zeros(prod(Ndims),1)
+ case 4 then
+ v1=(zeros(prod(Ndims),1)==1)
+ case 8 then
+ v1=iconvert(zeros(prod(Ndims),1),inttype(v))
+ case 10 then
+ v1=emptystr(prod(Ndims),1)
+ end
+ v1(I1+1)=v;v=v1
+ end
+
+ v(I)=matrix(N.entries,-1,1)
+
+ while Ndims($)==1 then Ndims($)=[],end
+ select size(Ndims,"*")
+ case 0
+ M=v
+ case 1
+ M=v
+ case 2
+ M=matrix(v,Ndims(1),Ndims(2))
+ else
+ M=mlist(["hm","dims","entries"],int32(matrix(Ndims,1,-1)),v)
+ end
+endfunction
diff --git a/modules/overloading/macros/%hm_i_i.bin b/modules/overloading/macros/%hm_i_i.bin
new file mode 100755
index 000000000..4afb1f969
--- /dev/null
+++ b/modules/overloading/macros/%hm_i_i.bin
Binary files differ
diff --git a/modules/overloading/macros/%hm_i_i.sci b/modules/overloading/macros/%hm_i_i.sci
new file mode 100755
index 000000000..b896a3b8c
--- /dev/null
+++ b/modules/overloading/macros/%hm_i_i.sci
@@ -0,0 +1,71 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA - Vincent Couvert
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function M=%hm_i_i(varargin)
+ //insertion of an hypermatrix in a matrix derived from %hm_i_hm
+ [lhs,rhs]=argn(0)
+ M=varargin(rhs) //Matrix
+ N=varargin(rhs-1)//inserted hypermatrix
+ dims=size(M)'
+
+ v=M(:)
+
+
+ nd=size(dims,"*")
+ if rhs-2>nd then dims(nd+1:rhs-2)=1;end
+
+ //convert N-dimensional indexes to 1-D
+ [Ndims,I]=convertindex(list(dims,double(matrix(N.dims,1,-1))),varargin(1:$-2))
+
+ if or(Ndims>dims) then
+ //extend the destination matrix
+ I1=0
+ for k=size(Ndims,"*"):-1:1
+ ik1=(1:dims(k))'
+ if ik1<>[] then
+ if Ndims(k)>1 then
+ if size(I1,"*")>1 then
+ I1=(Ndims(k)*I1).*.ones(ik1)+ones(I1).*.(ik1-1)
+ else
+ I1=Ndims(k)*I1+ik1-1
+ end
+ else
+ I1=Ndims(k)*I1+ik1-1
+ end
+ end
+ end
+ select type(v)
+ case 1
+ v1=zeros(prod(Ndims),1)
+ case 2 then
+ v1=zeros(prod(Ndims),1)
+ case 4 then
+ v1=(zeros(prod(Ndims),1)==1)
+ case 8 then
+ v1=iconvert(zeros(prod(Ndims),1),inttype(v))
+ case 10 then
+ v1=emptystr(prod(Ndims),1)
+ end
+ v1(I1+1)=v;v=v1
+ end
+
+ v(I)=matrix(N.entries,-1,1)
+
+ while Ndims($)==1 then Ndims($)=[],end
+ select size(Ndims,"*")
+ case 0
+ M=v
+ case 1
+ M=v
+ case 2
+ M=matrix(v,Ndims(1),Ndims(2))
+ else
+ M=mlist(["hm","dims","entries"],int32(matrix(Ndims,1,-1)),v)
+ end
+endfunction
diff --git a/modules/overloading/macros/%hm_i_p.bin b/modules/overloading/macros/%hm_i_p.bin
new file mode 100755
index 000000000..5c2d2b1bd
--- /dev/null
+++ b/modules/overloading/macros/%hm_i_p.bin
Binary files differ
diff --git a/modules/overloading/macros/%hm_i_p.sci b/modules/overloading/macros/%hm_i_p.sci
new file mode 100755
index 000000000..758a8e140
--- /dev/null
+++ b/modules/overloading/macros/%hm_i_p.sci
@@ -0,0 +1,71 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA - Vincent Couvert
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+function M=%hm_i_p(varargin)
+
+ //insertion of an hypermatrix in a matrix derived from %hm_i_hm
+ [lhs,rhs]=argn(0)
+ M=varargin(rhs) //Matrix
+ N=varargin(rhs-1)//inserted hypermatrix
+ dims=size(M)'
+
+ v=M(:)
+
+
+ nd=size(dims,"*")
+ if rhs-2>nd then dims(nd+1:rhs-2)=1;end
+
+ //convert N-dimensional indexes to 1-D
+ [Ndims,I]=convertindex(list(dims,double(matrix(N.dims,1,-1))),varargin(1:$-2))
+
+ if or(Ndims>dims) then
+ //extend the destination matrix
+ I1=0
+ for k=size(Ndims,"*"):-1:1
+ ik1=(1:dims(k))'
+ if ik1<>[] then
+ if Ndims(k)>1 then
+ if size(I1,"*")>1 then
+ I1=(Ndims(k)*I1).*.ones(ik1)+ones(I1).*.(ik1-1)
+ else
+ I1=Ndims(k)*I1+ik1-1
+ end
+ else
+ I1=Ndims(k)*I1+ik1-1
+ end
+ end
+ end
+ select type(v)
+ case 1
+ v1=zeros(prod(Ndims),1)
+ case 2 then
+ v1=zeros(prod(Ndims),1)
+ case 4 then
+ v1=(zeros(prod(Ndims),1)==1)
+ case 8 then
+ v1=iconvert(zeros(prod(Ndims),1),inttype(v))
+ case 10 then
+ v1=emptystr(prod(Ndims),1)
+ end
+ v1(I1+1)=v;v=v1
+ end
+
+ v(I)=matrix(N.entries,-1,1)
+
+ while Ndims($)==1 then Ndims($)=[],end
+ select size(Ndims,"*")
+ case 0
+ M=v
+ case 1
+ M=v
+ case 2
+ M=matrix(v,Ndims(1),Ndims(2))
+ else
+ M=mlist(["hm","dims","entries"],matrix(Ndims,1,-1),v)
+ end
+endfunction
diff --git a/modules/overloading/macros/%hm_i_r.bin b/modules/overloading/macros/%hm_i_r.bin
new file mode 100755
index 000000000..1f2c8c94a
--- /dev/null
+++ b/modules/overloading/macros/%hm_i_r.bin
Binary files differ
diff --git a/modules/overloading/macros/%hm_i_r.sci b/modules/overloading/macros/%hm_i_r.sci
new file mode 100755
index 000000000..dbbea7f37
--- /dev/null
+++ b/modules/overloading/macros/%hm_i_r.sci
@@ -0,0 +1,20 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+function N=%r_i_hm(varargin)
+ //author Serge Steer INRIA
+ M=varargin($);
+ N=varargin($-1);//inserted matrix
+ // M(i,...)=N
+ Den=ones(M);
+ M(varargin(1:$-2))=N.num
+ Den(varargin(1:$-2))=N.den
+ N.num=M
+ N.den=Den
+
+endfunction
diff --git a/modules/overloading/macros/%hm_i_s.bin b/modules/overloading/macros/%hm_i_s.bin
new file mode 100755
index 000000000..d9d60d0cd
--- /dev/null
+++ b/modules/overloading/macros/%hm_i_s.bin
Binary files differ
diff --git a/modules/overloading/macros/%hm_i_s.sci b/modules/overloading/macros/%hm_i_s.sci
new file mode 100755
index 000000000..6e8643442
--- /dev/null
+++ b/modules/overloading/macros/%hm_i_s.sci
@@ -0,0 +1,78 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function M=%hm_i_s(varargin)
+
+ //insertion of an hypermatrix in a matrix derived from %hm_i_hm
+ [lhs,rhs]=argn(0)
+ M=varargin(rhs) //Matrix
+ N=varargin(rhs-1)//inserted hypermatrix
+ dims=size(M)'
+
+ if isempty(M) & rhs == 3 & type(varargin(1)) == 10 then
+ // Fix for bug 13247
+ // the matrix is empty and the index is a field name, so we create a struct
+ M = struct(varargin(1), N)
+ return;
+ end
+
+ v=M(:)
+ nd=size(dims,"*")
+
+ if rhs-2>nd then dims(nd+1:rhs-2)=1;end
+
+ //convert N-dimensional indexes to 1-D
+ [Ndims,I]=convertindex(list(dims,double(matrix(N.dims,1,-1))),varargin(1:$-2))
+
+ if or(Ndims>dims) then
+ //extend the destination matrix
+ I1=0
+ for k=size(Ndims,"*"):-1:1
+ ik1=(1:dims(k))'
+ if ik1<>[] then
+ if Ndims(k)>1 then
+ if size(I1,"*")>1 then
+ I1=(Ndims(k)*I1).*.ones(ik1)+ones(I1).*.(ik1-1)
+ else
+ I1=Ndims(k)*I1+ik1-1
+ end
+ else
+ I1=Ndims(k)*I1+ik1-1
+ end
+ end
+ end
+ select type(v)
+ case 1
+ v1=zeros(prod(Ndims),1)
+ case 2 then
+ v1=zeros(prod(Ndims),1)
+ case 4 then
+ v1=(zeros(prod(Ndims),1)==1)
+ case 8 then
+ v1=iconvert(zeros(prod(Ndims),1),inttype(v))
+ case 10 then
+ v1=emptystr(prod(Ndims),1)
+ end
+ v1(I1+1)=v;v=v1
+ end
+
+ v(I)=matrix(N.entries,-1,1)
+
+ while Ndims($)==1 then Ndims($)=[],end
+ select size(Ndims,"*")
+ case 0
+ M=v
+ case 1
+ M=v
+ case 2
+ M=matrix(v,Ndims(1),Ndims(2))
+ else
+ M=mlist(["hm","dims","entries"],int32(matrix(Ndims,1,-1)),v)
+ end
+endfunction
diff --git a/modules/overloading/macros/%hm_i_st.bin b/modules/overloading/macros/%hm_i_st.bin
new file mode 100755
index 000000000..a75ffbc60
--- /dev/null
+++ b/modules/overloading/macros/%hm_i_st.bin
Binary files differ
diff --git a/modules/overloading/macros/%hm_i_st.sci b/modules/overloading/macros/%hm_i_st.sci
new file mode 100755
index 000000000..9aaf8e0b3
--- /dev/null
+++ b/modules/overloading/macros/%hm_i_st.sci
@@ -0,0 +1,12 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function out=%hm_i_st(i,in,out)
+ out=generic_i_st(i,in,out)
+endfunction
diff --git a/modules/overloading/macros/%hm_iconvert.bin b/modules/overloading/macros/%hm_iconvert.bin
new file mode 100755
index 000000000..727c1e87b
--- /dev/null
+++ b/modules/overloading/macros/%hm_iconvert.bin
Binary files differ
diff --git a/modules/overloading/macros/%hm_iconvert.sci b/modules/overloading/macros/%hm_iconvert.sci
new file mode 100755
index 000000000..f7001f1ee
--- /dev/null
+++ b/modules/overloading/macros/%hm_iconvert.sci
@@ -0,0 +1,12 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function x=%hm_iconvert(x,it)
+ x.entries=iconvert(x.entries,it)
+endfunction
diff --git a/modules/overloading/macros/%hm_imag.bin b/modules/overloading/macros/%hm_imag.bin
new file mode 100755
index 000000000..6c1911da9
--- /dev/null
+++ b/modules/overloading/macros/%hm_imag.bin
Binary files differ
diff --git a/modules/overloading/macros/%hm_imag.sci b/modules/overloading/macros/%hm_imag.sci
new file mode 100755
index 000000000..ec71befae
--- /dev/null
+++ b/modules/overloading/macros/%hm_imag.sci
@@ -0,0 +1,13 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function M=%hm_imag(M)
+
+ M("entries")=imag(M("entries"))
+endfunction
diff --git a/modules/overloading/macros/%hm_int.bin b/modules/overloading/macros/%hm_int.bin
new file mode 100755
index 000000000..d85355c0b
--- /dev/null
+++ b/modules/overloading/macros/%hm_int.bin
Binary files differ
diff --git a/modules/overloading/macros/%hm_int.sci b/modules/overloading/macros/%hm_int.sci
new file mode 100755
index 000000000..2ee2fb357
--- /dev/null
+++ b/modules/overloading/macros/%hm_int.sci
@@ -0,0 +1,12 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function M=%hm_int(M)
+ M("entries")=int(M("entries"))
+endfunction
diff --git a/modules/overloading/macros/%hm_isnan.bin b/modules/overloading/macros/%hm_isnan.bin
new file mode 100755
index 000000000..2ce4a9f5a
--- /dev/null
+++ b/modules/overloading/macros/%hm_isnan.bin
Binary files differ
diff --git a/modules/overloading/macros/%hm_isnan.sci b/modules/overloading/macros/%hm_isnan.sci
new file mode 100755
index 000000000..6dacded30
--- /dev/null
+++ b/modules/overloading/macros/%hm_isnan.sci
@@ -0,0 +1,12 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function b=%hm_isnan(M)
+ b=hypermat(M.dims,isnan(M.entries))
+endfunction
diff --git a/modules/overloading/macros/%hm_isreal.bin b/modules/overloading/macros/%hm_isreal.bin
new file mode 100755
index 000000000..4164965a5
--- /dev/null
+++ b/modules/overloading/macros/%hm_isreal.bin
Binary files differ
diff --git a/modules/overloading/macros/%hm_isreal.sci b/modules/overloading/macros/%hm_isreal.sci
new file mode 100755
index 000000000..060387839
--- /dev/null
+++ b/modules/overloading/macros/%hm_isreal.sci
@@ -0,0 +1,16 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function b=%hm_isreal(M,eps)
+ if argn(2)==1 then
+ b=isreal(M.entries)
+ else
+ b=isreal(M.entries,eps)
+ end
+endfunction
diff --git a/modules/overloading/macros/%hm_j_hm.bin b/modules/overloading/macros/%hm_j_hm.bin
new file mode 100755
index 000000000..83ada8e2b
--- /dev/null
+++ b/modules/overloading/macros/%hm_j_hm.bin
Binary files differ
diff --git a/modules/overloading/macros/%hm_j_hm.sci b/modules/overloading/macros/%hm_j_hm.sci
new file mode 100755
index 000000000..30646d779
--- /dev/null
+++ b/modules/overloading/macros/%hm_j_hm.sci
@@ -0,0 +1,17 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function M2=%hm_j_hm(M1,M2)
+
+ if and(M1("dims")==M2("dims")) then
+ M2("entries")=M1("entries").^M2("entries")
+ else
+ error(msprintf(_("%s: Inconsistent element-wise operation.\n"),"%hm_j_hm"));
+ end
+endfunction
diff --git a/modules/overloading/macros/%hm_j_s.bin b/modules/overloading/macros/%hm_j_s.bin
new file mode 100755
index 000000000..09c56b225
--- /dev/null
+++ b/modules/overloading/macros/%hm_j_s.bin
Binary files differ
diff --git a/modules/overloading/macros/%hm_j_s.sci b/modules/overloading/macros/%hm_j_s.sci
new file mode 100755
index 000000000..2709f1fa7
--- /dev/null
+++ b/modules/overloading/macros/%hm_j_s.sci
@@ -0,0 +1,17 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function M1=%hm_j_s(M1,M2)
+
+ if size(M2,"*")<>1 then
+ error(msprintf(_("%s: Inconsistent element-wise operation.\n"),"%hm_j_s"));
+ else
+ M1(:) = M1(:) .^ M2
+ end
+endfunction
diff --git a/modules/overloading/macros/%hm_k_hm.bin b/modules/overloading/macros/%hm_k_hm.bin
new file mode 100755
index 000000000..43167d10f
--- /dev/null
+++ b/modules/overloading/macros/%hm_k_hm.bin
Binary files differ
diff --git a/modules/overloading/macros/%hm_k_hm.sci b/modules/overloading/macros/%hm_k_hm.sci
new file mode 100755
index 000000000..fd57061ef
--- /dev/null
+++ b/modules/overloading/macros/%hm_k_hm.sci
@@ -0,0 +1,12 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2014 - Samuel GOUGEON
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function r = %hm_k_hm(a, b)
+ r = %hmS_k_hmS_generic(a, b)
+endfunction
diff --git a/modules/overloading/macros/%hm_k_s.bin b/modules/overloading/macros/%hm_k_s.bin
new file mode 100755
index 000000000..d87b526e9
--- /dev/null
+++ b/modules/overloading/macros/%hm_k_s.bin
Binary files differ
diff --git a/modules/overloading/macros/%hm_k_s.sci b/modules/overloading/macros/%hm_k_s.sci
new file mode 100755
index 000000000..d3289be91
--- /dev/null
+++ b/modules/overloading/macros/%hm_k_s.sci
@@ -0,0 +1,12 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2014 - Samuel GOUGEON
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function r = %hm_k_s(a, b)
+ r = %hmS_k_hmS_generic(a, b)
+endfunction
diff --git a/modules/overloading/macros/%hm_log.bin b/modules/overloading/macros/%hm_log.bin
new file mode 100755
index 000000000..9ceabbf48
--- /dev/null
+++ b/modules/overloading/macros/%hm_log.bin
Binary files differ
diff --git a/modules/overloading/macros/%hm_log.sci b/modules/overloading/macros/%hm_log.sci
new file mode 100755
index 000000000..0e7674931
--- /dev/null
+++ b/modules/overloading/macros/%hm_log.sci
@@ -0,0 +1,13 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function M=%hm_log(M)
+
+ M("entries")=log(M("entries"))
+endfunction
diff --git a/modules/overloading/macros/%hm_m_p.bin b/modules/overloading/macros/%hm_m_p.bin
new file mode 100755
index 000000000..83240ef51
--- /dev/null
+++ b/modules/overloading/macros/%hm_m_p.bin
Binary files differ
diff --git a/modules/overloading/macros/%hm_m_p.sci b/modules/overloading/macros/%hm_m_p.sci
new file mode 100755
index 000000000..8aabe6629
--- /dev/null
+++ b/modules/overloading/macros/%hm_m_p.sci
@@ -0,0 +1,16 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function M1=%hm_m_p(M1,M2)
+ if size(M2,"*")<>1 then
+ M1=M1*mlist(["hm","dims","entries"],size(M2),matrix(M2,-1,1))
+ else
+ M1.entries=M1.entries*M2
+ end
+endfunction
diff --git a/modules/overloading/macros/%hm_m_r.bin b/modules/overloading/macros/%hm_m_r.bin
new file mode 100755
index 000000000..33d6b5a7c
--- /dev/null
+++ b/modules/overloading/macros/%hm_m_r.bin
Binary files differ
diff --git a/modules/overloading/macros/%hm_m_r.sci b/modules/overloading/macros/%hm_m_r.sci
new file mode 100755
index 000000000..9303d94e5
--- /dev/null
+++ b/modules/overloading/macros/%hm_m_r.sci
@@ -0,0 +1,34 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function f2=%hm_m_r(n1,f2)
+ // %s_m_r(n1,f2)
+ //operation f2=n1*f2
+ //author Serge Steer INRIA
+ //!
+ [n2,d2]=f2(["num","den"]);
+ sz2=size(n2);
+ if prod(sz2)==0 then f2=[],return,end
+ sz1=size(n1);
+ n1=n1(:)
+
+ if or(sz2==-1) then
+ n2=n2+0;d2=d2+0;
+ end
+
+ //
+ if prod(sz2)==1 then
+ num=n1*n2,
+ den=d2(ones(n1))
+ else,
+ error(10)
+ end,
+
+ f2=rlist(matrix(num,sz1),matrix(den,sz1),f2.dt)
+endfunction
diff --git a/modules/overloading/macros/%hm_m_s.bin b/modules/overloading/macros/%hm_m_s.bin
new file mode 100755
index 000000000..29e2b6886
--- /dev/null
+++ b/modules/overloading/macros/%hm_m_s.bin
Binary files differ
diff --git a/modules/overloading/macros/%hm_m_s.sci b/modules/overloading/macros/%hm_m_s.sci
new file mode 100755
index 000000000..2998c3a74
--- /dev/null
+++ b/modules/overloading/macros/%hm_m_s.sci
@@ -0,0 +1,31 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function M1=%hm_m_s(M1,M2)
+
+ siz1 = size(M1);
+ siz2 = size(M2);
+
+ if size(M2,"*")<>1 then
+ if length(siz1)<>3 then
+ error(msprintf(_("%s: Wrong size for input argument #%d: 3D maximum expected.\n"),"%hm_m_s",2));
+ end
+ if siz1(2)<>siz2(1) then
+ error(msprintf(_("%s: Wrong size for argument: Incompatible dimensions.\n"),"hm_m_s"));
+ end
+ res = zeros(siz1(1), siz2(2), siz1(3));
+ for i=1:siz1(3)
+ res(:, :, i) = M1(:, :, i)*M2;
+ end
+ M1 = res;
+ else
+ M1.entries = M1.entries*M2
+ end
+
+endfunction
diff --git a/modules/overloading/macros/%hm_matrix.bin b/modules/overloading/macros/%hm_matrix.bin
new file mode 100755
index 000000000..e3ad4af58
--- /dev/null
+++ b/modules/overloading/macros/%hm_matrix.bin
Binary files differ
diff --git a/modules/overloading/macros/%hm_matrix.sci b/modules/overloading/macros/%hm_matrix.sci
new file mode 100755
index 000000000..a140eadb4
--- /dev/null
+++ b/modules/overloading/macros/%hm_matrix.sci
@@ -0,0 +1,53 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+function a=%hm_matrix(a,varargin)
+ dims=size(a);nd=size(dims,"*")
+ if size(varargin)==1 then
+ sz=varargin(1)
+ else
+ sz=[]
+ for k=1:size(varargin)
+ if size(varargin(k),"*")<>1|type(varargin(k))<>1 then
+ error(msprintf(_("%s: Wrong size for input argument(s): integer scalars expected.\n"),"%hm_matrix"));
+ end
+ sz=[sz varargin(k)]
+ end
+ sz=round(sz)
+ end
+ nd1=size(sz,"*")
+ if nd1<=0 then error(60),end
+ if nd1<=2 then a=matrix(a.entries,sz),return,end
+ if nd<nd1 then
+ dims(nd+1:nd1)=1
+ elseif nd>nd1 then
+ dims=[dims(1:nd1-1) prod(dims(nd1:nd))]
+ end
+ nd=size(dims,"*")
+ k=find(sz==-1)
+ P=prod(dims)
+ if k<>[] then
+ if size(k,"*")>1 then
+ error(msprintf(_("%s: Only one -1 value admitted.\n"),"%hm_matrix"));
+ end
+ sz(k)=floor(P/(prod(sz(sz>0))))
+ end
+
+ if prod(P)<>prod(sz) then
+ error(msprintf(_("%s: Input and output matrices must have the same number of elements"),"%hm_matrix"));
+ end
+
+ if type(a)<>17 then
+ a=hypermat(sz,a)
+ return
+ end
+
+ a.dims=int32(matrix(sz,1,-1));
+
+
+endfunction
diff --git a/modules/overloading/macros/%hm_max.bin b/modules/overloading/macros/%hm_max.bin
new file mode 100755
index 000000000..ed6f24efb
--- /dev/null
+++ b/modules/overloading/macros/%hm_max.bin
Binary files differ
diff --git a/modules/overloading/macros/%hm_max.sci b/modules/overloading/macros/%hm_max.sci
new file mode 100755
index 000000000..eddc2c18b
--- /dev/null
+++ b/modules/overloading/macros/%hm_max.sci
@@ -0,0 +1,107 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+// Copyright (C) 2012 - Scilab Enterprises - Adeline CARNIS
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function [x,k] = %hm_max(varargin)
+ n = size(varargin)
+ // One input argument
+ if n == 1 then
+ // Retrieve the dimensions
+ m = varargin(1).dims
+ // Compute the max of column vector
+ // varargin(1).entries gives column vector
+ [x,k] = max(varargin(1).entries)
+ // check if lhs = 2 and if varargin(1) is vector
+ if (argn(1) > 1 & (m(length(m)) <> size(varargin(1), "*"))) then
+ k = ind2sub(m, k(1))
+ end
+ else
+ if n==2 then
+ d=varargin(2)
+ // Check if d is a string
+ if type(d)==10 then
+ [x,k]=%hm_oriented_max(varargin(1),d)
+ return
+ end
+ end
+ // if the second input argument is a matrix or hypermatrix
+ // Obtain column vector
+ x=varargin(1)(:)
+ dims=size(varargin(1))
+ for kk=2:n
+ sz=size(varargin(kk))
+ // check if the dim are different
+ if or(dims<>sz) then
+ if prod(dims)<>1&prod(sz)<>1 then
+ error(42)
+ end
+ // the first argument is a scalar
+ if prod(dims)==1 then dims=sz,end
+ end
+ // max between hypermatrix and hypermatrix
+ [x,k]=max(x,varargin(kk)(:))
+ end
+ x=hypermat(dims,x)
+ k=hypermat(dims,k)
+ end
+endfunction
+
+function [x,k]=%hm_oriented_max(m,d)
+ if d=="m" then
+ d=find(m.dims>1,1)
+ if d==[] then
+ [x,k1]=max(m.entries)
+ k=ind2sub(m.dims,k1(1))
+ return,
+ end
+ elseif d=="r" then
+ d=1
+ elseif d=="c" then
+ d=2
+ end
+ dims=m.dims;
+ if type(dims==8) then flag=1; dims=double(dims); else flag=0;end
+ N=size(dims,"*");
+ p1=prod(dims(1:d-1));// step for one max
+ p2=p1*dims(d);//step for beginning of vector to max
+ ind=(0:p1:p2-1)';// selection for vector to max
+ deb=(1:p1);
+ I=ind*ones(deb)+ones(ind)*deb
+
+ ind=(0:p2:prod(dims)-1);
+ I=ones(ind).*.I+ind.*.ones(I)
+
+ [x,k]=max(matrix(m.entries(I),dims(d),-1),"r")
+
+ dims(d)=1
+ if d==N then
+ dims=dims(1:$)
+ else
+ dims(d)=1
+ end
+ if size(dims,"*")==2 then
+ if flag==1 then dims=int32(dims);end
+ x=matrix(x,dims(1),dims(2))
+ k=matrix(k,dims(1),dims(2))
+ else
+ if flag==1 then dims=int32(dims);end
+ x=hypermat(dims,matrix(x,-1,1))
+ k=hypermat(dims,matrix(k,-1,1))
+ end
+endfunction
+
+
+
+
+
+
+
+
+
+
diff --git a/modules/overloading/macros/%hm_mean.bin b/modules/overloading/macros/%hm_mean.bin
new file mode 100755
index 000000000..27d72a454
--- /dev/null
+++ b/modules/overloading/macros/%hm_mean.bin
Binary files differ
diff --git a/modules/overloading/macros/%hm_mean.sci b/modules/overloading/macros/%hm_mean.sci
new file mode 100755
index 000000000..081b31b8a
--- /dev/null
+++ b/modules/overloading/macros/%hm_mean.sci
@@ -0,0 +1,39 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+function x=%hm_mean(m,d)
+ if argn(2)==1 then
+ x=mean(m.entries)
+ return
+ end
+ dims=m.dims;
+ if type(dims==8) then flag=1; dims=double(dims); else flag=0;end
+ N=size(dims,"*");
+ p1=prod(dims(1:d-1));// step to build one vector on which mean is applied
+ p2=p1*dims(d);//step for beginning of next vectors
+ ind=(0:p1:p2-1)';// selection for building one vector
+ deb=(1:p1);
+ I=ind*ones(deb)+ones(ind)*deb
+
+ ind=(0:p2:prod(dims)-1);
+ I=ones(ind).*.I+ind.*.ones(I)
+
+ x=mean(matrix(m.entries(I),dims(d),-1),1)
+ dims(d)=1
+ if d==N then
+ dims=dims(1:$)
+ else
+ dims(d)=1
+ end
+ if size(dims,"*")==2 then
+ x=matrix(x,dims(1),dims(2))
+ else
+ if flag==1 then dims=int32(dims);end
+ x=hypermat(dims,x(:))
+ end
+endfunction
diff --git a/modules/overloading/macros/%hm_median.bin b/modules/overloading/macros/%hm_median.bin
new file mode 100755
index 000000000..e225d9d1e
--- /dev/null
+++ b/modules/overloading/macros/%hm_median.bin
Binary files differ
diff --git a/modules/overloading/macros/%hm_median.sci b/modules/overloading/macros/%hm_median.sci
new file mode 100755
index 000000000..c573428f6
--- /dev/null
+++ b/modules/overloading/macros/%hm_median.sci
@@ -0,0 +1,37 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+function x=%hm_median(m,d)
+ if argn(2)==1 then
+ x=median(m.entries)
+ return
+ end
+ dims=m.dims;
+ N=size(dims,"*");
+ p1=prod(dims(1:d-1));// step to build one vector on which median is applied
+ p2=p1*dims(d);//step for beginning of next vectors
+ ind=(0:p1:p2-1)';// selection for building one vector
+ deb=(1:p1);
+ I=ind*ones(deb)+ones(ind)*deb
+
+ ind=(0:p2:prod(dims)-1);
+ I=ones(ind).*.I+ind.*.ones(I)
+
+ x=median(matrix(m.entries(I),dims(d),-1),1)
+ dims(d)=1
+ if d==N then
+ dims=dims(1:$)
+ else
+ dims(d)=1
+ end
+ if size(dims,"*")==2 then
+ x=matrix(x,dims(1),dims(2))
+ else
+ x=hypermat(dims,x)
+ end
+endfunction
diff --git a/modules/overloading/macros/%hm_min.bin b/modules/overloading/macros/%hm_min.bin
new file mode 100755
index 000000000..fc0423d5d
--- /dev/null
+++ b/modules/overloading/macros/%hm_min.bin
Binary files differ
diff --git a/modules/overloading/macros/%hm_min.sci b/modules/overloading/macros/%hm_min.sci
new file mode 100755
index 000000000..6769e6d81
--- /dev/null
+++ b/modules/overloading/macros/%hm_min.sci
@@ -0,0 +1,98 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+// Copyright (C) 2012 - Scilab Enterprises - Adeline CARNIS
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+function [x,k] = %hm_min(varargin)
+ n = size(varargin)
+ // One input argument
+ if n ==1 then
+ // Retrieve the dimensions
+ m = varargin(1).dims
+ // Compute the min of column vector
+ // varargin(1).entries gives column vector
+ [x,k] = min(varargin(1).entries)
+ // check if lhs = 2 and if varargin(1) is vector
+ if (argn(1) > 1 & (m(length(m)) <> size(varargin(1), "*"))) then
+ k = ind2sub(m, k(1))
+ end
+ else
+ if n==2 then
+ d=varargin(2)
+ // Check if d is a string
+ if type(d)==10 then
+ [x,k]=%hm_oriented_min(varargin(1),d)
+ return
+ end
+ end
+ // if the second input argument is a matrix or hypermatrix
+ // Obtain column vector
+ x=varargin(1)(:)
+ dims=size(varargin(1))
+ for kk=2:n
+ sz=size(varargin(kk))
+ // check if the dim are different
+ if or(dims<>sz) then
+ if prod(dims)<>1&prod(sz)<>1 then
+ error(42)
+ end
+ // the first argument is a scalar
+ if prod(dims)==1 then dims=sz,end
+ end
+ // min between hypermatrix and hypermatrix
+ [x,k]=min(x,varargin(kk)(:))
+ end
+ x=hypermat(dims,x)
+ k=hypermat(dims,k)
+ end
+endfunction
+
+function [x,k]=%hm_oriented_min(m,d)
+ if d=="m" then
+ d=find(dims>1,1)
+ if d==[] then
+ [x,k1]=max(m.entries)
+ k=ind2sub(m.dims,k1(1))
+ return,
+ end
+ elseif d=="r" then
+ d=1
+ elseif d=="c" then
+ d=2
+ end
+ dims=m.dims;
+ if type(dims==8) then flag=1; dims=double(dims); else flag=0;end
+ N=size(dims,"*");
+ p1=prod(dims(1:d-1));// step for one min
+ p2=p1*dims(d);//step for beginning of vector to min
+ ind=(0:p1:p2-1)';// selection for vector to min
+ deb=(1:p1);
+ I=ind*ones(deb)+ones(ind)*deb
+
+ ind=(0:p2:prod(dims)-1);
+ I=ones(ind).*.I+ind.*.ones(I)
+
+ [x,k]=min(matrix(m.entries(I),dims(d),-1),"r")
+
+ dims(d)=1
+ if d==N then
+ dims=dims(1:$)
+ else
+ dims(d)=1
+ end
+ if size(dims,"*")==2 then
+ if flag==1 then dims=int32(dims);end
+ x=matrix(x,dims(1),dims(2))
+ k=matrix(k,dims(1),dims(2))
+ else
+ if flag==1 then dims=int32(dims);end
+ x=hypermat(dims,x)
+ k=hypermat(dims,matrix(k,-1,1))
+ end
+endfunction
+
+
diff --git a/modules/overloading/macros/%hm_n_b.bin b/modules/overloading/macros/%hm_n_b.bin
new file mode 100755
index 000000000..e40962081
--- /dev/null
+++ b/modules/overloading/macros/%hm_n_b.bin
Binary files differ
diff --git a/modules/overloading/macros/%hm_n_b.sci b/modules/overloading/macros/%hm_n_b.sci
new file mode 100755
index 000000000..bd364af60
--- /dev/null
+++ b/modules/overloading/macros/%hm_n_b.sci
@@ -0,0 +1,17 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2011 - INRIA - Serge Steer
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function M=%hm_n_b(M,s)
+ //M<>s
+ if size(s,"*")<> 1 then
+ M=%t;
+ else
+ M.entries=M.entries<>s
+ end
+endfunction
diff --git a/modules/overloading/macros/%hm_n_c.bin b/modules/overloading/macros/%hm_n_c.bin
new file mode 100755
index 000000000..bb729a7ab
--- /dev/null
+++ b/modules/overloading/macros/%hm_n_c.bin
Binary files differ
diff --git a/modules/overloading/macros/%hm_n_c.sci b/modules/overloading/macros/%hm_n_c.sci
new file mode 100755
index 000000000..f63a04f72
--- /dev/null
+++ b/modules/overloading/macros/%hm_n_c.sci
@@ -0,0 +1,17 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2011 - INRIA - Serge Steer
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function M=%hm_n_c(M,s)
+ //M<>s
+ if size(s,"*")<> 1 then
+ M=%t;
+ else
+ M.entries=M.entries<>s
+ end
+endfunction
diff --git a/modules/overloading/macros/%hm_n_hm.bin b/modules/overloading/macros/%hm_n_hm.bin
new file mode 100755
index 000000000..12c087208
--- /dev/null
+++ b/modules/overloading/macros/%hm_n_hm.bin
Binary files differ
diff --git a/modules/overloading/macros/%hm_n_hm.sci b/modules/overloading/macros/%hm_n_hm.sci
new file mode 100755
index 000000000..d535b165e
--- /dev/null
+++ b/modules/overloading/macros/%hm_n_hm.sci
@@ -0,0 +1,16 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+function r=%hm_n_hm(a,b)
+ r=and(a.dims==b.dims)
+ if r then
+ r=hypermat(a.dims,a.entries<>b.entries)
+ else
+ r=%t
+ end
+endfunction
diff --git a/modules/overloading/macros/%hm_n_i.bin b/modules/overloading/macros/%hm_n_i.bin
new file mode 100755
index 000000000..e0d30ec48
--- /dev/null
+++ b/modules/overloading/macros/%hm_n_i.bin
Binary files differ
diff --git a/modules/overloading/macros/%hm_n_i.sci b/modules/overloading/macros/%hm_n_i.sci
new file mode 100755
index 000000000..f936d5f85
--- /dev/null
+++ b/modules/overloading/macros/%hm_n_i.sci
@@ -0,0 +1,17 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2011 - INRIA - Serge Steer
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function M=%hm_n_i(M,s)
+ //M<>s
+ if size(s,"*")<> 1 then
+ M=%t;
+ else
+ M.entries=M.entries<>s
+ end
+endfunction
diff --git a/modules/overloading/macros/%hm_n_p.bin b/modules/overloading/macros/%hm_n_p.bin
new file mode 100755
index 000000000..20f11e9b2
--- /dev/null
+++ b/modules/overloading/macros/%hm_n_p.bin
Binary files differ
diff --git a/modules/overloading/macros/%hm_n_p.sci b/modules/overloading/macros/%hm_n_p.sci
new file mode 100755
index 000000000..04bc23ae1
--- /dev/null
+++ b/modules/overloading/macros/%hm_n_p.sci
@@ -0,0 +1,17 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2011 - INRIA - Serge Steer
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function M=%hm_n_p(M,s)
+ //M<>s
+ if size(s,"*")<> 1 then
+ M=%t;
+ else
+ M.entries=M.entries<>s;
+ end
+endfunction
diff --git a/modules/overloading/macros/%hm_n_s.bin b/modules/overloading/macros/%hm_n_s.bin
new file mode 100755
index 000000000..6e1713247
--- /dev/null
+++ b/modules/overloading/macros/%hm_n_s.bin
Binary files differ
diff --git a/modules/overloading/macros/%hm_n_s.sci b/modules/overloading/macros/%hm_n_s.sci
new file mode 100755
index 000000000..9fb3fbbea
--- /dev/null
+++ b/modules/overloading/macros/%hm_n_s.sci
@@ -0,0 +1,16 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function M=%hm_n_s(M,s)
+ //M<>s
+ if size(s,"*")<> 1 then
+ M=%t;return
+ end
+ M("entries")=M("entries")<>s
+endfunction
diff --git a/modules/overloading/macros/%hm_o_b.bin b/modules/overloading/macros/%hm_o_b.bin
new file mode 100755
index 000000000..4b6d18677
--- /dev/null
+++ b/modules/overloading/macros/%hm_o_b.bin
Binary files differ
diff --git a/modules/overloading/macros/%hm_o_b.sci b/modules/overloading/macros/%hm_o_b.sci
new file mode 100755
index 000000000..61135a20c
--- /dev/null
+++ b/modules/overloading/macros/%hm_o_b.sci
@@ -0,0 +1,16 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2011 - INRIA - Serge Steer
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+function M=%hm_o_b(M,s)
+ //M==s
+ if size(s,"*")<> 1 then
+ M=%f
+ else
+ M.entries=M.entries==s
+ end
+endfunction
diff --git a/modules/overloading/macros/%hm_o_c.bin b/modules/overloading/macros/%hm_o_c.bin
new file mode 100755
index 000000000..89003ffde
--- /dev/null
+++ b/modules/overloading/macros/%hm_o_c.bin
Binary files differ
diff --git a/modules/overloading/macros/%hm_o_c.sci b/modules/overloading/macros/%hm_o_c.sci
new file mode 100755
index 000000000..5ce6b6928
--- /dev/null
+++ b/modules/overloading/macros/%hm_o_c.sci
@@ -0,0 +1,17 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2011 - INRIA - Serge Steer
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function M=%hm_o_c(M,s)
+ //M==s
+ if size(s,"*")<> 1 then
+ M=%f
+ else
+ M.entries=M.entries==s
+ end
+endfunction
diff --git a/modules/overloading/macros/%hm_o_hm.bin b/modules/overloading/macros/%hm_o_hm.bin
new file mode 100755
index 000000000..00d1fc761
--- /dev/null
+++ b/modules/overloading/macros/%hm_o_hm.bin
Binary files differ
diff --git a/modules/overloading/macros/%hm_o_hm.sci b/modules/overloading/macros/%hm_o_hm.sci
new file mode 100755
index 000000000..11bc954be
--- /dev/null
+++ b/modules/overloading/macros/%hm_o_hm.sci
@@ -0,0 +1,17 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function r=%hm_o_hm(a,b)
+ r=and(a.dims==b.dims)
+ if r then
+ r=hypermat(a.dims,a.entries==b.entries)
+ else
+ r=%f
+ end
+endfunction
diff --git a/modules/overloading/macros/%hm_o_i.bin b/modules/overloading/macros/%hm_o_i.bin
new file mode 100755
index 000000000..05b89ec63
--- /dev/null
+++ b/modules/overloading/macros/%hm_o_i.bin
Binary files differ
diff --git a/modules/overloading/macros/%hm_o_i.sci b/modules/overloading/macros/%hm_o_i.sci
new file mode 100755
index 000000000..b8f32fe6a
--- /dev/null
+++ b/modules/overloading/macros/%hm_o_i.sci
@@ -0,0 +1,17 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+function M=%hm_o_i(M,s)
+ // Copyright INRIA
+ //M==s
+ if size(s,"*")<> 1 then
+ M=%f
+ return
+ end
+ M.entries=M.entries==s
+endfunction
diff --git a/modules/overloading/macros/%hm_o_p.bin b/modules/overloading/macros/%hm_o_p.bin
new file mode 100755
index 000000000..d8411ea56
--- /dev/null
+++ b/modules/overloading/macros/%hm_o_p.bin
Binary files differ
diff --git a/modules/overloading/macros/%hm_o_p.sci b/modules/overloading/macros/%hm_o_p.sci
new file mode 100755
index 000000000..bcf047c2b
--- /dev/null
+++ b/modules/overloading/macros/%hm_o_p.sci
@@ -0,0 +1,17 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2011 - INRIA - Serge Steer
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function M=%hm_o_p(M,s)
+ //M==s
+ if size(s,"*")<> 1 then
+ M=%f
+ else
+ M.entries=M.entries==s
+ end
+endfunction
diff --git a/modules/overloading/macros/%hm_o_s.bin b/modules/overloading/macros/%hm_o_s.bin
new file mode 100755
index 000000000..deb82dcee
--- /dev/null
+++ b/modules/overloading/macros/%hm_o_s.bin
Binary files differ
diff --git a/modules/overloading/macros/%hm_o_s.sci b/modules/overloading/macros/%hm_o_s.sci
new file mode 100755
index 000000000..2eca96100
--- /dev/null
+++ b/modules/overloading/macros/%hm_o_s.sci
@@ -0,0 +1,19 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+
+function M=%hm_o_s(M,s)
+
+ //M==s
+ if size(s,"*")<> 1 then
+ M=%f
+ return
+ end
+ M("entries")=M("entries")==s
+endfunction
diff --git a/modules/overloading/macros/%hm_ones.bin b/modules/overloading/macros/%hm_ones.bin
new file mode 100755
index 000000000..f2666736c
--- /dev/null
+++ b/modules/overloading/macros/%hm_ones.bin
Binary files differ
diff --git a/modules/overloading/macros/%hm_ones.sci b/modules/overloading/macros/%hm_ones.sci
new file mode 100755
index 000000000..75617b705
--- /dev/null
+++ b/modules/overloading/macros/%hm_ones.sci
@@ -0,0 +1,34 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function M=%hm_ones(varargin)
+
+ nv=size(varargin)
+ if nv==1 then
+ M=varargin(1)
+ if type(M)==1 then
+ dims=M
+ else
+ dims=M("dims")
+ end
+ M=hypermat(dims,ones(prod(double(dims)),1))
+ else
+ dims=ones(1,nv)
+ for k=1:nv,dims(k)=int(varargin(k)),end
+ //remove highest singleton dimensions
+ ks=find(dims==1);
+ ns=size(ks,"*");
+ while ns>0&nv>2&ks(ns)==nv then ns=ns-1,nv=nv-1,end
+ if nv==2 then
+ M=ones(varargin(1:nv))
+ else
+ M=hypermat(dims(1:nv),ones(prod(dims(1:nv)),1))
+ end
+ end
+endfunction
diff --git a/modules/overloading/macros/%hm_or.bin b/modules/overloading/macros/%hm_or.bin
new file mode 100755
index 000000000..cd6e713d0
--- /dev/null
+++ b/modules/overloading/macros/%hm_or.bin
Binary files differ
diff --git a/modules/overloading/macros/%hm_or.sci b/modules/overloading/macros/%hm_or.sci
new file mode 100755
index 000000000..c760364d3
--- /dev/null
+++ b/modules/overloading/macros/%hm_or.sci
@@ -0,0 +1,58 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2010 - INRIA - Serge Steer
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function x=%hm_or(m,d)
+ if argn(2)==1|d=="*" then
+ x=or(m.entries);
+ return
+ end
+ dims=m.dims;
+ if d=="m" then
+ d=find(dims>1,1);
+ if d==[] then
+ x=or(m.entries);
+ return
+ end
+ end
+ if type(dims)==8 then
+ flag=1;
+ dims=double(dims);
+ else
+ flag=0;
+ end
+ N=size(dims,"*");
+ p1=prod(dims(1:d-1));// step to build one vector on which or is applied
+ p2=p1*dims(d);//step for beginning of next vectors
+ ind=(0:p1:p2-1)';// selection for building one vector
+ deb=(1:p1);
+ I=ind*ones(deb)+ones(ind)*deb;
+
+ ind=(0:p2:prod(dims)-1);
+ I=ones(ind).*.I+ind.*.ones(I);
+
+ x=or(matrix(m.entries(I),dims(d),-1),1);
+
+ dims(d)=1
+ while dims($)==1 then
+ dims($)=[];
+ end
+ if d==N then
+ dims=dims(1:$);
+ else
+ dims(d)=1;
+ end
+ if size(dims,"*")==2 then
+ x=matrix(x,dims(1),dims(2));
+ elseif dims<>[] then
+ if flag==1 then
+ dims=int32(dims);
+ end;
+ x=hypermat(dims,x);
+ end
+endfunction
diff --git a/modules/overloading/macros/%hm_p.bin b/modules/overloading/macros/%hm_p.bin
new file mode 100755
index 000000000..8de021341
--- /dev/null
+++ b/modules/overloading/macros/%hm_p.bin
Binary files differ
diff --git a/modules/overloading/macros/%hm_p.sci b/modules/overloading/macros/%hm_p.sci
new file mode 100755
index 000000000..983b76282
--- /dev/null
+++ b/modules/overloading/macros/%hm_p.sci
@@ -0,0 +1,34 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function %hm_p(M)
+ // hypermatrix display
+ dims=double(M("dims"))
+ nd=size(dims,"*")
+ if nd<3 then
+ if nd==1 then
+ disp(M("entries"))
+ else
+ disp(matrix(M("entries"),dims(1),dims(2)))
+ end
+ return
+ end
+ I=(1:dims(3));
+ for k=4:nd
+ I=[ones(1,dims(k)).*.I;
+ (1:dims(k)).*.ones(1,size(I,2))];
+ end
+ k=1;sz=dims(1)*dims(2)
+ for II=I
+ tit="(:,:,"+strcat(string(II'),",")+")"
+ write(%io(2),tit)
+ disp(matrix(M("entries")(k:k-1+sz),dims(1),dims(2)))
+ k=k+sz
+ end
+endfunction
diff --git a/modules/overloading/macros/%hm_prod.bin b/modules/overloading/macros/%hm_prod.bin
new file mode 100755
index 000000000..ecc9da690
--- /dev/null
+++ b/modules/overloading/macros/%hm_prod.bin
Binary files differ
diff --git a/modules/overloading/macros/%hm_prod.sci b/modules/overloading/macros/%hm_prod.sci
new file mode 100755
index 000000000..c3d58581e
--- /dev/null
+++ b/modules/overloading/macros/%hm_prod.sci
@@ -0,0 +1,103 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function a = %hm_prod(varargin)
+ a = varargin(1)
+ dims = size(a);
+ tm = type(a.entries)
+
+ nargs = size(varargin);
+ select nargs
+ case 1
+ d = 0;
+ if tm == 8 then
+ typ = "native";
+ else
+ typ = "double";
+ end
+ case 2
+ if or(varargin(2) == ["native", "double"]) then
+ d = 0;
+ typ = varargin(2);
+ else
+ d = varargin(2);
+ if tm == 8 then
+ typ = "native";
+ else
+ typ = "double";
+ end
+ end
+ case 3
+ d = varargin(2);
+ typ = varargin(3);
+ else
+ error(msprintf(_("%s: Wrong number of input argument(s): %d to %d expected.\n"),"prod", 1, 3));
+ end
+
+ // Check second argument : d
+ select type(d)
+ case 1
+ if size(d,'*') <> 1 then
+ error(msprintf(_("%s: Wrong size for input argument #%d: A scalar expected.\n"),"prod", 2))
+ end
+ if int(d) <> d | d < 0 then
+ error(msprintf(_("%s: Wrong value for input argument #%d: Integer >= %d expected.\n"),"prod", 2, 1))
+ end
+ case 10
+ if size(d,'*') <> 1 then
+ error(msprintf(_("%s: Wrong size for input argument #%d: A string expected.\n"),"prod",2))
+ end
+ if and(d<>["r","c","*","m"]) then
+ error(msprintf(_("%s: Wrong value for input argument #%d: Must be in the set {%s}.\n"),..
+ "prod",2,"""*"",""r"",""c"",""m"""))
+ end
+ pos=[1,2,0,find(dims>1,1)];
+ d=pos(find(d==["r","c","*","m"]))
+ else
+ error(msprintf(_("%s: Wrong type for input argument #%d: A string or scalar expected.\n"),"prod",2))
+ end
+
+ // Check third argument
+ if type(typ)<>10 then
+ error(msprintf(_("%s: Wrong type for input argument #%d: A string expected.\n"),"prod",3))
+ end
+
+ if size(typ,"*")<>1 then
+ error(msprintf(_("%s: Wrong size for input argument #%d: A string expected.\n"),"prod",3))
+ end
+
+ if and(typ <> ["native" "double"]) then
+ error(msprintf(_("%s: Wrong value for input argument #%d: ""%s"" or ""%s"" expected.\n"),"prod", 3, "native", "double"));
+ end
+
+ if d == 0 then // '*'
+ a=prod(a.entries, "*", typ), dims;
+ elseif d > size(dims,"*") then
+ //requested summation direction exceeds array dims, return the array, converted
+ //to double if necessary.
+ if typ == "double" & or(tm == [4 8]) then
+ a.entries=double(a.entries),
+ end
+ a=a
+ else
+ //permute the array dimension to put the selected dimension first
+ p=1:size(dims,"*");
+ p([1,d])=p([d,1]);
+ a=matrix(permute(a,p),dims(d),-1)
+ a=prod(a,1,typ);
+ //permute back
+ if d==size(dims, "*") then
+ dims=dims(1:$-1)
+ p(1) = []
+ else
+ dims(d)=1
+ end
+ a=permute(matrix(a,dims(p)),p)
+ end
+endfunction
diff --git a/modules/overloading/macros/%hm_q_hm.bin b/modules/overloading/macros/%hm_q_hm.bin
new file mode 100755
index 000000000..f3b2c0ad0
--- /dev/null
+++ b/modules/overloading/macros/%hm_q_hm.bin
Binary files differ
diff --git a/modules/overloading/macros/%hm_q_hm.sci b/modules/overloading/macros/%hm_q_hm.sci
new file mode 100755
index 000000000..c40fc2c9c
--- /dev/null
+++ b/modules/overloading/macros/%hm_q_hm.sci
@@ -0,0 +1,17 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function M2=%hm_q_hm(M1,M2)
+
+ if and(M1("dims")==M2("dims")) then
+ M2("entries")=M1("entries").\M2("entries")
+ else
+ error(msprintf(_("%s: Inconsistent element-wise operation.\n"),"%hm_q_hm"));
+ end
+endfunction
diff --git a/modules/overloading/macros/%hm_r_s.bin b/modules/overloading/macros/%hm_r_s.bin
new file mode 100755
index 000000000..06487dbd3
--- /dev/null
+++ b/modules/overloading/macros/%hm_r_s.bin
Binary files differ
diff --git a/modules/overloading/macros/%hm_r_s.sci b/modules/overloading/macros/%hm_r_s.sci
new file mode 100755
index 000000000..1928eda08
--- /dev/null
+++ b/modules/overloading/macros/%hm_r_s.sci
@@ -0,0 +1,17 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function M1=%hm_r_s(M1,M2)
+
+ if size(M2,"*")<>1 then
+ M1=M1/hypermat(size(M2),M2)
+ else
+ M1.entries=M1.entries/M2
+ end
+endfunction
diff --git a/modules/overloading/macros/%hm_rand.bin b/modules/overloading/macros/%hm_rand.bin
new file mode 100755
index 000000000..f8938a3ed
--- /dev/null
+++ b/modules/overloading/macros/%hm_rand.bin
Binary files differ
diff --git a/modules/overloading/macros/%hm_rand.sci b/modules/overloading/macros/%hm_rand.sci
new file mode 100755
index 000000000..872860756
--- /dev/null
+++ b/modules/overloading/macros/%hm_rand.sci
@@ -0,0 +1,52 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function M=%hm_rand(varargin)
+
+ //creates a random hypermatrix with shape given by vector of dimensions or an
+ //hypermatrix
+ nv=size(varargin)
+ if nv==1 then
+ M=varargin(1)
+ if type(M)==1 then
+ dims=M
+ else
+ dims=M("dims")
+ end
+ M=hypermat(dims,rand(prod(double(dims)),1))
+ else
+
+ if type(varargin($))==10 then
+ opt=varargin($),nv=nv-1;
+ dims=ones(1,nv)
+ for k=1:nv,dims(k)=int(varargin(k)),end
+ //remove highest singleton dimensions
+ ks=find(dims==1);
+ ns=size(ks,"*");
+ while ns>0&nv>2&ks(ns)==nv then ns=ns-1,nv=nv-1,end
+ if nv==2 then
+ M=rand(varargin(1:nv),opt)
+ else
+ M=hypermat(dims(1:nv),rand(prod(dims(1:nv)),1,opt))
+ end
+ else
+ dims=ones(1,nv)
+ for k=1:nv,dims(k)=int(varargin(k)),end
+ //remove highest singleton dimensions
+ ks=find(dims==1);
+ ns=size(ks,"*");
+ while ns>0&nv>2&ks(ns)==nv then ns=ns-1,nv=nv-1,end
+ if nv==2 then
+ M=rand(varargin(1:nv))
+ else
+ M=hypermat(dims(1:nv),rand(prod(dims(1:nv)),1))
+ end
+ end
+ end
+endfunction
diff --git a/modules/overloading/macros/%hm_real.bin b/modules/overloading/macros/%hm_real.bin
new file mode 100755
index 000000000..3cc18fa82
--- /dev/null
+++ b/modules/overloading/macros/%hm_real.bin
Binary files differ
diff --git a/modules/overloading/macros/%hm_real.sci b/modules/overloading/macros/%hm_real.sci
new file mode 100755
index 000000000..9eba3164c
--- /dev/null
+++ b/modules/overloading/macros/%hm_real.sci
@@ -0,0 +1,13 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function M=%hm_real(M)
+
+ M("entries")=real(M("entries"))
+endfunction
diff --git a/modules/overloading/macros/%hm_round.bin b/modules/overloading/macros/%hm_round.bin
new file mode 100755
index 000000000..2189c00e1
--- /dev/null
+++ b/modules/overloading/macros/%hm_round.bin
Binary files differ
diff --git a/modules/overloading/macros/%hm_round.sci b/modules/overloading/macros/%hm_round.sci
new file mode 100755
index 000000000..9e32eea7c
--- /dev/null
+++ b/modules/overloading/macros/%hm_round.sci
@@ -0,0 +1,13 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function M=%hm_round(M)
+
+ M("entries")=round(M("entries"))
+endfunction
diff --git a/modules/overloading/macros/%hm_s.bin b/modules/overloading/macros/%hm_s.bin
new file mode 100755
index 000000000..7683d2ee3
--- /dev/null
+++ b/modules/overloading/macros/%hm_s.bin
Binary files differ
diff --git a/modules/overloading/macros/%hm_s.sci b/modules/overloading/macros/%hm_s.sci
new file mode 100755
index 000000000..344bdba87
--- /dev/null
+++ b/modules/overloading/macros/%hm_s.sci
@@ -0,0 +1,14 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function M1=%hm_s(M1)
+
+ // hypermatrix sign change
+ M1("entries")=-M1("entries")
+endfunction
diff --git a/modules/overloading/macros/%hm_s_hm.bin b/modules/overloading/macros/%hm_s_hm.bin
new file mode 100755
index 000000000..a25459350
--- /dev/null
+++ b/modules/overloading/macros/%hm_s_hm.bin
Binary files differ
diff --git a/modules/overloading/macros/%hm_s_hm.sci b/modules/overloading/macros/%hm_s_hm.sci
new file mode 100755
index 000000000..2b75e60aa
--- /dev/null
+++ b/modules/overloading/macros/%hm_s_hm.sci
@@ -0,0 +1,17 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function M1=%hm_s_hm(M1,M2)
+ // hypermatrix subtraction
+ //author Serge Steer
+ if or(M1("dims")<>M2("dims")) then
+ error(9)
+ end
+ M1("entries")=M1("entries")-M2("entries")
+endfunction
diff --git a/modules/overloading/macros/%hm_s_r.bin b/modules/overloading/macros/%hm_s_r.bin
new file mode 100755
index 000000000..afb7fcaec
--- /dev/null
+++ b/modules/overloading/macros/%hm_s_r.bin
Binary files differ
diff --git a/modules/overloading/macros/%hm_s_r.sci b/modules/overloading/macros/%hm_s_r.sci
new file mode 100755
index 000000000..ce821de38
--- /dev/null
+++ b/modules/overloading/macros/%hm_s_r.sci
@@ -0,0 +1,31 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+function f=%hm_s_r(m,f)
+ //f= m-f
+ //author Serge Steer INRIA
+ //!
+ [num,den]=f(["num","den"])
+ szf=size(den)
+ szm=size(m)
+
+ if and(szf>=0)&and(szm>=0) then
+ num=num(:);den=den(:);m=m(:)
+ if prod(szf)==1&prod(szm)>1 then
+ den=den(ones(m))
+ end
+ [num,den]=simp(-num+m.*den,den)
+ num=matrix(num,szf)
+ den=matrix(den,szf)
+ f=rlist(num,den,f.dt)
+ else
+ error(9)
+ end
+
+endfunction
+
diff --git a/modules/overloading/macros/%hm_s_s.bin b/modules/overloading/macros/%hm_s_s.bin
new file mode 100755
index 000000000..b97ab4bbb
--- /dev/null
+++ b/modules/overloading/macros/%hm_s_s.bin
Binary files differ
diff --git a/modules/overloading/macros/%hm_s_s.sci b/modules/overloading/macros/%hm_s_s.sci
new file mode 100755
index 000000000..4bd98400e
--- /dev/null
+++ b/modules/overloading/macros/%hm_s_s.sci
@@ -0,0 +1,26 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function M1=%hm_s_s(M1,M2)
+
+ // hypermatrix - scalar
+
+ if and(size(M2)==[1 1]) then
+ M1.entries=M1.entries-M2
+ else
+ dims1=matrix(M1.dims,-1,1)
+ dims2=size(M2)';
+ dims2(3:size(dims1,"*"))=1;
+ if and(dims1==dims2) then //should not occur
+ M1.entries=M1.entries-matrix(M2,-1,1)
+ else
+ error(9)
+ end
+ end
+endfunction
diff --git a/modules/overloading/macros/%hm_sign.bin b/modules/overloading/macros/%hm_sign.bin
new file mode 100755
index 000000000..aa45da44a
--- /dev/null
+++ b/modules/overloading/macros/%hm_sign.bin
Binary files differ
diff --git a/modules/overloading/macros/%hm_sign.sci b/modules/overloading/macros/%hm_sign.sci
new file mode 100755
index 000000000..d7473a174
--- /dev/null
+++ b/modules/overloading/macros/%hm_sign.sci
@@ -0,0 +1,13 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function M=%hm_sign(M)
+
+ M("entries")=sign(M("entries"))
+endfunction
diff --git a/modules/overloading/macros/%hm_sin.bin b/modules/overloading/macros/%hm_sin.bin
new file mode 100755
index 000000000..f916c325a
--- /dev/null
+++ b/modules/overloading/macros/%hm_sin.bin
Binary files differ
diff --git a/modules/overloading/macros/%hm_sin.sci b/modules/overloading/macros/%hm_sin.sci
new file mode 100755
index 000000000..08303c149
--- /dev/null
+++ b/modules/overloading/macros/%hm_sin.sci
@@ -0,0 +1,13 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function M=%hm_sin(M)
+
+ M("entries")=sin(M("entries"))
+endfunction
diff --git a/modules/overloading/macros/%hm_size.bin b/modules/overloading/macros/%hm_size.bin
new file mode 100755
index 000000000..aa3a3d908
--- /dev/null
+++ b/modules/overloading/macros/%hm_size.bin
Binary files differ
diff --git a/modules/overloading/macros/%hm_size.sci b/modules/overloading/macros/%hm_size.sci
new file mode 100755
index 000000000..47ee4ffd0
--- /dev/null
+++ b/modules/overloading/macros/%hm_size.sci
@@ -0,0 +1,54 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+// Copyright (C) INRIA - 2011 - Serge STEER
+// Copyright (C) DIGITEO - 2011 - Allan CORNET
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function varargout = %hm_size(M, job)
+
+ // returns dimensions of an hyper matrix
+ [lhs, rhs] = argn(0);
+ dims = matrix(double(M.dims), 1, -1);
+ if rhs == 2 then
+ if type(job) == 10 then
+ select job
+ case "*" then
+ varargout(1) = prod(dims);
+ case "r" then
+ varargout(1) = dims(1);
+ case "c" then
+ varargout(1) = dims(2);
+ else
+ error(msprintf(_("%s: Wrong value for input argument #%d: ''%s'', ''%s'' or ''%s'' expected.\n"), "size", 2, "r", "c", "*"))
+ end
+ return
+ elseif type(job) == 1 then
+ if (size(job,"*") > 1) | (job <= 0) then
+ error(msprintf(_("%s: Wrong value for input argument #%d: Scalar positive integer expected.\n"), "size", 2));
+ end
+ if job <= size(dims, "*") then
+ varargout(1) = dims(job);
+ else
+ varargout(1) = 1;
+ end
+ else
+ error(msprintf(_("%s: Wrong value for input argument #%d: Scalar positive integer or character string expected.\n"),"size", 2));
+ end
+ return
+ end
+ if lhs == 1 then
+ varargout(1) = matrix(dims, 1, -1);
+ else
+ if lhs > size(dims, "*") then
+ dims($+1:lhs) = 1;
+ end
+ for k = 1:lhs
+ varargout(k) = dims(k);
+ end
+ end
+endfunction
diff --git a/modules/overloading/macros/%hm_sqrt.bin b/modules/overloading/macros/%hm_sqrt.bin
new file mode 100755
index 000000000..49597f117
--- /dev/null
+++ b/modules/overloading/macros/%hm_sqrt.bin
Binary files differ
diff --git a/modules/overloading/macros/%hm_sqrt.sci b/modules/overloading/macros/%hm_sqrt.sci
new file mode 100755
index 000000000..a03c9ce0b
--- /dev/null
+++ b/modules/overloading/macros/%hm_sqrt.sci
@@ -0,0 +1,13 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function M=%hm_sqrt(M)
+
+ M("entries")=sqrt(M("entries"))
+endfunction
diff --git a/modules/overloading/macros/%hm_stdev.bin b/modules/overloading/macros/%hm_stdev.bin
new file mode 100755
index 000000000..c05e741a7
--- /dev/null
+++ b/modules/overloading/macros/%hm_stdev.bin
Binary files differ
diff --git a/modules/overloading/macros/%hm_stdev.sci b/modules/overloading/macros/%hm_stdev.sci
new file mode 100755
index 000000000..83545fd15
--- /dev/null
+++ b/modules/overloading/macros/%hm_stdev.sci
@@ -0,0 +1,66 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function x = %hm_stdev(m, d, ms)
+
+ if argn(2) < 3 then
+ ms = %f
+ end
+ if argn(2) == 3 & type(ms)~=1 & typeof(ms) ~= "hypermat" then
+ error(msprintf(_("%s: Wrong type for input argument #%d: A real matrix expected.\n"),"stdev",3));
+ end
+ if argn(2) == 1 | d == "*" then
+ if argn(2) == 3 then
+ x = stdev(m.entries, "*", ms);
+ else
+ x = stdev(m.entries, "*");
+ end
+ return
+ elseif d == "r" then
+ d = 1;
+ elseif d == "c" then
+ d = 2;
+ end
+ dims = double(m.dims);
+ if d > size(m,d) then
+ x = zeros(m);
+ return
+ end
+ N = size(dims, "*");
+ p1 = prod(dims(1:d-1));// step to build one vector on which stdev is applied
+ p2 = p1*dims(d);//step for beginning of next vectors
+ ind = (0:p1:p2-1)';// selection for building one vector
+ deb = (1:p1);
+ I = ind*ones(deb)+ones(ind)*deb;
+
+ ind = (0:p2:prod(dims)-1);
+ I = ones(ind).*.I+ind.*.ones(I);
+
+ if argn(2) == 3 then
+ if isscalar(ms) then
+ x = stdev(matrix(m.entries(I),dims(d),-1), 1, ms);
+ else
+ x = stdev(matrix(m.entries(I),dims(d),-1), 1, ms.entries');
+ end
+ else
+ x = stdev(matrix(m.entries(I),dims(d),-1), 1);
+ end
+ dims(d) = 1;
+ if d == N then
+ dims = dims(1:$)
+ else
+ dims(d) = 1
+ end
+ if size(dims, "*") == 2 then
+ x = matrix(x, dims(1), dims(2))
+ else
+ x = hypermat(dims, x)
+ end
+
+endfunction
diff --git a/modules/overloading/macros/%hm_string.bin b/modules/overloading/macros/%hm_string.bin
new file mode 100755
index 000000000..41089be70
--- /dev/null
+++ b/modules/overloading/macros/%hm_string.bin
Binary files differ
diff --git a/modules/overloading/macros/%hm_string.sci b/modules/overloading/macros/%hm_string.sci
new file mode 100755
index 000000000..ad3e4bd3d
--- /dev/null
+++ b/modules/overloading/macros/%hm_string.sci
@@ -0,0 +1,11 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+function a=%hm_string(a)
+ a.entries=string(a.entries)
+endfunction
diff --git a/modules/overloading/macros/%hm_sum.bin b/modules/overloading/macros/%hm_sum.bin
new file mode 100755
index 000000000..644e0fd5a
--- /dev/null
+++ b/modules/overloading/macros/%hm_sum.bin
Binary files differ
diff --git a/modules/overloading/macros/%hm_sum.sci b/modules/overloading/macros/%hm_sum.sci
new file mode 100755
index 000000000..95ccad5b2
--- /dev/null
+++ b/modules/overloading/macros/%hm_sum.sci
@@ -0,0 +1,103 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function a = %hm_sum(varargin)
+ a = varargin(1)
+ dims = size(a);
+ tm = type(a.entries)
+
+ nargs = size(varargin);
+ select nargs
+ case 1
+ d = 0;
+ if tm == 8 then
+ typ = "native";
+ else
+ typ = "double";
+ end
+ case 2
+ if or(varargin(2) == ["native", "double"]) then
+ d = 0;
+ typ = varargin(2);
+ else
+ d = varargin(2);
+ if tm == 8 then
+ typ = "native";
+ else
+ typ = "double";
+ end
+ end
+ case 3
+ d = varargin(2);
+ typ = varargin(3);
+ else
+ error(msprintf(_("%s: Wrong number of input argument(s): %d to %d expected.\n"),"sum", 1, 3));
+ end
+
+ // Check second argument : d
+ select type(d)
+ case 1
+ if size(d,'*') <> 1 then
+ error(msprintf(_("%s: Wrong size for input argument #%d: A scalar expected.\n"),"sum", 2))
+ end
+ if int(d) <> d | d < 0 then
+ error(msprintf(_("%s: Wrong value for input argument #%d: Integer >= %d expected.\n"),"sum", 2, 1))
+ end
+ case 10
+ if size(d,'*') <> 1 then
+ error(msprintf(_("%s: Wrong size for input argument #%d: A string expected.\n"),"sum",2))
+ end
+ if and(d<>["r","c","*","m"]) then
+ error(msprintf(_("%s: Wrong value for input argument #%d: Must be in the set {%s}.\n"),..
+ "sum",2,"""*"",""r"",""c"",""m"""))
+ end
+ pos=[1,2,0,find(dims>1,1)];
+ d=pos(find(d==["r","c","*","m"]))
+ else
+ error(msprintf(_("%s: Wrong type for input argument #%d: A string or scalar expected.\n"),"sum",2))
+ end
+
+ // Check third argument
+ if type(typ)<>10 then
+ error(msprintf(_("%s: Wrong type for input argument #%d: A string expected.\n"),"sum",3))
+ end
+
+ if size(typ,"*")<>1 then
+ error(msprintf(_("%s: Wrong size for input argument #%d: A string expected.\n"),"sum",3))
+ end
+
+ if and(typ <> ["native" "double"]) then
+ error(msprintf(_("%s: Wrong value for input argument #%d: ""%s"" or ""%s"" expected.\n"),"sum", 3, "native", "double"));
+ end
+
+ if d == 0 then // '*'
+ a=sum(a.entries, "*", typ), dims;
+ elseif d > size(dims,"*") then
+ //requested summation direction exceeds array dims, return the array, converted
+ //to double if necessary.
+ if typ == "double" & or(tm == [4 8]) then
+ a.entries=double(a.entries),
+ end
+ a=a
+ else
+ //permute the array dimension to put the selected dimension first
+ p=1:size(dims,"*");
+ p([1,d])=p([d,1]);
+ a=matrix(permute(a,p),dims(d),-1)
+ a=sum(a,1,typ);
+ //permute back
+ if d==size(dims, "*") then
+ dims=dims(1:$-1)
+ p(1) = []
+ else
+ dims(d)=1
+ end
+ a=permute(matrix(a,dims(p)),p)
+ end
+endfunction
diff --git a/modules/overloading/macros/%hm_x_hm.bin b/modules/overloading/macros/%hm_x_hm.bin
new file mode 100755
index 000000000..9ba5eb8af
--- /dev/null
+++ b/modules/overloading/macros/%hm_x_hm.bin
Binary files differ
diff --git a/modules/overloading/macros/%hm_x_hm.sci b/modules/overloading/macros/%hm_x_hm.sci
new file mode 100755
index 000000000..7855378cd
--- /dev/null
+++ b/modules/overloading/macros/%hm_x_hm.sci
@@ -0,0 +1,17 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function M2=%hm_x_hm(M1,M2)
+
+ if and(M1("dims")==M2("dims")) then
+ M2("entries")=M1("entries").*M2("entries")
+ else
+ error(msprintf(_("%s: Inconsistent element-wise operation.\n"),"%hm_x_hm"));
+ end
+endfunction
diff --git a/modules/overloading/macros/%hm_x_p.bin b/modules/overloading/macros/%hm_x_p.bin
new file mode 100755
index 000000000..35e6edbde
--- /dev/null
+++ b/modules/overloading/macros/%hm_x_p.bin
Binary files differ
diff --git a/modules/overloading/macros/%hm_x_p.sci b/modules/overloading/macros/%hm_x_p.sci
new file mode 100755
index 000000000..afec5d033
--- /dev/null
+++ b/modules/overloading/macros/%hm_x_p.sci
@@ -0,0 +1,17 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function M1=%hm_x_p(M1,M2)
+ //author Serge Steer
+ if size(M2,"*")<>1 then
+ error(msprintf(_("%s: Inconsistent element-wise operation.\n"),"%hm_x_p"));
+ else
+ M1.entries=M1.entries.*M2
+ end
+endfunction
diff --git a/modules/overloading/macros/%hm_x_s.bin b/modules/overloading/macros/%hm_x_s.bin
new file mode 100755
index 000000000..b7e6ee09c
--- /dev/null
+++ b/modules/overloading/macros/%hm_x_s.bin
Binary files differ
diff --git a/modules/overloading/macros/%hm_x_s.sci b/modules/overloading/macros/%hm_x_s.sci
new file mode 100755
index 000000000..4bd9c6477
--- /dev/null
+++ b/modules/overloading/macros/%hm_x_s.sci
@@ -0,0 +1,17 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function M1=%hm_x_s(M1,M2)
+ //author Serge Steer
+ if size(M2,"*")<>1 then
+ error(msprintf(_("%s: Inconsistent element-wise operation.\n"),"%hm_x_s"));
+ else
+ M1.entries=M1.entries.*M2
+ end
+endfunction
diff --git a/modules/overloading/macros/%hm_zeros.bin b/modules/overloading/macros/%hm_zeros.bin
new file mode 100755
index 000000000..005a27143
--- /dev/null
+++ b/modules/overloading/macros/%hm_zeros.bin
Binary files differ
diff --git a/modules/overloading/macros/%hm_zeros.sci b/modules/overloading/macros/%hm_zeros.sci
new file mode 100755
index 000000000..21d288454
--- /dev/null
+++ b/modules/overloading/macros/%hm_zeros.sci
@@ -0,0 +1,37 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function M=%hm_zeros(varargin)
+
+ //creates a zero hypermatrix with shape given by vector of dimensions or an
+ //hypermatrix
+ nv=size(varargin)
+ if nv==1 then
+ M=varargin(1)
+ if type(M)==1 then
+ dims=M
+ else
+ dims=M("dims")
+ end
+ M=hypermat(dims,zeros(prod(double(dims)),1))
+ else
+ dims=ones(1,nv)
+ for k=1:nv,dims(k)=int(varargin(k)),end
+ //remove highest singleton dimensions
+ ks=find(dims==1);
+ ns=size(ks,"*");
+ while ns>0&nv>2&ks(ns)==nv then ns=ns-1,nv=nv-1,end
+ if nv==2 then
+ M=zeros(varargin(1:nv))
+ else
+ M=hypermat(dims(1:nv),zeros(prod(dims(1:nv)),1))
+ end
+
+ end
+endfunction
diff --git a/modules/overloading/macros/%i_a_i.bin b/modules/overloading/macros/%i_a_i.bin
new file mode 100755
index 000000000..4ca8d22c6
--- /dev/null
+++ b/modules/overloading/macros/%i_a_i.bin
Binary files differ
diff --git a/modules/overloading/macros/%i_a_i.sci b/modules/overloading/macros/%i_a_i.sci
new file mode 100755
index 000000000..78a64f42d
--- /dev/null
+++ b/modules/overloading/macros/%i_a_i.sci
@@ -0,0 +1,19 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function i1=%i_a_i(i1,i2)
+ t1=inttype(i1); t2=inttype(i2);
+ //logical promotions
+ if t1<10 & t2<10 then t=max(t1,t2); end
+ if t1>10 & t2>10 then t=max(t1,t2); end
+ //more arbitrary promotions
+ if t1<10 & t2>10 then t=max(t1+10,t2); end
+ if t1>10 & t2<10 then t=max(t1,t2+10); end
+ i1=iconvert(i1,t)+iconvert(i2,t)
+endfunction
diff --git a/modules/overloading/macros/%i_and.bin b/modules/overloading/macros/%i_and.bin
new file mode 100755
index 000000000..39996b57c
--- /dev/null
+++ b/modules/overloading/macros/%i_and.bin
Binary files differ
diff --git a/modules/overloading/macros/%i_and.sci b/modules/overloading/macros/%i_and.sci
new file mode 100755
index 000000000..efcf3004b
--- /dev/null
+++ b/modules/overloading/macros/%i_and.sci
@@ -0,0 +1,21 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function x=%i_and(a,flag)
+ // or(a) returns the logical OR
+ // for scalar matrices, an entry is TRUE if it is not zero.
+ //!
+
+ if argn(2)==1 then flag="*",end
+ if flag=="*" then
+ x=find(a==0,1)==[]
+ else
+ x=sum(bool2s(a<>0),flag)==size(a,flag)
+ end
+endfunction
diff --git a/modules/overloading/macros/%i_ascii.bin b/modules/overloading/macros/%i_ascii.bin
new file mode 100755
index 000000000..57fd8d0b1
--- /dev/null
+++ b/modules/overloading/macros/%i_ascii.bin
Binary files differ
diff --git a/modules/overloading/macros/%i_ascii.sci b/modules/overloading/macros/%i_ascii.sci
new file mode 100755
index 000000000..e79e852ba
--- /dev/null
+++ b/modules/overloading/macros/%i_ascii.sci
@@ -0,0 +1,16 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function x=%i_ascii(x)
+ if type(x)==10
+ x=int32(ascii(x))
+ else
+ x=ascii(double(x))
+ end
+endfunction
diff --git a/modules/overloading/macros/%i_b_s.bin b/modules/overloading/macros/%i_b_s.bin
new file mode 100755
index 000000000..7df80cd41
--- /dev/null
+++ b/modules/overloading/macros/%i_b_s.bin
Binary files differ
diff --git a/modules/overloading/macros/%i_b_s.sci b/modules/overloading/macros/%i_b_s.sci
new file mode 100755
index 000000000..7b10dea7e
--- /dev/null
+++ b/modules/overloading/macros/%i_b_s.sci
@@ -0,0 +1,25 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function r=%i_b_s(varargin)
+ //a:b where a is int and b double
+ //a:b:c where a is int, b double and c every type
+ if round(varargin(1))<>varargin(1) then
+ error(msprintf(_("%s: Wrong type for input argument #%d: integer values expected.\n"),"%i_b_s",1));
+ end
+ if size(varargin)==2 then //a:b
+ it=inttype(varargin(1))
+ r=varargin(1):iconvert(varargin(2),it)
+ else
+ it=inttype(varargin(1))
+ r=varargin(1):iconvert(varargin(2),it):iconvert(varargin(3),it)
+ end
+endfunction
+
+
diff --git a/modules/overloading/macros/%i_bezout.bin b/modules/overloading/macros/%i_bezout.bin
new file mode 100755
index 000000000..daa6ece5c
--- /dev/null
+++ b/modules/overloading/macros/%i_bezout.bin
Binary files differ
diff --git a/modules/overloading/macros/%i_bezout.sci b/modules/overloading/macros/%i_bezout.sci
new file mode 100755
index 000000000..5563452f8
--- /dev/null
+++ b/modules/overloading/macros/%i_bezout.sci
@@ -0,0 +1,32 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function [g,u] = %i_bezout(a,b)
+ // g = bezout(a,b) is the greatest common divisor of a and b.
+ // a and b must contain non-negative integer scalars.
+ // [g,U] = bezout(a,b) also returns a (2x2) unimodular matrix U such that:
+ // [a,b]*U = [g,0].
+ // These are useful for solving Diophantine equations and computing
+ // Hermite transformations.
+
+ it=max(inttype(a),inttype(b))
+ a=iconvert(a,it);b=iconvert(b,it)
+ u = [iconvert([1 0],it) a];
+ v = [iconvert([0 1],it) b];
+ zero=iconvert(0,it)
+ while v(3)<>zero
+ q = u(3)/v(3);
+ t = u - v*q;
+ u = v;
+ v = t;
+ end
+ g = u(3);
+ u=[u(1) -v(1);u(2) -v(2)]
+
+endfunction
diff --git a/modules/overloading/macros/%i_d_i.bin b/modules/overloading/macros/%i_d_i.bin
new file mode 100755
index 000000000..e40510ecd
--- /dev/null
+++ b/modules/overloading/macros/%i_d_i.bin
Binary files differ
diff --git a/modules/overloading/macros/%i_d_i.sci b/modules/overloading/macros/%i_d_i.sci
new file mode 100755
index 000000000..b5002e065
--- /dev/null
+++ b/modules/overloading/macros/%i_d_i.sci
@@ -0,0 +1,19 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function i1=%i_d_i(i1,i2)
+ t1=inttype(i1); t2=inttype(i2);
+ //logical promotions
+ if t1<10 & t2<10 then t=max(t1,t2); end
+ if t1>10 & t2>10 then t=max(t1,t2); end
+ //more arbitrary promotions
+ if t1<10 & t2>10 then t=max(t1+10,t2); end
+ if t1>10 & t2<10 then t=max(t1,t2+10); end
+ i1=iconvert(i1,t) ./ iconvert(i2,t)
+endfunction
diff --git a/modules/overloading/macros/%i_dsearch.bin b/modules/overloading/macros/%i_dsearch.bin
new file mode 100755
index 000000000..a108e599e
--- /dev/null
+++ b/modules/overloading/macros/%i_dsearch.bin
Binary files differ
diff --git a/modules/overloading/macros/%i_dsearch.sci b/modules/overloading/macros/%i_dsearch.sci
new file mode 100755
index 000000000..f971ef03a
--- /dev/null
+++ b/modules/overloading/macros/%i_dsearch.sci
@@ -0,0 +1,18 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2013 - Scilab Enterprises - Charlotte HECQUET
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+
+function [ind, occ, info] = %i_dsearch(H, r, flag)
+ if argn(2)<3 then
+ flag = "c";
+ end
+ H = iconvert(H, 0);
+ r = iconvert(r, 0);
+ [ind, occ, info] = dsearch(H, r, flag);
+endfunction
diff --git a/modules/overloading/macros/%i_e.bin b/modules/overloading/macros/%i_e.bin
new file mode 100755
index 000000000..582b5b16d
--- /dev/null
+++ b/modules/overloading/macros/%i_e.bin
Binary files differ
diff --git a/modules/overloading/macros/%i_e.sci b/modules/overloading/macros/%i_e.sci
new file mode 100755
index 000000000..310e1504a
--- /dev/null
+++ b/modules/overloading/macros/%i_e.sci
@@ -0,0 +1,33 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function f=%i_e(varargin)
+ //A(i,j,k,..)
+
+ rhs=size(varargin)
+ M=varargin(rhs)
+
+ nind=rhs-1
+ dims=[]
+ for k=3:nind
+ ind=varargin(k)
+ if type(ind)==2|type(ind)==129 then ind=horner(ind,1),end
+ if type(ind)==4 then ind=find(ind),end
+ if or(ind<>1) then error(21),end
+ n=size(ind,"*")
+ dims=[dims,n]
+ end
+ f=M(varargin(1:min(2,rhs-1)))
+ k=find(dims>1)
+ if k<>[] then
+ dims(k($)+1:$)=[]
+ N=prod(dims)
+ f=mlist(["hm","dims","entries"],int32([size(f) dims]),int32(ones(N,1)).*.f(:))
+ end
+endfunction
diff --git a/modules/overloading/macros/%i_g_i.bin b/modules/overloading/macros/%i_g_i.bin
new file mode 100755
index 000000000..0385a46a7
--- /dev/null
+++ b/modules/overloading/macros/%i_g_i.bin
Binary files differ
diff --git a/modules/overloading/macros/%i_g_i.sci b/modules/overloading/macros/%i_g_i.sci
new file mode 100755
index 000000000..ba4e87864
--- /dev/null
+++ b/modules/overloading/macros/%i_g_i.sci
@@ -0,0 +1,19 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function i1=%i_g_i(i1,i2)
+ t1=inttype(i1); t2=inttype(i2);
+ //logical promotions
+ if t1<10 & t2<10 then t=max(t1,t2); end
+ if t1>10 & t2>10 then t=max(t1,t2); end
+ //more arbitrary promotions
+ if t1<10 & t2>10 then t=max(t1+10,t2); end
+ if t1>10 & t2<10 then t=max(t1,t2+10); end
+ i1=iconvert(i1,t) | iconvert(i2,t)
+endfunction
diff --git a/modules/overloading/macros/%i_gcd.bin b/modules/overloading/macros/%i_gcd.bin
new file mode 100755
index 000000000..1fc3097b3
--- /dev/null
+++ b/modules/overloading/macros/%i_gcd.bin
Binary files differ
diff --git a/modules/overloading/macros/%i_gcd.sci b/modules/overloading/macros/%i_gcd.sci
new file mode 100755
index 000000000..97b682f8e
--- /dev/null
+++ b/modules/overloading/macros/%i_gcd.sci
@@ -0,0 +1,40 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function [x,uu]=%i_gcd(p)
+ //Given a polynomial vector p, [pgcd,u]=gcd(p) computes the gcd
+ //of components and a unimodular matrix (with polynomial inverse) u,
+ //with minimal degree such that [p1 p2]*u=[0 ... 0 pgcd]
+ //!
+
+ [lhs,rhs]=argn(0)
+ [m,n]=size(p);it=inttype(p)
+ mn=m*n
+ p=matrix(p,1,mn)
+ x=p(1);
+ uu=iconvert(1,it)
+ for l=2:mn,
+ [x,u]=bezout(x,p(l)),
+ if lhs==2 then
+ uu=[uu(:,1:l-2) uu(:,l-1)*u(1,[2 1])];uu(l,l-1:l)=u(2,[2 1]);
+ end
+ end,
+ if lhs==1 then return,end
+ for l=mn:-1:2
+ pivot=uu(l,l-1);
+ for k=l:mn
+ q=uu(l,k)/pivot
+ r=uu(l,k)-q*pivot
+ if q<>iconvert(0,it) then
+ uu(1:l-1,k)=uu(1:l-1,k)-q*uu(1:l-1,l-1)
+ uu(l,k)=r;
+ end
+ end
+ end
+endfunction
diff --git a/modules/overloading/macros/%i_h_i.bin b/modules/overloading/macros/%i_h_i.bin
new file mode 100755
index 000000000..a418d37b5
--- /dev/null
+++ b/modules/overloading/macros/%i_h_i.bin
Binary files differ
diff --git a/modules/overloading/macros/%i_h_i.sci b/modules/overloading/macros/%i_h_i.sci
new file mode 100755
index 000000000..087e7cca7
--- /dev/null
+++ b/modules/overloading/macros/%i_h_i.sci
@@ -0,0 +1,19 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function i1=%i_h_i(i1,i2)
+ t1=inttype(i1); t2=inttype(i2);
+ //logical promotions
+ if t1<10 & t2<10 then t=max(t1,t2); end
+ if t1>10 & t2>10 then t=max(t1,t2); end
+ //more arbitrary promotions
+ if t1<10 & t2>10 then t=max(t1+10,t2); end
+ if t1>10 & t2<10 then t=max(t1,t2+10); end
+ i1=iconvert(i1,t) & iconvert(i2,t)
+endfunction
diff --git a/modules/overloading/macros/%i_i_ce.bin b/modules/overloading/macros/%i_i_ce.bin
new file mode 100755
index 000000000..11b287810
--- /dev/null
+++ b/modules/overloading/macros/%i_i_ce.bin
Binary files differ
diff --git a/modules/overloading/macros/%i_i_ce.sci b/modules/overloading/macros/%i_i_ce.sci
new file mode 100755
index 000000000..d86ecf8fb
--- /dev/null
+++ b/modules/overloading/macros/%i_i_ce.sci
@@ -0,0 +1,14 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA - Vincent Couvert
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function M=%i_i_ce(varargin)
+
+ // Insertion of an integer matrix in a cell
+ M=generic_i_ce(varargin(:))
+endfunction
diff --git a/modules/overloading/macros/%i_i_h.bin b/modules/overloading/macros/%i_i_h.bin
new file mode 100755
index 000000000..71090326d
--- /dev/null
+++ b/modules/overloading/macros/%i_i_h.bin
Binary files differ
diff --git a/modules/overloading/macros/%i_i_h.sci b/modules/overloading/macros/%i_i_h.sci
new file mode 100755
index 000000000..c63fbc2eb
--- /dev/null
+++ b/modules/overloading/macros/%i_i_h.sci
@@ -0,0 +1,16 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function h=%i_i_h(i,v,h)
+ h=generic_i_h(i,v,h)
+endfunction
+
+
+
+
diff --git a/modules/overloading/macros/%i_i_hm.bin b/modules/overloading/macros/%i_i_hm.bin
new file mode 100755
index 000000000..ccfcd89e0
--- /dev/null
+++ b/modules/overloading/macros/%i_i_hm.bin
Binary files differ
diff --git a/modules/overloading/macros/%i_i_hm.sci b/modules/overloading/macros/%i_i_hm.sci
new file mode 100755
index 000000000..48df2ffc8
--- /dev/null
+++ b/modules/overloading/macros/%i_i_hm.sci
@@ -0,0 +1,15 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function M=%i_i_hm(varargin)
+
+ //insertion of an integer matrix in an hypermatrix
+ N=varargin($-1)
+ M=generic_i_hm(iconvert(0,inttype(N(1))),varargin(:))
+endfunction
diff --git a/modules/overloading/macros/%i_i_i.bin b/modules/overloading/macros/%i_i_i.bin
new file mode 100755
index 000000000..86b3a2782
--- /dev/null
+++ b/modules/overloading/macros/%i_i_i.bin
Binary files differ
diff --git a/modules/overloading/macros/%i_i_i.sci b/modules/overloading/macros/%i_i_i.sci
new file mode 100755
index 000000000..a466a7023
--- /dev/null
+++ b/modules/overloading/macros/%i_i_i.sci
@@ -0,0 +1,27 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 1998-2011 - INRIA - Serge Steer
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function M=%i_i_i(varargin)
+ //- insertion of an integer matrix in an matrix of integers
+ // for more than 2 indices
+ // -insertion an integer matrix in an integer matrix which has a
+ // different integer type
+ rhs=argn(2)
+ M=varargin(rhs)
+ it=inttype(M)
+ M=mlist(["hm","dims","entries"],int32(size(M)),M(:))
+ varargin(rhs)=M;
+
+ if it<>inttype(varargin(rhs-1)) then
+ //different integer types (should be hard coded)
+ varargin(rhs-1)=iconvert(varargin(rhs-1),it)
+ end
+
+ M=generic_i_hm(iconvert(0,it),varargin(:))
+endfunction
diff --git a/modules/overloading/macros/%i_i_s.bin b/modules/overloading/macros/%i_i_s.bin
new file mode 100755
index 000000000..fa7dfd88b
--- /dev/null
+++ b/modules/overloading/macros/%i_i_s.bin
Binary files differ
diff --git a/modules/overloading/macros/%i_i_s.sci b/modules/overloading/macros/%i_i_s.sci
new file mode 100755
index 000000000..7b30945d9
--- /dev/null
+++ b/modules/overloading/macros/%i_i_s.sci
@@ -0,0 +1,46 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function M=%i_i_s(varargin)
+ //insertion of an integer matrix in an matrix of double
+
+
+ rhs=argn(2)
+ index=varargin(1)
+
+ if rhs==3&(type(index)==10|type(index)==15) then //struct or cell creation
+ N=varargin(rhs-1)//inserted matrix
+ M=createstruct(index,N)
+ if type(index(1))<>10 & index(2)=="entries" then
+ // change struct to cell
+ f=getfield(1,M);f(1)="ce"
+ setfield(1,f,M)
+ end
+ elseif rhs>4 then//more than 2 indices: insertion of an integer in a matrix of numbers
+ M=varargin($)
+ if M<>[] then
+ varargin($-1)=double(varargin($-1)),
+ def=0;
+ else
+ def=iconvert(0,inttype(varargin($-1)))
+ end
+ M=mlist(["hm","dims","entries"],int32(size(M)),M(:))
+ varargin($)=M;
+ M=generic_i_hm(def,varargin(:))
+ else //type conversion
+ M=varargin($)
+ if M==[] then
+ N=varargin($-1)
+ M=iconvert(0,inttype(N))
+ M(varargin(1:$-2))=varargin($-1)
+ else
+ M(varargin(1:$-2))=double(varargin($-1))
+ end
+ end
+endfunction
diff --git a/modules/overloading/macros/%i_i_st.bin b/modules/overloading/macros/%i_i_st.bin
new file mode 100755
index 000000000..365dcbacb
--- /dev/null
+++ b/modules/overloading/macros/%i_i_st.bin
Binary files differ
diff --git a/modules/overloading/macros/%i_i_st.sci b/modules/overloading/macros/%i_i_st.sci
new file mode 100755
index 000000000..780e06496
--- /dev/null
+++ b/modules/overloading/macros/%i_i_st.sci
@@ -0,0 +1,12 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function out=%i_i_st(i,in,out)
+ out=generic_i_st(i,in,out)
+endfunction
diff --git a/modules/overloading/macros/%i_lcm.bin b/modules/overloading/macros/%i_lcm.bin
new file mode 100755
index 000000000..b3ad47e07
--- /dev/null
+++ b/modules/overloading/macros/%i_lcm.bin
Binary files differ
diff --git a/modules/overloading/macros/%i_lcm.sci b/modules/overloading/macros/%i_lcm.sci
new file mode 100755
index 000000000..a16653148
--- /dev/null
+++ b/modules/overloading/macros/%i_lcm.sci
@@ -0,0 +1,24 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA - Serge Steer
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function [q,fact]=%i_lcm(p)
+ //p=lcm(p) computes the lcm of polynomial vector p
+ //[pp,fact]=lcm(p) computes besides the vector fact of factors
+ //such that p.*fact=pp*ones(p)
+ //!
+
+ k=find(p==0)
+ if k<>[] then q=p(k(1)),fact=0*ones(p),fact(k)=1,return,end
+
+ q=p(1);
+ for k=2:size(p,"*")
+ q=q/%i_gcd([q,p(k)])*p(k);
+ end
+ fact=q./p
+endfunction
diff --git a/modules/overloading/macros/%i_length.bin b/modules/overloading/macros/%i_length.bin
new file mode 100755
index 000000000..3c5e0fba0
--- /dev/null
+++ b/modules/overloading/macros/%i_length.bin
Binary files differ
diff --git a/modules/overloading/macros/%i_length.sci b/modules/overloading/macros/%i_length.sci
new file mode 100755
index 000000000..82318e2ae
--- /dev/null
+++ b/modules/overloading/macros/%i_length.sci
@@ -0,0 +1,12 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function l=%i_length(ia)
+ l=prod(size(ia))
+endfunction
diff --git a/modules/overloading/macros/%i_m_i.bin b/modules/overloading/macros/%i_m_i.bin
new file mode 100755
index 000000000..d8baeff49
--- /dev/null
+++ b/modules/overloading/macros/%i_m_i.bin
Binary files differ
diff --git a/modules/overloading/macros/%i_m_i.sci b/modules/overloading/macros/%i_m_i.sci
new file mode 100755
index 000000000..b2a9c2a2f
--- /dev/null
+++ b/modules/overloading/macros/%i_m_i.sci
@@ -0,0 +1,19 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function i1=%i_m_i(i1,i2)
+ t1=inttype(i1); t2=inttype(i2);
+ //logical promotions
+ if t1<10 & t2<10 then t=max(t1,t2); end
+ if t1>10 & t2>10 then t=max(t1,t2); end
+ //more arbitrary promotions
+ if t1<10 & t2>10 then t=max(t1+10,t2); end
+ if t1>10 & t2<10 then t=max(t1,t2+10); end
+ i1=iconvert(i1,t) * iconvert(i2,t)
+endfunction
diff --git a/modules/overloading/macros/%i_or.bin b/modules/overloading/macros/%i_or.bin
new file mode 100755
index 000000000..7df478614
--- /dev/null
+++ b/modules/overloading/macros/%i_or.bin
Binary files differ
diff --git a/modules/overloading/macros/%i_or.sci b/modules/overloading/macros/%i_or.sci
new file mode 100755
index 000000000..074e84adf
--- /dev/null
+++ b/modules/overloading/macros/%i_or.sci
@@ -0,0 +1,21 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function x=%i_or(a,flag)
+ // or(a) returns the logical OR
+ // for scalar matrices, an entry is TRUE if it is not zero.
+ //!
+
+ if argn(2)==1 then flag="*",end
+ if flag=="*" then
+ x=find(a<>0,1)<>[]
+ else
+ x=sum(bool2s(a<>0),flag)>=1
+ end
+endfunction
diff --git a/modules/overloading/macros/%i_r_i.bin b/modules/overloading/macros/%i_r_i.bin
new file mode 100755
index 000000000..be33e005b
--- /dev/null
+++ b/modules/overloading/macros/%i_r_i.bin
Binary files differ
diff --git a/modules/overloading/macros/%i_r_i.sci b/modules/overloading/macros/%i_r_i.sci
new file mode 100755
index 000000000..ae3d5bcc7
--- /dev/null
+++ b/modules/overloading/macros/%i_r_i.sci
@@ -0,0 +1,19 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function i1=%i_r_i(i1,i2)
+ t1=inttype(i1); t2=inttype(i2);
+ //logical promotions
+ if t1<10 & t2<10 then t=max(t1,t2); end
+ if t1>10 & t2>10 then t=max(t1,t2); end
+ //more arbitrary promotions
+ if t1<10 & t2>10 then t=max(t1+10,t2); end
+ if t1>10 & t2<10 then t=max(t1,t2+10); end
+ i1=iconvert(i1,t) / iconvert(i2,t)
+endfunction
diff --git a/modules/overloading/macros/%i_round.bin b/modules/overloading/macros/%i_round.bin
new file mode 100755
index 000000000..a9885cf54
--- /dev/null
+++ b/modules/overloading/macros/%i_round.bin
Binary files differ
diff --git a/modules/overloading/macros/%i_round.sci b/modules/overloading/macros/%i_round.sci
new file mode 100755
index 000000000..6ddfe4e42
--- /dev/null
+++ b/modules/overloading/macros/%i_round.sci
@@ -0,0 +1,11 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function x=%i_round(x)
+endfunction
diff --git a/modules/overloading/macros/%i_s_i.bin b/modules/overloading/macros/%i_s_i.bin
new file mode 100755
index 000000000..30c705cf0
--- /dev/null
+++ b/modules/overloading/macros/%i_s_i.bin
Binary files differ
diff --git a/modules/overloading/macros/%i_s_i.sci b/modules/overloading/macros/%i_s_i.sci
new file mode 100755
index 000000000..56ca716cd
--- /dev/null
+++ b/modules/overloading/macros/%i_s_i.sci
@@ -0,0 +1,19 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function i1=%i_s_i(i1,i2)
+ t1=inttype(i1); t2=inttype(i2);
+ //logical promotions
+ if t1<10 & t2<10 then t=max(t1,t2); end
+ if t1>10 & t2>10 then t=max(t1,t2); end
+ //more arbitrary promotions
+ if t1<10 & t2>10 then t=max(t1+10,t2); end
+ if t1>10 & t2<10 then t=max(t1,t2+10); end
+ i1=iconvert(i1,t)-iconvert(i2,t)
+endfunction
diff --git a/modules/overloading/macros/%i_x_i.bin b/modules/overloading/macros/%i_x_i.bin
new file mode 100755
index 000000000..420dfbf2c
--- /dev/null
+++ b/modules/overloading/macros/%i_x_i.bin
Binary files differ
diff --git a/modules/overloading/macros/%i_x_i.sci b/modules/overloading/macros/%i_x_i.sci
new file mode 100755
index 000000000..4e2d97a64
--- /dev/null
+++ b/modules/overloading/macros/%i_x_i.sci
@@ -0,0 +1,19 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function i1=%i_x_i(i1,i2)
+ t1=inttype(i1); t2=inttype(i2);
+ //logical promotions
+ if t1<10 & t2<10 then t=max(t1,t2); end
+ if t1>10 & t2>10 then t=max(t1,t2); end
+ //more arbitrary promotions
+ if t1<10 & t2>10 then t=max(t1+10,t2); end
+ if t1>10 & t2<10 then t=max(t1,t2+10); end
+ i1=iconvert(i1,t) .* iconvert(i2,t)
+endfunction
diff --git a/modules/overloading/macros/%ip_a_s.bin b/modules/overloading/macros/%ip_a_s.bin
new file mode 100755
index 000000000..a90d97104
--- /dev/null
+++ b/modules/overloading/macros/%ip_a_s.bin
Binary files differ
diff --git a/modules/overloading/macros/%ip_a_s.sci b/modules/overloading/macros/%ip_a_s.sci
new file mode 100755
index 000000000..a8b0afb25
--- /dev/null
+++ b/modules/overloading/macros/%ip_a_s.sci
@@ -0,0 +1,14 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function r=%ip_a_s(ip,s)
+ // ip+s
+ if size(s,"*")<>1 then error(10),end
+ r=(ip(1)+s):(ip(2)+s):(ip(3)+s)
+endfunction
diff --git a/modules/overloading/macros/%ip_i_st.bin b/modules/overloading/macros/%ip_i_st.bin
new file mode 100755
index 000000000..e4472fd2a
--- /dev/null
+++ b/modules/overloading/macros/%ip_i_st.bin
Binary files differ
diff --git a/modules/overloading/macros/%ip_i_st.sci b/modules/overloading/macros/%ip_i_st.sci
new file mode 100755
index 000000000..38161382b
--- /dev/null
+++ b/modules/overloading/macros/%ip_i_st.sci
@@ -0,0 +1,12 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function out=%ip_i_st(i,in,out)
+ out=generic_i_st(i,in,out)
+endfunction
diff --git a/modules/overloading/macros/%ip_m_s.bin b/modules/overloading/macros/%ip_m_s.bin
new file mode 100755
index 000000000..82d96b052
--- /dev/null
+++ b/modules/overloading/macros/%ip_m_s.bin
Binary files differ
diff --git a/modules/overloading/macros/%ip_m_s.sci b/modules/overloading/macros/%ip_m_s.sci
new file mode 100755
index 000000000..de86ff2d5
--- /dev/null
+++ b/modules/overloading/macros/%ip_m_s.sci
@@ -0,0 +1,14 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function r=%ip_m_s(ip,s)
+ // ip*s
+ if size(s,"*")<>1 then error(10),end
+ r=(ip(1)*s):(ip(2)*s):(ip(3)*s)
+endfunction
diff --git a/modules/overloading/macros/%ip_n_ip.bin b/modules/overloading/macros/%ip_n_ip.bin
new file mode 100755
index 000000000..b41969a3e
--- /dev/null
+++ b/modules/overloading/macros/%ip_n_ip.bin
Binary files differ
diff --git a/modules/overloading/macros/%ip_n_ip.sci b/modules/overloading/macros/%ip_n_ip.sci
new file mode 100755
index 000000000..25bcb1a0c
--- /dev/null
+++ b/modules/overloading/macros/%ip_n_ip.sci
@@ -0,0 +1,12 @@
+
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+function r=%ip_n_ip(l1,l2)
+ r=l1(1)<>l2(1)|l1(2)<>l2(2)|l1(3)<>l2(3)
+endfunction
diff --git a/modules/overloading/macros/%ip_o_ip.bin b/modules/overloading/macros/%ip_o_ip.bin
new file mode 100755
index 000000000..ca7c85b3a
--- /dev/null
+++ b/modules/overloading/macros/%ip_o_ip.bin
Binary files differ
diff --git a/modules/overloading/macros/%ip_o_ip.sci b/modules/overloading/macros/%ip_o_ip.sci
new file mode 100755
index 000000000..0abd47064
--- /dev/null
+++ b/modules/overloading/macros/%ip_o_ip.sci
@@ -0,0 +1,12 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function r=%ip_o_ip(l1,l2)
+ r=l1(1)==l2(1)&l1(2)==l2(2)&l1(3)==l2(3)
+endfunction
diff --git a/modules/overloading/macros/%ip_p.bin b/modules/overloading/macros/%ip_p.bin
new file mode 100755
index 000000000..5d6ea8e9e
--- /dev/null
+++ b/modules/overloading/macros/%ip_p.bin
Binary files differ
diff --git a/modules/overloading/macros/%ip_p.sci b/modules/overloading/macros/%ip_p.sci
new file mode 100755
index 000000000..9a2b8ae5a
--- /dev/null
+++ b/modules/overloading/macros/%ip_p.sci
@@ -0,0 +1,12 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function %ip_p(x)
+ disp(sci2exp(x(1),0)+":"+sci2exp(x(2),0)+":"+sci2exp(x(3),0))
+endfunction
diff --git a/modules/overloading/macros/%ip_s_s.bin b/modules/overloading/macros/%ip_s_s.bin
new file mode 100755
index 000000000..6407e3c13
--- /dev/null
+++ b/modules/overloading/macros/%ip_s_s.bin
Binary files differ
diff --git a/modules/overloading/macros/%ip_s_s.sci b/modules/overloading/macros/%ip_s_s.sci
new file mode 100755
index 000000000..b78e4846f
--- /dev/null
+++ b/modules/overloading/macros/%ip_s_s.sci
@@ -0,0 +1,14 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function r=%ip_s_s(ip,s)
+ // ip-s
+ if size(s,"*")<>1 then error(10),end
+ r=(ip(1)-s):(ip(2)-s):(ip(3)-s)
+endfunction
diff --git a/modules/overloading/macros/%ip_string.bin b/modules/overloading/macros/%ip_string.bin
new file mode 100755
index 000000000..2aa8dec9f
--- /dev/null
+++ b/modules/overloading/macros/%ip_string.bin
Binary files differ
diff --git a/modules/overloading/macros/%ip_string.sci b/modules/overloading/macros/%ip_string.sci
new file mode 100755
index 000000000..78d16163d
--- /dev/null
+++ b/modules/overloading/macros/%ip_string.sci
@@ -0,0 +1,22 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+// Copyright (C) DIGITEO - 2012 - Allan CORNET
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function r = %ip_string(index)
+ r = []; v = [];
+ if execstr("v = [index(1) index(2) index(3)];", "errcatch") == 0 then
+ r = sci2exp(v(1)) + ":" + sci2exp(v(2)) + ":" + sci2exp(v(3));
+ else
+ if execstr("v = [index(1) index(2)];", "errcatch") == 0 then
+ r = sci2exp(v(1)) + ":" + sci2exp(v(2));
+ else
+ error(999, msprintf(gettext("%s: Wrong size for input argument #%d.\n"), "string", 1));
+ end
+ end
+endfunction
diff --git a/modules/overloading/macros/%l_i_h.bin b/modules/overloading/macros/%l_i_h.bin
new file mode 100755
index 000000000..8dbd2c9fa
--- /dev/null
+++ b/modules/overloading/macros/%l_i_h.bin
Binary files differ
diff --git a/modules/overloading/macros/%l_i_h.sci b/modules/overloading/macros/%l_i_h.sci
new file mode 100755
index 000000000..59281bd1d
--- /dev/null
+++ b/modules/overloading/macros/%l_i_h.sci
@@ -0,0 +1,16 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function h=%l_i_h(i,v,h)
+ h=generic_i_h(i,v,h)
+endfunction
+
+
+
+
diff --git a/modules/overloading/macros/%l_i_s.bin b/modules/overloading/macros/%l_i_s.bin
new file mode 100755
index 000000000..0155ca697
--- /dev/null
+++ b/modules/overloading/macros/%l_i_s.bin
Binary files differ
diff --git a/modules/overloading/macros/%l_i_s.sci b/modules/overloading/macros/%l_i_s.sci
new file mode 100755
index 000000000..948994e4e
--- /dev/null
+++ b/modules/overloading/macros/%l_i_s.sci
@@ -0,0 +1,13 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function M=%l_i_s(varargin)
+ M=generic_i_s(varargin(:))
+endfunction
+
diff --git a/modules/overloading/macros/%l_i_st.bin b/modules/overloading/macros/%l_i_st.bin
new file mode 100755
index 000000000..57b4a774c
--- /dev/null
+++ b/modules/overloading/macros/%l_i_st.bin
Binary files differ
diff --git a/modules/overloading/macros/%l_i_st.sci b/modules/overloading/macros/%l_i_st.sci
new file mode 100755
index 000000000..b8ecf8040
--- /dev/null
+++ b/modules/overloading/macros/%l_i_st.sci
@@ -0,0 +1,12 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function out=%l_i_st(i,in,out)
+ out=generic_i_st(i,in,out)
+endfunction
diff --git a/modules/overloading/macros/%l_isequal.bin b/modules/overloading/macros/%l_isequal.bin
new file mode 100755
index 000000000..35f6cedf6
--- /dev/null
+++ b/modules/overloading/macros/%l_isequal.bin
Binary files differ
diff --git a/modules/overloading/macros/%l_isequal.sci b/modules/overloading/macros/%l_isequal.sci
new file mode 100755
index 000000000..0b6b73d09
--- /dev/null
+++ b/modules/overloading/macros/%l_isequal.sci
@@ -0,0 +1,30 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function r=%l_isequal(x1,varargin)
+ narg=size(varargin)
+ if narg==0 then error(msprintf(_("%s: Wrong number of input arguments: At least %d expected.\n"),"%l_isequal",2)) ,end
+
+ r=%t
+ m=lstsize(x1)
+
+ for k=1:narg
+ n=lstsize(varargin(k))
+ r=r&(n==m)
+ if ~r then return,end
+ end
+
+ for k=1:narg
+ for l=1:m
+ r=r&isequal(getfield(l,x1),getfield(l,varargin(k)))
+ if ~r then return,end
+ end
+ end
+endfunction
+
diff --git a/modules/overloading/macros/%l_n_c.bin b/modules/overloading/macros/%l_n_c.bin
new file mode 100755
index 000000000..97f61f73e
--- /dev/null
+++ b/modules/overloading/macros/%l_n_c.bin
Binary files differ
diff --git a/modules/overloading/macros/%l_n_c.sci b/modules/overloading/macros/%l_n_c.sci
new file mode 100755
index 000000000..766ea95df
--- /dev/null
+++ b/modules/overloading/macros/%l_n_c.sci
@@ -0,0 +1,15 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function [r]=%l_n_c(l1,l2)
+ //%l_n_c(l1,l2) : l1==l2
+ //!
+
+ r=%t
+endfunction
diff --git a/modules/overloading/macros/%l_n_l.bin b/modules/overloading/macros/%l_n_l.bin
new file mode 100755
index 000000000..b56819674
--- /dev/null
+++ b/modules/overloading/macros/%l_n_l.bin
Binary files differ
diff --git a/modules/overloading/macros/%l_n_l.sci b/modules/overloading/macros/%l_n_l.sci
new file mode 100755
index 000000000..843b66d56
--- /dev/null
+++ b/modules/overloading/macros/%l_n_l.sci
@@ -0,0 +1,30 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function r=%l_n_l(l1,l2)
+ //%l_n_l(l1,l2) : l1<>l2
+ //!
+ n1=lstsize(l1)
+ r=n1<>lstsize(l2)
+
+ if ~r&n1>0 then
+ r=%f(ones(1,n1))
+ sel=%f(ones(1,n1))
+ k1=definedfields(l1)
+ k2=definedfields(l2)
+ for i=intersect(k1,k2),
+ if and(getfield(i,l1)==getfield(i,l2)) then r(i)= %t,end
+ end
+ s1=1:n1;s1(k1)=[];
+ s2=1:n1;s2(k2)=[];
+ k1=intersect(s1,s2)
+ if k1<>[] then r(intersect(s1,s2))=%t,end
+ r=~r
+ end
+endfunction
diff --git a/modules/overloading/macros/%l_n_m.bin b/modules/overloading/macros/%l_n_m.bin
new file mode 100755
index 000000000..7fc92654c
--- /dev/null
+++ b/modules/overloading/macros/%l_n_m.bin
Binary files differ
diff --git a/modules/overloading/macros/%l_n_m.sci b/modules/overloading/macros/%l_n_m.sci
new file mode 100755
index 000000000..f3bb32098
--- /dev/null
+++ b/modules/overloading/macros/%l_n_m.sci
@@ -0,0 +1,15 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function [r]=%l_n_m(l1,l2)
+ //%l_n_m(l1,l2) <=>l1==l2 l1 list l2 function
+ //!
+
+ r=%t
+endfunction
diff --git a/modules/overloading/macros/%l_n_p.bin b/modules/overloading/macros/%l_n_p.bin
new file mode 100755
index 000000000..812936ac9
--- /dev/null
+++ b/modules/overloading/macros/%l_n_p.bin
Binary files differ
diff --git a/modules/overloading/macros/%l_n_p.sci b/modules/overloading/macros/%l_n_p.sci
new file mode 100755
index 000000000..b4eebd9c9
--- /dev/null
+++ b/modules/overloading/macros/%l_n_p.sci
@@ -0,0 +1,14 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function [r]=%l_n_p(l1,l2)
+ //!
+
+ r=%t
+endfunction
diff --git a/modules/overloading/macros/%l_n_s.bin b/modules/overloading/macros/%l_n_s.bin
new file mode 100755
index 000000000..6f1865865
--- /dev/null
+++ b/modules/overloading/macros/%l_n_s.bin
Binary files differ
diff --git a/modules/overloading/macros/%l_n_s.sci b/modules/overloading/macros/%l_n_s.sci
new file mode 100755
index 000000000..eeddfdc96
--- /dev/null
+++ b/modules/overloading/macros/%l_n_s.sci
@@ -0,0 +1,12 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+function [r]=%l_n_s(l1,l2)
+
+ r=%t
+endfunction
diff --git a/modules/overloading/macros/%l_n_st.bin b/modules/overloading/macros/%l_n_st.bin
new file mode 100755
index 000000000..7c3c96eef
--- /dev/null
+++ b/modules/overloading/macros/%l_n_st.bin
Binary files differ
diff --git a/modules/overloading/macros/%l_n_st.sci b/modules/overloading/macros/%l_n_st.sci
new file mode 100755
index 000000000..608ef2bca
--- /dev/null
+++ b/modules/overloading/macros/%l_n_st.sci
@@ -0,0 +1,14 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA, Serge Steer
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function r=%l_n_st(a,b)
+ // implements r=a~=b
+ // for a a list and b a struct
+ r=%t
+endfunction
diff --git a/modules/overloading/macros/%l_o_c.bin b/modules/overloading/macros/%l_o_c.bin
new file mode 100755
index 000000000..b347807ec
--- /dev/null
+++ b/modules/overloading/macros/%l_o_c.bin
Binary files differ
diff --git a/modules/overloading/macros/%l_o_c.sci b/modules/overloading/macros/%l_o_c.sci
new file mode 100755
index 000000000..44274bf21
--- /dev/null
+++ b/modules/overloading/macros/%l_o_c.sci
@@ -0,0 +1,15 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function r=%l_o_c(l1,l2)
+ //%l_o_c(l1,l2) is l1==l2 , l1 list l2 string
+ //!
+
+ r=%f
+endfunction
diff --git a/modules/overloading/macros/%l_o_l.bin b/modules/overloading/macros/%l_o_l.bin
new file mode 100755
index 000000000..aacfaa8ee
--- /dev/null
+++ b/modules/overloading/macros/%l_o_l.bin
Binary files differ
diff --git a/modules/overloading/macros/%l_o_l.sci b/modules/overloading/macros/%l_o_l.sci
new file mode 100755
index 000000000..d892c2b80
--- /dev/null
+++ b/modules/overloading/macros/%l_o_l.sci
@@ -0,0 +1,37 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function [r]=%l_o_l(l1,l2)
+ //l1==l2
+ //!
+
+ n1=length(l1)
+
+
+ r=n1==length(l2)
+ if r&n1>0 then
+ r=%f(ones(1,n1))
+ sel=%f(ones(1,n1))
+ k1=definedfields(l1)
+ k2=definedfields(l2)
+ for i=intersect(k1,k2),
+ a=getfield(i, l1);
+ b=getfield(i, l2);
+ if exists("a") == 0 | exists("b") == 0 then //case list(1,,2)
+ r(i) = %f;
+ else
+ if and(getfield(i,l1)==getfield(i,l2)) then r(i)= %t,end
+ end
+ end
+ s1=1:n1;s1(k1)=[];
+ s2=1:n1;s2(k2)=[];
+ k1=intersect(s1,s2)
+ if k1<>[] then r(intersect(s1,s2))=%t,end
+ end
+endfunction
diff --git a/modules/overloading/macros/%l_o_m.bin b/modules/overloading/macros/%l_o_m.bin
new file mode 100755
index 000000000..f42274b6e
--- /dev/null
+++ b/modules/overloading/macros/%l_o_m.bin
Binary files differ
diff --git a/modules/overloading/macros/%l_o_m.sci b/modules/overloading/macros/%l_o_m.sci
new file mode 100755
index 000000000..b30eb26cd
--- /dev/null
+++ b/modules/overloading/macros/%l_o_m.sci
@@ -0,0 +1,14 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function [r]=%l_o_m(l1,l2)
+ //%l_o_m(l1,l2) <-> logical operation l1==l2, l1 list and l2 macro(function)
+ //!
+ r=%f
+endfunction
diff --git a/modules/overloading/macros/%l_o_p.bin b/modules/overloading/macros/%l_o_p.bin
new file mode 100755
index 000000000..55f7a44a3
--- /dev/null
+++ b/modules/overloading/macros/%l_o_p.bin
Binary files differ
diff --git a/modules/overloading/macros/%l_o_p.sci b/modules/overloading/macros/%l_o_p.sci
new file mode 100755
index 000000000..c34ad2d40
--- /dev/null
+++ b/modules/overloading/macros/%l_o_p.sci
@@ -0,0 +1,15 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function [r]=%l_o_p(l1,l2)
+ //%l_o_p(l1,l2) <-> l1==l2 , l1 list and l2 polynomial matrix
+ //!
+
+ r=%f
+endfunction
diff --git a/modules/overloading/macros/%l_o_s.bin b/modules/overloading/macros/%l_o_s.bin
new file mode 100755
index 000000000..4accc8246
--- /dev/null
+++ b/modules/overloading/macros/%l_o_s.bin
Binary files differ
diff --git a/modules/overloading/macros/%l_o_s.sci b/modules/overloading/macros/%l_o_s.sci
new file mode 100755
index 000000000..b8a288946
--- /dev/null
+++ b/modules/overloading/macros/%l_o_s.sci
@@ -0,0 +1,15 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function r=%l_o_s(l1,l2)
+ //%l_o_s(l1,l2) <=> l1==l2 l1 list l2 matrix
+ //!
+
+ r=%f
+endfunction
diff --git a/modules/overloading/macros/%l_o_st.bin b/modules/overloading/macros/%l_o_st.bin
new file mode 100755
index 000000000..6f10fd157
--- /dev/null
+++ b/modules/overloading/macros/%l_o_st.bin
Binary files differ
diff --git a/modules/overloading/macros/%l_o_st.sci b/modules/overloading/macros/%l_o_st.sci
new file mode 100755
index 000000000..d59527841
--- /dev/null
+++ b/modules/overloading/macros/%l_o_st.sci
@@ -0,0 +1,14 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA, Serge Steer
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function r=%l_o_st(a,b)
+ // implements r=a==b
+ // for a a list and b a struct
+ r=%f
+endfunction
diff --git a/modules/overloading/macros/%lss_a_lss.bin b/modules/overloading/macros/%lss_a_lss.bin
new file mode 100755
index 000000000..4bb8e777c
--- /dev/null
+++ b/modules/overloading/macros/%lss_a_lss.bin
Binary files differ
diff --git a/modules/overloading/macros/%lss_a_lss.sci b/modules/overloading/macros/%lss_a_lss.sci
new file mode 100755
index 000000000..a40ce1956
--- /dev/null
+++ b/modules/overloading/macros/%lss_a_lss.sci
@@ -0,0 +1,21 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function [s]=%lss_a_lss(s1,s2)
+ // y= s1*u+s2*u
+ // s=s1+s2 in state-space
+ //!
+
+ [s1 s2]=sysconv(s1,s2)
+ [a1,b1,c1,d1,x1,dom1]=s1(2:7)
+ [a2,b2,c2,d2,x2]=s2(2:6)
+ [n1,n1]=size(a1);[n2,n2]=size(a2);
+ a1=[a1,0*ones(n1,n2);0*ones(n2,n1),a2];
+ s=tlist(["lss","A","B","C","D","X0","dt"],a1,[b1;b2],[c1,c2],d1+d2,[x1;x2],dom1)
+endfunction
diff --git a/modules/overloading/macros/%lss_a_p.bin b/modules/overloading/macros/%lss_a_p.bin
new file mode 100755
index 000000000..148c74ee2
--- /dev/null
+++ b/modules/overloading/macros/%lss_a_p.bin
Binary files differ
diff --git a/modules/overloading/macros/%lss_a_p.sci b/modules/overloading/macros/%lss_a_p.sci
new file mode 100755
index 000000000..c22038ee2
--- /dev/null
+++ b/modules/overloading/macros/%lss_a_p.sci
@@ -0,0 +1,16 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function s1=%lss_a_p(s1,d2)
+ //s=%lss_a_p(s1,d2) iff
+ // s=s1+d2
+ //!
+
+ s1(5)=s1(5)+d2
+endfunction
diff --git a/modules/overloading/macros/%lss_a_r.bin b/modules/overloading/macros/%lss_a_r.bin
new file mode 100755
index 000000000..f5406f3e3
--- /dev/null
+++ b/modules/overloading/macros/%lss_a_r.bin
Binary files differ
diff --git a/modules/overloading/macros/%lss_a_r.sci b/modules/overloading/macros/%lss_a_r.sci
new file mode 100755
index 000000000..6e9d6c031
--- /dev/null
+++ b/modules/overloading/macros/%lss_a_r.sci
@@ -0,0 +1,15 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function [s]=%lss_a_r(s1,s2)
+ //s=%lss_a_r(s1,s2) <=> s= s1+s2
+ //!
+
+ [s1,s2]=sysconv(s1,s2);s=s1+s2;
+endfunction
diff --git a/modules/overloading/macros/%lss_a_s.bin b/modules/overloading/macros/%lss_a_s.bin
new file mode 100755
index 000000000..81fa865ce
--- /dev/null
+++ b/modules/overloading/macros/%lss_a_s.bin
Binary files differ
diff --git a/modules/overloading/macros/%lss_a_s.sci b/modules/overloading/macros/%lss_a_s.sci
new file mode 100755
index 000000000..0cf1b257e
--- /dev/null
+++ b/modules/overloading/macros/%lss_a_s.sci
@@ -0,0 +1,15 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function s1=%lss_a_s(s1,d2)
+ //s=%lss_a_s(s1,d2) iff s=s1+d2
+ //!
+
+ s1(5)=s1(5)+d2
+endfunction
diff --git a/modules/overloading/macros/%lss_c_lss.bin b/modules/overloading/macros/%lss_c_lss.bin
new file mode 100755
index 000000000..e523fc5f8
--- /dev/null
+++ b/modules/overloading/macros/%lss_c_lss.bin
Binary files differ
diff --git a/modules/overloading/macros/%lss_c_lss.sci b/modules/overloading/macros/%lss_c_lss.sci
new file mode 100755
index 000000000..c066ab897
--- /dev/null
+++ b/modules/overloading/macros/%lss_c_lss.sci
@@ -0,0 +1,22 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function [s]=%lss_c_lss(s1,s2)
+ // u=[u1;u2] y=y1+y2
+ //operation s=[s1,s2] in state-space
+
+ [s1,s2]=sysconv(s1,s2);
+ [a1,b1,c1,d1,x1,dom1]=s1(2:7);
+ [a2,b2,c2,d2,x2]=s2(2:6);
+ [n1,n1]=size(a1);[n2,n2]=size(a2);
+ [p1,m1]=size(d1);[p2,m2]=size(d2);
+ a1=[a1 0*ones(n1,n2);0*ones(n2,n1) a2];
+ b1=[b1 0*ones(n1,m2);0*ones(n2,m1) b2];
+ s=tlist(["lss","A","B","C","D","X0","dt"],a1,b1,[c1 c2],[d1 d2],[x1;x2],dom1);
+endfunction
diff --git a/modules/overloading/macros/%lss_c_p.bin b/modules/overloading/macros/%lss_c_p.bin
new file mode 100755
index 000000000..52c135cd7
--- /dev/null
+++ b/modules/overloading/macros/%lss_c_p.bin
Binary files differ
diff --git a/modules/overloading/macros/%lss_c_p.sci b/modules/overloading/macros/%lss_c_p.sci
new file mode 100755
index 000000000..4aac061f0
--- /dev/null
+++ b/modules/overloading/macros/%lss_c_p.sci
@@ -0,0 +1,18 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function [s]=%lss_c_p(s1,d2)
+ //s=%lss_c_p(s1,d2)
+ // u=[u1;u2] y=y1+d2*u1
+ // s=[s1,d2]
+
+ [a1,b1,c1,d1,x1,dom1]=s1(2:7)
+ [n1,m1]=size(b1);[p2,m2]=size(d2);
+ s=tlist(["lss","A","B","C","D","X0","dt"],a1,[b1 0*ones(n1,m2)],c1,[d1 d2],x1,dom1)
+endfunction
diff --git a/modules/overloading/macros/%lss_c_r.bin b/modules/overloading/macros/%lss_c_r.bin
new file mode 100755
index 000000000..6cc8da1c8
--- /dev/null
+++ b/modules/overloading/macros/%lss_c_r.bin
Binary files differ
diff --git a/modules/overloading/macros/%lss_c_r.sci b/modules/overloading/macros/%lss_c_r.sci
new file mode 100755
index 000000000..de4da731e
--- /dev/null
+++ b/modules/overloading/macros/%lss_c_r.sci
@@ -0,0 +1,14 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function [s]=%lss_c_r(s1,s2)
+ //s=%lss_c_r(s1,s2) iff s=[s1,s2]
+
+ [s1,s2]=sysconv(s1,s2);s=[s1,s2];
+endfunction
diff --git a/modules/overloading/macros/%lss_c_s.bin b/modules/overloading/macros/%lss_c_s.bin
new file mode 100755
index 000000000..d83701e64
--- /dev/null
+++ b/modules/overloading/macros/%lss_c_s.bin
Binary files differ
diff --git a/modules/overloading/macros/%lss_c_s.sci b/modules/overloading/macros/%lss_c_s.sci
new file mode 100755
index 000000000..66b5a1c31
--- /dev/null
+++ b/modules/overloading/macros/%lss_c_s.sci
@@ -0,0 +1,17 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function [s]=%lss_c_s(s1,d2)
+ //s=%lss_c_s(s1,d2) <=> s=[s1,d2]
+ //!
+
+ [a1,b1,c1,d1,x1,dom1]=s1(2:7)
+ [n1,m1]=size(b1);[p2,m2]=size(d2);
+ s=tlist(["lss","A","B","C","D","X0","dt"],a1,[b1 0*ones(n1,m2)],c1,[d1 d2],x1,dom1)
+endfunction
diff --git a/modules/overloading/macros/%lss_e.bin b/modules/overloading/macros/%lss_e.bin
new file mode 100755
index 000000000..b4bb728d5
--- /dev/null
+++ b/modules/overloading/macros/%lss_e.bin
Binary files differ
diff --git a/modules/overloading/macros/%lss_e.sci b/modules/overloading/macros/%lss_e.sci
new file mode 100755
index 000000000..8f8253b9c
--- /dev/null
+++ b/modules/overloading/macros/%lss_e.sci
@@ -0,0 +1,29 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function [f1,f2,f3,f4,f5,f6,f7]=%lss_e(i,j,f)
+ // f= f(i,j)
+
+ if type(i)==10 then
+ [lhs,rhs]=argn(0)
+ if rhs<>2 then error(21),end
+ nams=["A","B","C","D","X0","dt"]
+ for k=1:prod(size(i))
+ kf=find(convstr(i(k),"u")==nams)
+ if kf==[] then error(21),end
+ execstr("f"+string(k)+"=j(kf+1)")
+ end
+ return
+ end
+ if type(i)==4 then i=find(i),end
+ if type(j)==4 then j=find(j),end
+ [a,b,c,d,x0,dom]=f(2:7)
+ f1=tlist(["lss","A","B","C","D","X0","dt"],a,b(:,j),c(i,:),d(i,j),x0,dom)
+ if f1("D")==[] then f1=[],end
+endfunction
diff --git a/modules/overloading/macros/%lss_eye.bin b/modules/overloading/macros/%lss_eye.bin
new file mode 100755
index 000000000..214f8004c
--- /dev/null
+++ b/modules/overloading/macros/%lss_eye.bin
Binary files differ
diff --git a/modules/overloading/macros/%lss_eye.sci b/modules/overloading/macros/%lss_eye.sci
new file mode 100755
index 000000000..dfa1515aa
--- /dev/null
+++ b/modules/overloading/macros/%lss_eye.sci
@@ -0,0 +1,13 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function x=%lss_eye(a)
+
+ x=eye(a(5));
+endfunction
diff --git a/modules/overloading/macros/%lss_f_lss.bin b/modules/overloading/macros/%lss_f_lss.bin
new file mode 100755
index 000000000..d6838c0f4
--- /dev/null
+++ b/modules/overloading/macros/%lss_f_lss.bin
Binary files differ
diff --git a/modules/overloading/macros/%lss_f_lss.sci b/modules/overloading/macros/%lss_f_lss.sci
new file mode 100755
index 000000000..37840b710
--- /dev/null
+++ b/modules/overloading/macros/%lss_f_lss.sci
@@ -0,0 +1,21 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function [s]=%lss_f_lss(s1,s2)
+ // s=[s1;s2] in state-space
+
+ [s1,s2]=sysconv(s1,s2)
+ [a1,b1,c1,d1,x1,dom1]=s1(2:7)
+ [a2,b2,c2,d2,x2]=s2(2:6)
+ [n1,n1]=size(a1);[n2,n2]=size(a2)
+ [p1,m1]=size(d1);[p2,m2]=size(d2)
+ a1=[a1 0*ones(n1,n2);0*ones(n2,n1) a2]
+ c1=[c1 0*ones(p1,n2);0*ones(p2,n1) c2]
+ s=tlist(["lss","A","B","C","D","X0","dt"],a1,[b1;b2],c1,[d1;d2],[x1;x2],dom1)
+endfunction
diff --git a/modules/overloading/macros/%lss_f_p.bin b/modules/overloading/macros/%lss_f_p.bin
new file mode 100755
index 000000000..4fef3aa2c
--- /dev/null
+++ b/modules/overloading/macros/%lss_f_p.bin
Binary files differ
diff --git a/modules/overloading/macros/%lss_f_p.sci b/modules/overloading/macros/%lss_f_p.sci
new file mode 100755
index 000000000..1c97b056d
--- /dev/null
+++ b/modules/overloading/macros/%lss_f_p.sci
@@ -0,0 +1,17 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA - Serge Steer
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function [s]=%lss_f_p(s1,d2)
+ //[s]=%lss_f_p(s1,d2) <=> s=[s1;d2]
+ //!
+ //
+ [a1,b1,c1,d1,x1,dom1]=s1(2:7)
+ [n1,m1]=size(c1);[p2,m2]=size(d2);
+ s=tlist(["lss","A","B","C","D","X0","dt"],a1,b1,[c1;0*ones(p2,m1)],[d1;d2],x1,dom1)
+endfunction
diff --git a/modules/overloading/macros/%lss_f_r.bin b/modules/overloading/macros/%lss_f_r.bin
new file mode 100755
index 000000000..b70688dcf
--- /dev/null
+++ b/modules/overloading/macros/%lss_f_r.bin
Binary files differ
diff --git a/modules/overloading/macros/%lss_f_r.sci b/modules/overloading/macros/%lss_f_r.sci
new file mode 100755
index 000000000..1c36b098f
--- /dev/null
+++ b/modules/overloading/macros/%lss_f_r.sci
@@ -0,0 +1,13 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function [s]=%lss_f_r(s1,s2)
+
+ [s1,s2]=sysconv(s1,s2);s=[s1;s2];
+endfunction
diff --git a/modules/overloading/macros/%lss_f_s.bin b/modules/overloading/macros/%lss_f_s.bin
new file mode 100755
index 000000000..7ea5268e4
--- /dev/null
+++ b/modules/overloading/macros/%lss_f_s.bin
Binary files differ
diff --git a/modules/overloading/macros/%lss_f_s.sci b/modules/overloading/macros/%lss_f_s.sci
new file mode 100755
index 000000000..d38fb4c34
--- /dev/null
+++ b/modules/overloading/macros/%lss_f_s.sci
@@ -0,0 +1,16 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA - Serge Steer
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function [s]=%lss_f_s(s1,d2)
+ //operation s=[s1;d2]
+ //!
+ [a1,b1,c1,d1,x1,dom1]=s1(2:7)
+ [n1,m1]=size(c1);[p2,m2]=size(d2);
+ s=tlist(["lss","A","B","C","D","X0","dt"],a1,b1,[c1;0*ones(p2,m1)],[d1;d2],x1,dom1)
+endfunction
diff --git a/modules/overloading/macros/%lss_i_ce.bin b/modules/overloading/macros/%lss_i_ce.bin
new file mode 100755
index 000000000..725f2aee6
--- /dev/null
+++ b/modules/overloading/macros/%lss_i_ce.bin
Binary files differ
diff --git a/modules/overloading/macros/%lss_i_ce.sci b/modules/overloading/macros/%lss_i_ce.sci
new file mode 100755
index 000000000..752f5b1e5
--- /dev/null
+++ b/modules/overloading/macros/%lss_i_ce.sci
@@ -0,0 +1,13 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA - Vincent Couvert
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function M=%lss_i_ce(varargin)
+ // Insertion of a lss in a cell
+ M=generic_i_ce(varargin(:))
+endfunction
diff --git a/modules/overloading/macros/%lss_i_lss.bin b/modules/overloading/macros/%lss_i_lss.bin
new file mode 100755
index 000000000..d79948719
--- /dev/null
+++ b/modules/overloading/macros/%lss_i_lss.bin
Binary files differ
diff --git a/modules/overloading/macros/%lss_i_lss.sci b/modules/overloading/macros/%lss_i_lss.sci
new file mode 100755
index 000000000..ae9eca09e
--- /dev/null
+++ b/modules/overloading/macros/%lss_i_lss.sci
@@ -0,0 +1,38 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA - Serge Steer
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function s=%lss_i_lss(i,j,s1,s2)
+ //%lss_i_lss(i,j,s1,s2) <=> s2(i,j)=s1
+ //!
+ if type(i)==10|type(j)==10 then
+ error(21)
+ end
+ [s1 s2]=sysconv(s1,s2)
+ [m1,p1]=size(s1(5));[m2,p2]=size(s2(5));
+
+ if size(i)==[-1,-1] then i=1:m2,end
+ if size(j)==[-1,-1] then j=1:p2,end
+ if max(i)>m2 then
+ s2=[s2;0*ones(max(i)-m2,p2)]
+ [m2,p2]=size(s2(5));
+ end
+ if max(j)>p2 then
+ s2=[s2,0*ones(m2,max(j)-p2)]
+ [m2,p2]=size(s2(5));
+ end
+ jj=0*ones(1,p2);jj(j)=ones(1,prod(size(j)));
+ ii=0*ones(1,m2);ii(i)=ones(1,prod(size(i)));
+ s=diag(ones(ii)-ii)*s2*diag(jj)+s2*diag(ones(jj)-jj)
+ ii1=0*ones(m2,m1);ii1(m2-m1+1:m2,:)=eye(m1,m1)
+ ii1=ii1([find(ii==0),i],:)
+ jj1=0*ones(p1,p2);jj1(:,p2-p1+1:p2)=eye(p1,p1)
+ jj1=jj1(:,[find(jj==0),j])
+ s=s+ii1*s1*jj1
+ s=minss(s)
+endfunction
diff --git a/modules/overloading/macros/%lss_i_p.bin b/modules/overloading/macros/%lss_i_p.bin
new file mode 100755
index 000000000..df2051b19
--- /dev/null
+++ b/modules/overloading/macros/%lss_i_p.bin
Binary files differ
diff --git a/modules/overloading/macros/%lss_i_p.sci b/modules/overloading/macros/%lss_i_p.sci
new file mode 100755
index 000000000..16de503a5
--- /dev/null
+++ b/modules/overloading/macros/%lss_i_p.sci
@@ -0,0 +1,41 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA - Serge Steer
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function s=%lss_i_p(i,j,s1,s2)
+ //%lss_i_p(i,j,s1,s2) <=> s2(i,j)=s1
+ //!
+ [lhs,rhs]=argn(0)
+ if rhs==3 then
+ s2=s1;s1=j;
+ [a1,b1,c1,d1,x1,dom1]=s1(2:7)
+ d2=s2;
+ [n1,n1]=size(a1);
+ if size(d2,2)>1 then
+ b2=zeros(1,size(d2,2))
+ b2(i)=b1
+ c2=c1
+ elseif size(d2,1)>1 then
+ c2=zeros(size(d2,1),1)
+ c2(i)=c1
+ b2=b1
+ else
+ error(msprintf(_("%s: Invalid syntax for a MIMO system.\n"),"%lss_i_p"));
+ end
+ d2(i)=d1;
+ s=lsslist(a1,b2,c2,d2,x1,dom1)
+ else
+ [a1,b1,c1,d1,x1,dom1]=s1(2:7)
+ d2=s2;
+ [n1,n1]=size(a1);
+ b2(1:n1,j)=b1
+ c2(i,1:n1)=c1
+ d2(i,j)=d1;
+ s=lsslist(a1,b2,c2,d2,x1,dom1)
+ end
+endfunction
diff --git a/modules/overloading/macros/%lss_i_r.bin b/modules/overloading/macros/%lss_i_r.bin
new file mode 100755
index 000000000..dcb78cfa4
--- /dev/null
+++ b/modules/overloading/macros/%lss_i_r.bin
Binary files differ
diff --git a/modules/overloading/macros/%lss_i_r.sci b/modules/overloading/macros/%lss_i_r.sci
new file mode 100755
index 000000000..6ad4e1672
--- /dev/null
+++ b/modules/overloading/macros/%lss_i_r.sci
@@ -0,0 +1,14 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA - Serge Steer
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function [s2]=%lss_i_r(i,j,s1,s2)
+ //s2=%lss_i_r(i,j,s1,s2) <=> s2(i,j)=s1
+ [s1 s2]=sysconv(s1,s2)
+ s2(i,j)=s1
+endfunction
diff --git a/modules/overloading/macros/%lss_i_s.bin b/modules/overloading/macros/%lss_i_s.bin
new file mode 100755
index 000000000..89d87239a
--- /dev/null
+++ b/modules/overloading/macros/%lss_i_s.bin
Binary files differ
diff --git a/modules/overloading/macros/%lss_i_s.sci b/modules/overloading/macros/%lss_i_s.sci
new file mode 100755
index 000000000..b006ab94d
--- /dev/null
+++ b/modules/overloading/macros/%lss_i_s.sci
@@ -0,0 +1,51 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA - Serge Steer
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function s=%lss_i_s(i,j,s1,s2)
+ //%lss_i_s(i,j,s1,s2) <=> s2(i,j)=s1
+
+ [lhs,rhs]=argn(0)
+
+ if rhs==3 then
+ s2=s1;s1=j;
+ if (type(i)==10|type(i)==15) then //cell or struct case
+ s=createstruct(i,s1)
+ if type(i(1))<>10 & i(2)=="entries" then
+ // change struct to cell
+ f=getfield(1,s);f(1)="ce"
+ setfield(1,f,s)
+ end
+ return
+ end
+ [a1,b1,c1,d1,x1,dom1]=s1(2:7)
+ d2=s2;
+ [n1,n1]=size(a1);
+ if size(d2,2)>1 then
+ b2=zeros(1,size(d2,2))
+ b2(i)=b1
+ c2=c1
+ elseif size(d2,1)>1 then
+ c2=zeros(size(d2,1),1)
+ c2(i)=c1
+ b2=b1
+ else
+ error(msprintf(_("%s: Invalid syntax for a MIMO system.\n"),"%lss_i_s"));
+ end
+ d2(i)=d1;
+ s=lsslist(a1,b2,c2,d2,x1,dom1)
+ else
+ [a1,b1,c1,d1,x1,dom1]=s1(2:7)
+ d2=s2;
+ [n1,n1]=size(a1);
+ b2(1:n1,j)=b1
+ c2(i,1:n1)=c1
+ d2(i,j)=d1;
+ s=lsslist(a1,b2,c2,d2,x1,dom1)
+ end
+endfunction
diff --git a/modules/overloading/macros/%lss_i_st.bin b/modules/overloading/macros/%lss_i_st.bin
new file mode 100755
index 000000000..aa0792821
--- /dev/null
+++ b/modules/overloading/macros/%lss_i_st.bin
Binary files differ
diff --git a/modules/overloading/macros/%lss_i_st.sci b/modules/overloading/macros/%lss_i_st.sci
new file mode 100755
index 000000000..09dba3054
--- /dev/null
+++ b/modules/overloading/macros/%lss_i_st.sci
@@ -0,0 +1,12 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function out=%lss_i_st(i,in,out)
+ out=generic_i_st(i,in,out)
+endfunction
diff --git a/modules/overloading/macros/%lss_inv.bin b/modules/overloading/macros/%lss_inv.bin
new file mode 100755
index 000000000..02d066e58
--- /dev/null
+++ b/modules/overloading/macros/%lss_inv.bin
Binary files differ
diff --git a/modules/overloading/macros/%lss_inv.sci b/modules/overloading/macros/%lss_inv.sci
new file mode 100755
index 000000000..99901f6f6
--- /dev/null
+++ b/modules/overloading/macros/%lss_inv.sci
@@ -0,0 +1,62 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function x=%lss_inv(a)
+
+ d=a(5);
+ [m,n]=size(d);
+ polyn=(type(d)==2);constant=(type(d)==1);
+ if constant&(m==n) then
+ minsv=min(svd(d));rcd=rcond(d);s=poly(0,"s");
+ end
+ if constant&(m<>n) then
+ minsv=min(svd(d));s=poly(0,"s");
+ end
+
+ if polyn then rcd=0;minsv=0;s=poly(0,varn(d));end
+ if m==n then
+ if rcd > 1.d-6 then
+ x=invsyslin(a)
+ else
+ h=systmat(a);
+ se=rand("seed");
+ valfa=rand(1,10,"normal")/100;
+ rand("seed",se);
+ www=[];
+ for k=1:10
+ www=[www,rcond(horner(h,valfa(k)))];end
+ [w,k1]=max(www);alfa=valfa(k1);
+ x=invrs(a,alfa);
+ end
+ elseif m<n then
+ warning("non square system! --> right inverse")
+ if minsv > 1.d-6 then
+ x=invsyslin(a)
+ else
+ [stmp,ws]=rowregul(a,0,0);
+ if min(svd(stmp(5))) > 1.d-6 then
+ x=invsyslin(stmp)*ws
+ else
+ error(19)
+ end
+ end
+ elseif m>n then
+ warning("non square system! --> left inverse")
+ if minsv > 1.d-6 then
+ x=invsyslin(a)
+ else
+ [stmp,ws]=rowregul(a,0,0);
+ if min(svd(stmp(5))) > 1.d-6 then
+ x=invsyslin(stmp)*ws
+ else
+ error(19)
+ end
+ end
+ end
+endfunction
diff --git a/modules/overloading/macros/%lss_l_lss.bin b/modules/overloading/macros/%lss_l_lss.bin
new file mode 100755
index 000000000..8abaee11d
--- /dev/null
+++ b/modules/overloading/macros/%lss_l_lss.bin
Binary files differ
diff --git a/modules/overloading/macros/%lss_l_lss.sci b/modules/overloading/macros/%lss_l_lss.sci
new file mode 100755
index 000000000..783babe59
--- /dev/null
+++ b/modules/overloading/macros/%lss_l_lss.sci
@@ -0,0 +1,14 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function [s]=%lss_l_lss(s1,s2)
+
+ [s1,s2]=sysconv(s1,s2)
+ s=inv(s1)*s2
+endfunction
diff --git a/modules/overloading/macros/%lss_l_p.bin b/modules/overloading/macros/%lss_l_p.bin
new file mode 100755
index 000000000..2bdb763de
--- /dev/null
+++ b/modules/overloading/macros/%lss_l_p.bin
Binary files differ
diff --git a/modules/overloading/macros/%lss_l_p.sci b/modules/overloading/macros/%lss_l_p.sci
new file mode 100755
index 000000000..70b0d5f97
--- /dev/null
+++ b/modules/overloading/macros/%lss_l_p.sci
@@ -0,0 +1,16 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA - Serge Steer
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function [sr]=%lss_l_p(s,p)
+ //sr=%lss_l_p(s,p) <=> sr=s\p
+ // p polynomial matrix
+ // s syslin list
+ //!
+ sr=s\tlist(["lss","A","B","C","D","X0","dt"],[],[],[],p,[],[])
+endfunction
diff --git a/modules/overloading/macros/%lss_l_r.bin b/modules/overloading/macros/%lss_l_r.bin
new file mode 100755
index 000000000..987cc4aa0
--- /dev/null
+++ b/modules/overloading/macros/%lss_l_r.bin
Binary files differ
diff --git a/modules/overloading/macros/%lss_l_r.sci b/modules/overloading/macros/%lss_l_r.sci
new file mode 100755
index 000000000..105dab611
--- /dev/null
+++ b/modules/overloading/macros/%lss_l_r.sci
@@ -0,0 +1,13 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function [s]=%lss_l_r(s1,s2)
+ [s1,s2]=sysconv(s1,s2)
+ s=s1\s2
+endfunction
diff --git a/modules/overloading/macros/%lss_l_s.bin b/modules/overloading/macros/%lss_l_s.bin
new file mode 100755
index 000000000..a646a4a97
--- /dev/null
+++ b/modules/overloading/macros/%lss_l_s.bin
Binary files differ
diff --git a/modules/overloading/macros/%lss_l_s.sci b/modules/overloading/macros/%lss_l_s.sci
new file mode 100755
index 000000000..b338364d4
--- /dev/null
+++ b/modules/overloading/macros/%lss_l_s.sci
@@ -0,0 +1,14 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function s=%lss_l_s(s1,s2)
+ //!
+
+ s=inv(s1)*s2
+endfunction
diff --git a/modules/overloading/macros/%lss_m_lss.bin b/modules/overloading/macros/%lss_m_lss.bin
new file mode 100755
index 000000000..0a9cb2b5b
--- /dev/null
+++ b/modules/overloading/macros/%lss_m_lss.bin
Binary files differ
diff --git a/modules/overloading/macros/%lss_m_lss.sci b/modules/overloading/macros/%lss_m_lss.sci
new file mode 100755
index 000000000..ad2994e43
--- /dev/null
+++ b/modules/overloading/macros/%lss_m_lss.sci
@@ -0,0 +1,63 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function [SS]=%lss_m_lss(S1,S2)
+ //S=%lss_m_lss(S1,S2) computes S1*S2 in state-space form.
+ // --> S2 --> S1 -->
+ //!
+
+ [S1,S2]=sysconv(S1,S2)
+ [A1,B1,C1,D1,x1,dom1]=S1(2:7),
+ [A2,B2,C2,D2,x2]=S2(2:6),
+ //
+ if max(degree(D1))==0 & max(degree(D2))==0 then
+ D1=coeff(D1);D2=coeff(D2);
+ B1C2=B1*C2
+ SS=tlist(["lss","A","B","C","D","X0","dt"],[A1,B1C2;0*B1C2' ,A2],[B1*D2;B2],...
+ [C1,D1*C2],D1*D2,[x1;x2],dom1),
+ return
+ end
+ //improper systems
+
+ J=[A1,B1*C2;
+ 0*ones(B1*C2)',A2];
+ Ls=[C1 D1*C2]'
+ Ms=[B1*D2;B2]
+
+ if Ms==[]|Ls==[] then
+ SS=tlist(["lss","A","B","C","D","X0","dt"],[],[],[],D1*D2,[x1;x2],dom1)
+ return;
+ end
+ //
+ if type(D1*D2)~=1
+ s=poly(0,varn(D1*D2));
+ end
+ deg=max(degree(Ms));
+ B=coeff(Ms,deg);
+ Ps=0*B
+ for i=1:deg
+ Ps=s*Ps+B
+ B=J*B+coeff(Ms,deg-i)
+ end
+ //
+ deg=max(degree(Ls)); J=J'
+ C=coeff(Ls,deg);
+ pps=0*C
+ for i=1:deg
+ pps=s*pps+C
+ C=J*C+coeff(Ls,deg-i)
+ end
+ //
+ C=C';
+ D=pps'*B+Ls'*Ps+D1*D2;
+ Dg=max(degree(D));
+ if Dg==0 then D=coeff(D);end
+
+ SS=tlist(["lss","A","B","C","D","X0","dt"],J',B,C,D,[x1;x2],dom1);
+endfunction
diff --git a/modules/overloading/macros/%lss_m_p.bin b/modules/overloading/macros/%lss_m_p.bin
new file mode 100755
index 000000000..b720ef2c1
--- /dev/null
+++ b/modules/overloading/macros/%lss_m_p.bin
Binary files differ
diff --git a/modules/overloading/macros/%lss_m_p.sci b/modules/overloading/macros/%lss_m_p.sci
new file mode 100755
index 000000000..8e97d38d9
--- /dev/null
+++ b/modules/overloading/macros/%lss_m_p.sci
@@ -0,0 +1,18 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA - Serge Steer
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function [s]=%lss_m_p(s1,d2)
+ // [s]=%lss_m_p(s1,d2)
+ // s=s1*d2
+ //
+ // s1 : state-space
+ // d2 : polynomial matrix
+ //!
+ s=s1*tlist(["lss","A","B","C","D","X0","dt"],[],[],[],d2,[],[])
+endfunction
diff --git a/modules/overloading/macros/%lss_m_r.bin b/modules/overloading/macros/%lss_m_r.bin
new file mode 100755
index 000000000..1a23d055a
--- /dev/null
+++ b/modules/overloading/macros/%lss_m_r.bin
Binary files differ
diff --git a/modules/overloading/macros/%lss_m_r.sci b/modules/overloading/macros/%lss_m_r.sci
new file mode 100755
index 000000000..b073cb635
--- /dev/null
+++ b/modules/overloading/macros/%lss_m_r.sci
@@ -0,0 +1,15 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function [s]=%lss_m_r(s1,s2)
+ //s=%lss_m_r(s1,s2) <=> s= s2*s1
+ //!
+
+ [s1,s2]=sysconv(s1,s2);s=s1*s2
+endfunction
diff --git a/modules/overloading/macros/%lss_m_s.bin b/modules/overloading/macros/%lss_m_s.bin
new file mode 100755
index 000000000..a300afa1b
--- /dev/null
+++ b/modules/overloading/macros/%lss_m_s.bin
Binary files differ
diff --git a/modules/overloading/macros/%lss_m_s.sci b/modules/overloading/macros/%lss_m_s.sci
new file mode 100755
index 000000000..b34f69e29
--- /dev/null
+++ b/modules/overloading/macros/%lss_m_s.sci
@@ -0,0 +1,37 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA - Serge Steer , F.D
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function s=%lss_m_s(s1,D2)
+ // s=s1*gain
+ // SISO case FD
+ [A1,B1,C1,D1,x1,dom1]=s1(2:7);
+ [n2,m2]=size(D2);
+ if prod(size(s1))==1 then
+ if n2==1 then
+ D=D1*D2; [A1,B1*D2];
+ s=tlist(["lss","A","B","C","D","X0","dt"],A1,B1*D2,C1,D,x1,dom1);
+ return;
+ end
+ if m2==1 then
+ s=tlist(["lss","A","B","C","D","X0","dt"],A1,B1,D2*C1,D2*D1,x1,dom1);
+ return;
+ end
+ [Q,M]=fullrf(D2);[n2,mq]=size(Q);
+ if mq==1 then
+ s=Q*tlist(["lss","A","B","C","D","X0","dt"],A1,B1*M,C1,D1*M,x1,dom1);
+ return;
+ end
+ w=s1;
+ for k=2:mq, w=sysdiag(w,s1);end
+ s=w*M;s=Q*s;
+ return;
+ end
+ D=D1*D2;
+ s=tlist(["lss","A","B","C","D","X0","dt"],A1,B1*D2,C1,D,x1,dom1);
+endfunction
diff --git a/modules/overloading/macros/%lss_n_lss.bin b/modules/overloading/macros/%lss_n_lss.bin
new file mode 100755
index 000000000..25a41ad1f
--- /dev/null
+++ b/modules/overloading/macros/%lss_n_lss.bin
Binary files differ
diff --git a/modules/overloading/macros/%lss_n_lss.sci b/modules/overloading/macros/%lss_n_lss.sci
new file mode 100755
index 000000000..16360cd5f
--- /dev/null
+++ b/modules/overloading/macros/%lss_n_lss.sci
@@ -0,0 +1,13 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function [r]=%lss_n_lss(s1,s2)
+ //%lss_n_lss(s1,s2) : inequality test s1<>s2
+ for k=2:7,r=or(s1(k)<>s2(k));if r then return,end,end
+endfunction
diff --git a/modules/overloading/macros/%lss_n_p.bin b/modules/overloading/macros/%lss_n_p.bin
new file mode 100755
index 000000000..96222bdc8
--- /dev/null
+++ b/modules/overloading/macros/%lss_n_p.bin
Binary files differ
diff --git a/modules/overloading/macros/%lss_n_p.sci b/modules/overloading/macros/%lss_n_p.sci
new file mode 100755
index 000000000..15f179e71
--- /dev/null
+++ b/modules/overloading/macros/%lss_n_p.sci
@@ -0,0 +1,13 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function [r]=%lss_n_p(s1,s2)
+ //%lss_n_p(s1,s2) test s1<>s2
+ r=%t
+endfunction
diff --git a/modules/overloading/macros/%lss_n_r.bin b/modules/overloading/macros/%lss_n_r.bin
new file mode 100755
index 000000000..959597b53
--- /dev/null
+++ b/modules/overloading/macros/%lss_n_r.bin
Binary files differ
diff --git a/modules/overloading/macros/%lss_n_r.sci b/modules/overloading/macros/%lss_n_r.sci
new file mode 100755
index 000000000..25b296a62
--- /dev/null
+++ b/modules/overloading/macros/%lss_n_r.sci
@@ -0,0 +1,13 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function [r]=%lss_n_r(s1,s2)
+ //%lss_n_r(s1,s2) test s1<>s2
+ r=%t
+endfunction
diff --git a/modules/overloading/macros/%lss_n_s.bin b/modules/overloading/macros/%lss_n_s.bin
new file mode 100755
index 000000000..749d8676e
--- /dev/null
+++ b/modules/overloading/macros/%lss_n_s.bin
Binary files differ
diff --git a/modules/overloading/macros/%lss_n_s.sci b/modules/overloading/macros/%lss_n_s.sci
new file mode 100755
index 000000000..44720ccee
--- /dev/null
+++ b/modules/overloading/macros/%lss_n_s.sci
@@ -0,0 +1,13 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function [r]=%lss_n_s(s1,s2)
+ //%lss_n_s(s1,s2) test s1<>s2
+ r=s1(2)<>[]|s1(5)<>s2
+endfunction
diff --git a/modules/overloading/macros/%lss_norm.bin b/modules/overloading/macros/%lss_norm.bin
new file mode 100755
index 000000000..0ec702fe7
--- /dev/null
+++ b/modules/overloading/macros/%lss_norm.bin
Binary files differ
diff --git a/modules/overloading/macros/%lss_norm.sci b/modules/overloading/macros/%lss_norm.sci
new file mode 100755
index 000000000..efd9f1eda
--- /dev/null
+++ b/modules/overloading/macros/%lss_norm.sci
@@ -0,0 +1,19 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function y=%lss_norm(A,flag)
+ if argn(2)==1 then flag=2,end
+ if flag==2 then
+ y=h2norm(A)
+ elseif flag==%inf|flag=="inf" then
+ y=h_norm(A)
+ else
+ error(msprintf(_("%s: Wrong value for input argument #%d: %d or %s expected.\n"),"%lss_norm",2,2,"inf"));
+ end
+endfunction
diff --git a/modules/overloading/macros/%lss_o_lss.bin b/modules/overloading/macros/%lss_o_lss.bin
new file mode 100755
index 000000000..02fd6b2d8
--- /dev/null
+++ b/modules/overloading/macros/%lss_o_lss.bin
Binary files differ
diff --git a/modules/overloading/macros/%lss_o_lss.sci b/modules/overloading/macros/%lss_o_lss.sci
new file mode 100755
index 000000000..533c80f6c
--- /dev/null
+++ b/modules/overloading/macros/%lss_o_lss.sci
@@ -0,0 +1,14 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function [r]=%lss_o_lss(s1,s2)
+ //%lss_o_lss(s1,s2) test s1==s2
+
+ for k=2:7,r=and(s1(k)==s2(k));if ~r then return,end,end
+endfunction
diff --git a/modules/overloading/macros/%lss_o_p.bin b/modules/overloading/macros/%lss_o_p.bin
new file mode 100755
index 000000000..a4601ebb1
--- /dev/null
+++ b/modules/overloading/macros/%lss_o_p.bin
Binary files differ
diff --git a/modules/overloading/macros/%lss_o_p.sci b/modules/overloading/macros/%lss_o_p.sci
new file mode 100755
index 000000000..80b1f731c
--- /dev/null
+++ b/modules/overloading/macros/%lss_o_p.sci
@@ -0,0 +1,13 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function [r]=%lss_o_p(s1,s2)
+ //%lss_o_p(s1,s2) test s1==s2
+ r=%f
+endfunction
diff --git a/modules/overloading/macros/%lss_o_r.bin b/modules/overloading/macros/%lss_o_r.bin
new file mode 100755
index 000000000..b8e091abb
--- /dev/null
+++ b/modules/overloading/macros/%lss_o_r.bin
Binary files differ
diff --git a/modules/overloading/macros/%lss_o_r.sci b/modules/overloading/macros/%lss_o_r.sci
new file mode 100755
index 000000000..15b96a1eb
--- /dev/null
+++ b/modules/overloading/macros/%lss_o_r.sci
@@ -0,0 +1,13 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function [r]=%lss_o_r(s1,s2)
+ //%lss_o_r(s1,s2) <=> s1==s2
+ r=%f
+endfunction
diff --git a/modules/overloading/macros/%lss_o_s.bin b/modules/overloading/macros/%lss_o_s.bin
new file mode 100755
index 000000000..ca310d2f0
--- /dev/null
+++ b/modules/overloading/macros/%lss_o_s.bin
Binary files differ
diff --git a/modules/overloading/macros/%lss_o_s.sci b/modules/overloading/macros/%lss_o_s.sci
new file mode 100755
index 000000000..be9f65f4c
--- /dev/null
+++ b/modules/overloading/macros/%lss_o_s.sci
@@ -0,0 +1,13 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function [r]=%lss_o_s(s1,s2)
+ //%lss_o_s(s1,s2) <=> s1==s2
+ r=s1(2)==[]&s1(5)==s2
+endfunction
diff --git a/modules/overloading/macros/%lss_ones.bin b/modules/overloading/macros/%lss_ones.bin
new file mode 100755
index 000000000..a87ad4389
--- /dev/null
+++ b/modules/overloading/macros/%lss_ones.bin
Binary files differ
diff --git a/modules/overloading/macros/%lss_ones.sci b/modules/overloading/macros/%lss_ones.sci
new file mode 100755
index 000000000..ef63e19aa
--- /dev/null
+++ b/modules/overloading/macros/%lss_ones.sci
@@ -0,0 +1,13 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function x=%lss_ones(a)
+
+ x=ones(a(5))
+endfunction
diff --git a/modules/overloading/macros/%lss_r_lss.bin b/modules/overloading/macros/%lss_r_lss.bin
new file mode 100755
index 000000000..57c13d4be
--- /dev/null
+++ b/modules/overloading/macros/%lss_r_lss.bin
Binary files differ
diff --git a/modules/overloading/macros/%lss_r_lss.sci b/modules/overloading/macros/%lss_r_lss.sci
new file mode 100755
index 000000000..c67b58805
--- /dev/null
+++ b/modules/overloading/macros/%lss_r_lss.sci
@@ -0,0 +1,14 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function [s]=%lss_r_lss(s1,s2)
+ //
+ [s1,s2]=sysconv(s1,s2)
+ s=s1*inv(s2)
+endfunction
diff --git a/modules/overloading/macros/%lss_r_p.bin b/modules/overloading/macros/%lss_r_p.bin
new file mode 100755
index 000000000..3c15859e0
--- /dev/null
+++ b/modules/overloading/macros/%lss_r_p.bin
Binary files differ
diff --git a/modules/overloading/macros/%lss_r_p.sci b/modules/overloading/macros/%lss_r_p.sci
new file mode 100755
index 000000000..9cc7d1208
--- /dev/null
+++ b/modules/overloading/macros/%lss_r_p.sci
@@ -0,0 +1,17 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function [sr]=%lss_r_p(s,p)
+ // sr=%lss_r_p(s,p) <=> sr=s/p
+ // s : syslin list
+ // p : polynomial matrix
+ //!
+
+ sr=s/tlist(["lss","A","B","C","D","X0","dt"],[],[],[],p,[],[])
+endfunction
diff --git a/modules/overloading/macros/%lss_r_r.bin b/modules/overloading/macros/%lss_r_r.bin
new file mode 100755
index 000000000..319b6f93d
--- /dev/null
+++ b/modules/overloading/macros/%lss_r_r.bin
Binary files differ
diff --git a/modules/overloading/macros/%lss_r_r.sci b/modules/overloading/macros/%lss_r_r.sci
new file mode 100755
index 000000000..ff6ad2fe1
--- /dev/null
+++ b/modules/overloading/macros/%lss_r_r.sci
@@ -0,0 +1,14 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function s=%lss_r_r(s1,s2)
+ //
+ [s1,s2]=sysconv(s1,s2)
+ s=s1/s2
+endfunction
diff --git a/modules/overloading/macros/%lss_r_s.bin b/modules/overloading/macros/%lss_r_s.bin
new file mode 100755
index 000000000..1d2b5851d
--- /dev/null
+++ b/modules/overloading/macros/%lss_r_s.bin
Binary files differ
diff --git a/modules/overloading/macros/%lss_r_s.sci b/modules/overloading/macros/%lss_r_s.sci
new file mode 100755
index 000000000..879d044af
--- /dev/null
+++ b/modules/overloading/macros/%lss_r_s.sci
@@ -0,0 +1,16 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function s1=%lss_r_s(s1,d2)
+ //s=%lss_r_s(s1,d2) <=> s=s1/d2
+ //!
+
+ s1(3)=s1(3)/d2;
+ s1(5)=s1(5)/d2
+endfunction
diff --git a/modules/overloading/macros/%lss_rand.bin b/modules/overloading/macros/%lss_rand.bin
new file mode 100755
index 000000000..d8dc5bc2b
--- /dev/null
+++ b/modules/overloading/macros/%lss_rand.bin
Binary files differ
diff --git a/modules/overloading/macros/%lss_rand.sci b/modules/overloading/macros/%lss_rand.sci
new file mode 100755
index 000000000..6bf9b3ad8
--- /dev/null
+++ b/modules/overloading/macros/%lss_rand.sci
@@ -0,0 +1,13 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function x=%lss_rand(a)
+
+ x=rand(a(5));
+endfunction
diff --git a/modules/overloading/macros/%lss_s.bin b/modules/overloading/macros/%lss_s.bin
new file mode 100755
index 000000000..23f1939f3
--- /dev/null
+++ b/modules/overloading/macros/%lss_s.bin
Binary files differ
diff --git a/modules/overloading/macros/%lss_s.sci b/modules/overloading/macros/%lss_s.sci
new file mode 100755
index 000000000..88635035c
--- /dev/null
+++ b/modules/overloading/macros/%lss_s.sci
@@ -0,0 +1,15 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function s1=%lss_s(s1)
+ // s=-s1
+ //!
+ s1(4)=-s1(4)
+ s1(5)=-s1(5)
+endfunction
diff --git a/modules/overloading/macros/%lss_s_lss.bin b/modules/overloading/macros/%lss_s_lss.bin
new file mode 100755
index 000000000..72896e7c6
--- /dev/null
+++ b/modules/overloading/macros/%lss_s_lss.bin
Binary files differ
diff --git a/modules/overloading/macros/%lss_s_lss.sci b/modules/overloading/macros/%lss_s_lss.sci
new file mode 100755
index 000000000..5ceb037b6
--- /dev/null
+++ b/modules/overloading/macros/%lss_s_lss.sci
@@ -0,0 +1,21 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function [s]=%lss_s_lss(s1,s2)
+ //s=%lss_s_lss(s1,s2) <=> s=s1-s2
+ // s1, s2: syslin lists
+ //!
+
+ [s1 s2]=sysconv(s1,s2)
+ [a1,b1,c1,d1,x1,dom1]=s1(2:7)
+ [a2,b2,c2,d2,x2]=s2(2:6)
+ [n1,n1]=size(a1);[n2,n2]=size(a2);
+ a1=[a1,0*ones(n1,n2);0*ones(n2,n1),a2];
+ s=tlist(["lss","A","B","C","D","X0","dt"],a1,[b1;-b2],[c1 c2],d1-d2,[x1;x2],dom1)
+endfunction
diff --git a/modules/overloading/macros/%lss_s_p.bin b/modules/overloading/macros/%lss_s_p.bin
new file mode 100755
index 000000000..681519651
--- /dev/null
+++ b/modules/overloading/macros/%lss_s_p.bin
Binary files differ
diff --git a/modules/overloading/macros/%lss_s_p.sci b/modules/overloading/macros/%lss_s_p.sci
new file mode 100755
index 000000000..f22645e61
--- /dev/null
+++ b/modules/overloading/macros/%lss_s_p.sci
@@ -0,0 +1,16 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function s1=%lss_s_p(s1,d2)
+ //s=%lss_s_p(s1,d2) <=> s=s1-p
+ // s1 : syslin list
+ // p : polynomial matrix
+ // Copyright INRIA
+ s1(5)=s1(5)-d2
+endfunction
diff --git a/modules/overloading/macros/%lss_s_r.bin b/modules/overloading/macros/%lss_s_r.bin
new file mode 100755
index 000000000..012e3bfce
--- /dev/null
+++ b/modules/overloading/macros/%lss_s_r.bin
Binary files differ
diff --git a/modules/overloading/macros/%lss_s_r.sci b/modules/overloading/macros/%lss_s_r.sci
new file mode 100755
index 000000000..147b8b6e1
--- /dev/null
+++ b/modules/overloading/macros/%lss_s_r.sci
@@ -0,0 +1,18 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function [s]=%lss_s_r(s1,s2)
+ //s=%lss_s_r(s1,s2) <=> s=s1-s2
+ // s1 : state-space
+ // s2 : transfer matrix
+ //!
+
+ [s1,s2]=sysconv(s1,s2)
+ s=s1-s2
+endfunction
diff --git a/modules/overloading/macros/%lss_s_s.bin b/modules/overloading/macros/%lss_s_s.bin
new file mode 100755
index 000000000..5104cdf4f
--- /dev/null
+++ b/modules/overloading/macros/%lss_s_s.bin
Binary files differ
diff --git a/modules/overloading/macros/%lss_s_s.sci b/modules/overloading/macros/%lss_s_s.sci
new file mode 100755
index 000000000..f6a3ea812
--- /dev/null
+++ b/modules/overloading/macros/%lss_s_s.sci
@@ -0,0 +1,14 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function s1=%lss_s_s(s1,d2)
+ //s=s1-d2
+
+ s1(5)=s1(5)-d2
+endfunction
diff --git a/modules/overloading/macros/%lss_size.bin b/modules/overloading/macros/%lss_size.bin
new file mode 100755
index 000000000..a081407fc
--- /dev/null
+++ b/modules/overloading/macros/%lss_size.bin
Binary files differ
diff --git a/modules/overloading/macros/%lss_size.sci b/modules/overloading/macros/%lss_size.sci
new file mode 100755
index 000000000..21567bacf
--- /dev/null
+++ b/modules/overloading/macros/%lss_size.sci
@@ -0,0 +1,41 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function [m,n,nx]=%lss_size(x,flag)
+ // only to be called by size function for dynamical systems
+ //!
+
+ [lhs,rhs]=argn(0)
+
+ [a,b,c,d]=x(2:5);[m,w]=size([c,d]),[w,n]=size([b;d]);
+ if rhs==2 then
+ if type(flag)==10 then
+ if part(flag,1)=="r" then
+ flag=1;
+ elseif part(flag,1)=="c" then
+ flag=2;
+ end
+ end
+ end
+ if lhs==1
+ if rhs==1 then
+ m=[m,n]
+ elseif flag==1
+ m=m
+ elseif flag==2
+ m=n
+ elseif flag=="*" then
+ m=m*n
+ end
+ elseif lhs==2 then
+ return
+ elseif lhs==3 then
+ [nx,nx]=size(a);
+ end;
+endfunction
diff --git a/modules/overloading/macros/%lss_t.bin b/modules/overloading/macros/%lss_t.bin
new file mode 100755
index 000000000..7137c8cb9
--- /dev/null
+++ b/modules/overloading/macros/%lss_t.bin
Binary files differ
diff --git a/modules/overloading/macros/%lss_t.sci b/modules/overloading/macros/%lss_t.sci
new file mode 100755
index 000000000..9573fa53f
--- /dev/null
+++ b/modules/overloading/macros/%lss_t.sci
@@ -0,0 +1,16 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function s=%lss_t(s)
+ //s=%lss_t(s) <=> s=s' in state-space
+ //!
+
+ [a,b,c,d,x,dom]=s(2:7)
+ s=tlist(["lss","A","B","C","D","X0","dt"],a',c',b',d',x,dom)
+endfunction
diff --git a/modules/overloading/macros/%lss_v_lss.bin b/modules/overloading/macros/%lss_v_lss.bin
new file mode 100755
index 000000000..fbf324fca
--- /dev/null
+++ b/modules/overloading/macros/%lss_v_lss.bin
Binary files differ
diff --git a/modules/overloading/macros/%lss_v_lss.sci b/modules/overloading/macros/%lss_v_lss.sci
new file mode 100755
index 000000000..29e1d387f
--- /dev/null
+++ b/modules/overloading/macros/%lss_v_lss.sci
@@ -0,0 +1,22 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA - Serge Steer
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function [s]=%lss_v_lss(s1,s2)
+ //s=%lss_v_lss(s1,s2) <=> s = s1 "feedback" with s2
+ // <=> s=s1/.s2 (in state-space)
+ //!
+ [s1,s2]=sysconv(s1,s2)
+ [a1,b1,c1,d1,x1,dom1]=s1(2:7)
+ [a2,b2,c2,d2,x2]=s2(2:6);
+ e12=1/(eye()+d2*d1)
+ e21=eye()-d1*e12*d2;b21=b2*e21;e12=b1*e12
+ a=[a1-e12*d2*c1 , -e12*c2 ; b21*c1 , a2-b21*d1*c2]
+ s=tlist(["lss","A","B","C","D","X0","dt"],a,[e12;b21*d1],e21*[c1 -d1*c2],...
+ e21*d1,[x1;x2],dom1)
+endfunction
diff --git a/modules/overloading/macros/%lss_v_p.bin b/modules/overloading/macros/%lss_v_p.bin
new file mode 100755
index 000000000..d392c4e05
--- /dev/null
+++ b/modules/overloading/macros/%lss_v_p.bin
Binary files differ
diff --git a/modules/overloading/macros/%lss_v_p.sci b/modules/overloading/macros/%lss_v_p.sci
new file mode 100755
index 000000000..14d54a84a
--- /dev/null
+++ b/modules/overloading/macros/%lss_v_p.sci
@@ -0,0 +1,17 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA - Serge Steer
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function [sr]=%lss_v_p(s,p)
+ // feedback sr=(eye+s*p)\s
+ //s=%lss_v_p(s,p) <=> sr=s/.p
+ // p : polynomial matrix
+ // s : state-space syslin list
+ //!
+ sr=s/.tlist(["lss","A","B","C","D","X0","dt"],[],[],[],p,[],[])
+endfunction
diff --git a/modules/overloading/macros/%lss_v_r.bin b/modules/overloading/macros/%lss_v_r.bin
new file mode 100755
index 000000000..540be1a0f
--- /dev/null
+++ b/modules/overloading/macros/%lss_v_r.bin
Binary files differ
diff --git a/modules/overloading/macros/%lss_v_r.sci b/modules/overloading/macros/%lss_v_r.sci
new file mode 100755
index 000000000..8de517b57
--- /dev/null
+++ b/modules/overloading/macros/%lss_v_r.sci
@@ -0,0 +1,14 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function s=%lss_v_r(s1,s2)
+ //s=%lss_v_r(s1,s2) <=> s=s1/.s2 :feedback operation
+ //!
+ [s1,s2]=sysconv(s1,s2);s=s1/.s2;
+endfunction
diff --git a/modules/overloading/macros/%lss_v_s.bin b/modules/overloading/macros/%lss_v_s.bin
new file mode 100755
index 000000000..71a681948
--- /dev/null
+++ b/modules/overloading/macros/%lss_v_s.bin
Binary files differ
diff --git a/modules/overloading/macros/%lss_v_s.sci b/modules/overloading/macros/%lss_v_s.sci
new file mode 100755
index 000000000..0e31a6816
--- /dev/null
+++ b/modules/overloading/macros/%lss_v_s.sci
@@ -0,0 +1,18 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA - Serge Steer
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function [s]=%lss_v_s(s1,d2)
+ //s=%lss_v_s(s1,d2) <=> s=s1/.d2
+ //!
+ [a1,b1,c1,d1,x1,dom1]=s1(2:7)
+ e12=1/(eye()+d2*d1)
+ e21=eye()-d1*e12*d2;e12=b1*e12
+ a=a1-e12*d2*c1
+ s=tlist(["lss","A","B","C","D","X0","dt"],a1-e12*d2*c1,e12,e21*c1,e21*d1,x1,dom1)
+endfunction
diff --git a/modules/overloading/macros/%lt_i_s.bin b/modules/overloading/macros/%lt_i_s.bin
new file mode 100755
index 000000000..ba6f3159d
--- /dev/null
+++ b/modules/overloading/macros/%lt_i_s.bin
Binary files differ
diff --git a/modules/overloading/macros/%lt_i_s.sci b/modules/overloading/macros/%lt_i_s.sci
new file mode 100755
index 000000000..f1173e3a7
--- /dev/null
+++ b/modules/overloading/macros/%lt_i_s.sci
@@ -0,0 +1,13 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function M=%lt_i_s(varargin)
+ M=generic_i_s(varargin(:))
+endfunction
+
diff --git a/modules/overloading/macros/%m_n_l.bin b/modules/overloading/macros/%m_n_l.bin
new file mode 100755
index 000000000..e15587a06
--- /dev/null
+++ b/modules/overloading/macros/%m_n_l.bin
Binary files differ
diff --git a/modules/overloading/macros/%m_n_l.sci b/modules/overloading/macros/%m_n_l.sci
new file mode 100755
index 000000000..664463cb6
--- /dev/null
+++ b/modules/overloading/macros/%m_n_l.sci
@@ -0,0 +1,14 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function [r]=%m_n_l(l1,l2)
+ // r= %m_n_l(l1,l2) <=> l1==l2 l2:list l1:function
+
+ r=%t
+endfunction
diff --git a/modules/overloading/macros/%m_o_l.bin b/modules/overloading/macros/%m_o_l.bin
new file mode 100755
index 000000000..73e930d9c
--- /dev/null
+++ b/modules/overloading/macros/%m_o_l.bin
Binary files differ
diff --git a/modules/overloading/macros/%m_o_l.sci b/modules/overloading/macros/%m_o_l.sci
new file mode 100755
index 000000000..c0bde8e5e
--- /dev/null
+++ b/modules/overloading/macros/%m_o_l.sci
@@ -0,0 +1,15 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function [r]=%m_o_l(l1,l2)
+ //r=%m_o_l(l1,l2) <=> l1==l2 l2: list l1: function
+ //!
+
+ r=%f
+endfunction
diff --git a/modules/overloading/macros/%mc_i_h.bin b/modules/overloading/macros/%mc_i_h.bin
new file mode 100755
index 000000000..c9b3c4140
--- /dev/null
+++ b/modules/overloading/macros/%mc_i_h.bin
Binary files differ
diff --git a/modules/overloading/macros/%mc_i_h.sci b/modules/overloading/macros/%mc_i_h.sci
new file mode 100755
index 000000000..0f587e5a0
--- /dev/null
+++ b/modules/overloading/macros/%mc_i_h.sci
@@ -0,0 +1,16 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function h=%mc_i_h(i,v,h)
+ h=generic_i_h(i,v,h)
+endfunction
+
+
+
+
diff --git a/modules/overloading/macros/%mc_i_s.bin b/modules/overloading/macros/%mc_i_s.bin
new file mode 100755
index 000000000..e0232910e
--- /dev/null
+++ b/modules/overloading/macros/%mc_i_s.bin
Binary files differ
diff --git a/modules/overloading/macros/%mc_i_s.sci b/modules/overloading/macros/%mc_i_s.sci
new file mode 100755
index 000000000..4d45579d1
--- /dev/null
+++ b/modules/overloading/macros/%mc_i_s.sci
@@ -0,0 +1,12 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function M=%mc_i_s(varargin)
+ M=generic_i_s(varargin(:))
+endfunction
diff --git a/modules/overloading/macros/%mc_i_st.bin b/modules/overloading/macros/%mc_i_st.bin
new file mode 100755
index 000000000..f90735e37
--- /dev/null
+++ b/modules/overloading/macros/%mc_i_st.bin
Binary files differ
diff --git a/modules/overloading/macros/%mc_i_st.sci b/modules/overloading/macros/%mc_i_st.sci
new file mode 100755
index 000000000..0941b356f
--- /dev/null
+++ b/modules/overloading/macros/%mc_i_st.sci
@@ -0,0 +1,12 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function out=%mc_i_st(i,in,out)
+ out=generic_i_st(i,in,out)
+endfunction
diff --git a/modules/overloading/macros/%mc_n_st.bin b/modules/overloading/macros/%mc_n_st.bin
new file mode 100755
index 000000000..7d2a55383
--- /dev/null
+++ b/modules/overloading/macros/%mc_n_st.bin
Binary files differ
diff --git a/modules/overloading/macros/%mc_n_st.sci b/modules/overloading/macros/%mc_n_st.sci
new file mode 100755
index 000000000..86b4269bc
--- /dev/null
+++ b/modules/overloading/macros/%mc_n_st.sci
@@ -0,0 +1,14 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA, Serge Steer
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function r=%mc_n_st(a,b)
+ // implements r=a~=b
+ // for a a function and b a struct
+ r=%t
+endfunction
diff --git a/modules/overloading/macros/%mc_o_st.bin b/modules/overloading/macros/%mc_o_st.bin
new file mode 100755
index 000000000..ee21dc0c2
--- /dev/null
+++ b/modules/overloading/macros/%mc_o_st.bin
Binary files differ
diff --git a/modules/overloading/macros/%mc_o_st.sci b/modules/overloading/macros/%mc_o_st.sci
new file mode 100755
index 000000000..0193ee546
--- /dev/null
+++ b/modules/overloading/macros/%mc_o_st.sci
@@ -0,0 +1,14 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA, Serge Steer
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function r=%mc_o_st(a,b)
+ // implements r=a==b
+ // for a a function and b a struct
+ r=%f
+endfunction
diff --git a/modules/overloading/macros/%msp_i_s.bin b/modules/overloading/macros/%msp_i_s.bin
new file mode 100755
index 000000000..6712a5c1b
--- /dev/null
+++ b/modules/overloading/macros/%msp_i_s.bin
Binary files differ
diff --git a/modules/overloading/macros/%msp_i_s.sci b/modules/overloading/macros/%msp_i_s.sci
new file mode 100755
index 000000000..6e8d48efc
--- /dev/null
+++ b/modules/overloading/macros/%msp_i_s.sci
@@ -0,0 +1,44 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function M=%msp_i_s(varargin)
+ // %msp_i_s(i,j,b,a) insert matlab sparse matrix b into full matrix a
+ // M(i,j)=b
+ //!
+
+ [lhs,rhs]=argn(0)
+
+ M=varargin(rhs)
+ N=varargin(rhs-1)//inserted matrix
+ index=varargin(1) //
+
+ if rhs==3&(type(index)==10|type(index)==15) then
+ M=createstruct(index,N)
+ if type(index(1))<>10 & index(2)=="entries" then
+ // change struct to cell
+ f=getfield(1,M);f(1)="ce"
+ setfield(1,f,M)
+ end
+ elseif rhs>4 then //more than 2 indices:
+
+ //insertion of a sparse matrix in a matrix of numbers
+ error(msprintf(_("%s: Insertion of a sparse matrix in a matrix of numbers is not defined.\n"),"%msp_i_s"));
+ else
+ i=varargin(1);
+ j=varargin(2);
+ M=varargin(4);
+ b=varargin(3);
+ if rhs==4 then
+ M(i,j)=full(b)
+ else
+ M=b;//b=j
+ M(i)=full(j)
+ end
+ end
+endfunction
diff --git a/modules/overloading/macros/%msp_i_st.bin b/modules/overloading/macros/%msp_i_st.bin
new file mode 100755
index 000000000..73ebe5f5e
--- /dev/null
+++ b/modules/overloading/macros/%msp_i_st.bin
Binary files differ
diff --git a/modules/overloading/macros/%msp_i_st.sci b/modules/overloading/macros/%msp_i_st.sci
new file mode 100755
index 000000000..6b6f14b67
--- /dev/null
+++ b/modules/overloading/macros/%msp_i_st.sci
@@ -0,0 +1,12 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function out=%msp_i_st(i,in,out)
+ out=generic_i_st(i,in,out)
+endfunction
diff --git a/modules/overloading/macros/%msp_n_msp.bin b/modules/overloading/macros/%msp_n_msp.bin
new file mode 100755
index 000000000..ccfff5485
--- /dev/null
+++ b/modules/overloading/macros/%msp_n_msp.bin
Binary files differ
diff --git a/modules/overloading/macros/%msp_n_msp.sci b/modules/overloading/macros/%msp_n_msp.sci
new file mode 100755
index 000000000..ab388a716
--- /dev/null
+++ b/modules/overloading/macros/%msp_n_msp.sci
@@ -0,0 +1,14 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function r=%msp_n_msp(l1,l2)
+ [ij,v,mn]=spget(l1);l1=sparse(ij,v,mn)
+ [ij,v,mn]=spget(l2);l2=sparse(ij,v,mn)
+ r=l1<>l2
+endfunction
diff --git a/modules/overloading/macros/%msp_o_msp.bin b/modules/overloading/macros/%msp_o_msp.bin
new file mode 100755
index 000000000..6111b4854
--- /dev/null
+++ b/modules/overloading/macros/%msp_o_msp.bin
Binary files differ
diff --git a/modules/overloading/macros/%msp_o_msp.sci b/modules/overloading/macros/%msp_o_msp.sci
new file mode 100755
index 000000000..7fcc8caec
--- /dev/null
+++ b/modules/overloading/macros/%msp_o_msp.sci
@@ -0,0 +1,14 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function r=%msp_o_msp(l1,l2)
+ [ij,v,mn]=spget(l1);l1=sparse(ij,v,mn)
+ [ij,v,mn]=spget(l2);l2=sparse(ij,v,mn)
+ r=l1==l2
+endfunction
diff --git a/modules/overloading/macros/%msp_p.bin b/modules/overloading/macros/%msp_p.bin
new file mode 100755
index 000000000..4fc031e2e
--- /dev/null
+++ b/modules/overloading/macros/%msp_p.bin
Binary files differ
diff --git a/modules/overloading/macros/%msp_p.sci b/modules/overloading/macros/%msp_p.sci
new file mode 100755
index 000000000..193fc504e
--- /dev/null
+++ b/modules/overloading/macros/%msp_p.sci
@@ -0,0 +1,24 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function %msp_p(x)
+ [ij,v,mn]=spget(x);
+ IJ=string(ij);MN=string(mn);
+ if v==[] then disp(v);return;end
+ V=string(v);
+ n=size(V,1)
+ lp="("
+ rp=") "
+ comma=", "
+
+ t=["("+MN(1,1)+comma+MN(1,2)+") m sparse matrix"
+ " "
+ lp(ones(n,1))+IJ(:,1)+comma(ones(n,1))+IJ(:,2)+rp(ones(n,1))+V(:)]
+ write(%io(2),t,"(a)")
+endfunction
diff --git a/modules/overloading/macros/%msp_spones.bin b/modules/overloading/macros/%msp_spones.bin
new file mode 100755
index 000000000..95258fe1b
--- /dev/null
+++ b/modules/overloading/macros/%msp_spones.bin
Binary files differ
diff --git a/modules/overloading/macros/%msp_spones.sci b/modules/overloading/macros/%msp_spones.sci
new file mode 100755
index 000000000..76b9ec875
--- /dev/null
+++ b/modules/overloading/macros/%msp_spones.sci
@@ -0,0 +1,17 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function [r] = %msp_spones(s)
+ // Replace nonzero elements with ones in matlab sparse matrix
+ // r=spones(s) generates a matrix with the sane sparsity structure as s,
+ // but with ones in the nonzero positions;
+ //
+ [ij,v,mn]=spget(s);
+ r=sparse(ij,ones(v),mn);
+endfunction
diff --git a/modules/overloading/macros/%p_a_lss.bin b/modules/overloading/macros/%p_a_lss.bin
new file mode 100755
index 000000000..c6f063392
--- /dev/null
+++ b/modules/overloading/macros/%p_a_lss.bin
Binary files differ
diff --git a/modules/overloading/macros/%p_a_lss.sci b/modules/overloading/macros/%p_a_lss.sci
new file mode 100755
index 000000000..f0b88d966
--- /dev/null
+++ b/modules/overloading/macros/%p_a_lss.sci
@@ -0,0 +1,14 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function s2=%p_a_lss(d1,s2)
+ //s=%p_a_lss(d1,s2) <=> s=d1+s2 polynomail mat. + syslin list
+ //!
+ s2(5)=d1+s2(5)
+endfunction
diff --git a/modules/overloading/macros/%p_a_r.bin b/modules/overloading/macros/%p_a_r.bin
new file mode 100755
index 000000000..1aa7d93a1
--- /dev/null
+++ b/modules/overloading/macros/%p_a_r.bin
Binary files differ
diff --git a/modules/overloading/macros/%p_a_r.sci b/modules/overloading/macros/%p_a_r.sci
new file mode 100755
index 000000000..1472aa99c
--- /dev/null
+++ b/modules/overloading/macros/%p_a_r.sci
@@ -0,0 +1,45 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function f=%p_a_r(m,f)
+ //f= m+f
+ // author Serge Steer, INRIA
+ //!
+ [num,den]=f(["num","den"])
+ szf=size(den)
+ szm=size(m)
+
+ if and(szf>=0)&and(szm>=0) then
+ if prod(szf)==1&prod(szm)>1 then
+ den=den(ones(m))
+ szf=szm
+ end
+
+ if size(szf,"*")>2 then
+ num=num(:);den=den(:);m=m(:)
+ end
+ [num,den]=simp(num+m.*den,den)
+ num=matrix(num,szf)
+ den=matrix(den,szf)
+ else
+ //at leat one matrix is eye*x
+ if size(szf,"*")>2|size(szm,"*")>2 then
+ error(8)
+ end
+ if or(szf<0)&or(szm<0) then
+ [num,den]=simp(num+m.*den,den)
+ elseif or(szf<0) then
+ [num,den]=simp(num+m.*den,den*ones(m))
+ elseif or(szm<0) then
+ [num,den]=simp(num+(m+0)*eye(den).*den,den)
+ end
+ end
+ f=rlist(num,den,f.dt)
+endfunction
+
diff --git a/modules/overloading/macros/%p_c_lss.bin b/modules/overloading/macros/%p_c_lss.bin
new file mode 100755
index 000000000..38da2f31d
--- /dev/null
+++ b/modules/overloading/macros/%p_c_lss.bin
Binary files differ
diff --git a/modules/overloading/macros/%p_c_lss.sci b/modules/overloading/macros/%p_c_lss.sci
new file mode 100755
index 000000000..2653e40be
--- /dev/null
+++ b/modules/overloading/macros/%p_c_lss.sci
@@ -0,0 +1,16 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function [s]=%p_c_lss(d1,s2)
+ //s=%p_c_lss(d1,s2) <=> s=[d1,s2] d1: polynomial mat. s2:syslin list
+ //!
+ [a2,b2,c2,d2,x2,dom2]=s2(2:7)
+ [n2,m2]=size(b2);[p1,m1]=size(d1)
+ s=tlist(["lss","A","B","C","D","X0","dt"],a2,[0*ones(n2,m1),b2],c2,[d1,d2],x2,dom2)
+endfunction
diff --git a/modules/overloading/macros/%p_c_r.bin b/modules/overloading/macros/%p_c_r.bin
new file mode 100755
index 000000000..91de1f26b
--- /dev/null
+++ b/modules/overloading/macros/%p_c_r.bin
Binary files differ
diff --git a/modules/overloading/macros/%p_c_r.sci b/modules/overloading/macros/%p_c_r.sci
new file mode 100755
index 000000000..1eec20c94
--- /dev/null
+++ b/modules/overloading/macros/%p_c_r.sci
@@ -0,0 +1,15 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function f=%p_c_r(m,f)
+ // f= %p_c_r(m,f) <=> r= [m,f] m:polynomial mat. r: rational mat.
+ //!
+ // Copyright INRIA
+ f=rlist([m,f("num")],[ones(m),f("den")],f("dt"))
+endfunction
diff --git a/modules/overloading/macros/%p_cumprod.bin b/modules/overloading/macros/%p_cumprod.bin
new file mode 100755
index 000000000..dffaf3a0b
--- /dev/null
+++ b/modules/overloading/macros/%p_cumprod.bin
Binary files differ
diff --git a/modules/overloading/macros/%p_cumprod.sci b/modules/overloading/macros/%p_cumprod.sci
new file mode 100755
index 000000000..5bb2c6f6d
--- /dev/null
+++ b/modules/overloading/macros/%p_cumprod.sci
@@ -0,0 +1,71 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2010 - INRIA - Serge Steer
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function a = %p_cumprod(varargin)
+ // If we call cumprod with 3 arguments, the third is optional for polynomial matrices.
+ a = varargin(1)
+ dims = size(a);
+
+ nargs = size(varargin);
+ select nargs
+ case 1
+ d = "*";
+ case 2
+ if or(varargin(2) == ["native", "double"]) then
+ d = "*";
+ else
+ d = varargin(2);
+ end
+ case 3
+ d = varargin(2);
+ else
+ error(msprintf(_("%s: Wrong number of input argument(s): %d to %d expected.\n"),"cumprod", 1, 3));
+ end
+
+ // Check second argument : d
+ select type(d)
+ case 1
+ if size(d,'*') <> 1 then
+ error(msprintf(_("%s: Wrong size for input argument #%d: A scalar expected.\n"),"cumprod", 2))
+ end
+ if int(d) <> d | d < 0 then
+ error(msprintf(_("%s: Wrong value for input argument #%d: Integer >= %d expected.\n"),"cumprod", 2, 1))
+ end
+ case 10
+ if size(d,'*') <> 1 then
+ error(msprintf(_("%s: Wrong size for input argument #%d: A string expected.\n"),"cumprod",2))
+ end
+ if and(d<>["r","c","*","m"]) then
+ error(msprintf(_("%s: Wrong value for input argument #%d: Must be in the set {%s}.\n"),..
+ "cumprod",2,"""*"",""r"",""c"",""m"""))
+ end
+
+ pos = [1,2,0,find(dims>1,1)];
+ d=pos(find(d==["r","c","*","m"]))
+ else
+ error(msprintf(_("%s: Wrong type for input argument #%d: A string or scalar expected.\n"),"cumprod",2))
+ end
+
+ select d
+ case 0 then
+ for k=2:prod(dims)
+ a(k)=a(k-1)*a(k)
+ end
+ case 1 then
+ for k=1:dims(2)
+ a(:,k)=cumprod(a(:,k))
+ end
+ case 2 then
+ for k=1:dims(1)
+ a(k,:)=cumprod(a(k,:))
+ end
+ else
+ a=a
+ end
+endfunction
diff --git a/modules/overloading/macros/%p_cumsum.bin b/modules/overloading/macros/%p_cumsum.bin
new file mode 100755
index 000000000..de0af20d7
--- /dev/null
+++ b/modules/overloading/macros/%p_cumsum.bin
Binary files differ
diff --git a/modules/overloading/macros/%p_cumsum.sci b/modules/overloading/macros/%p_cumsum.sci
new file mode 100755
index 000000000..da69703f4
--- /dev/null
+++ b/modules/overloading/macros/%p_cumsum.sci
@@ -0,0 +1,71 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2010 - INRIA - Serge Steer
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function a = %p_cumsum(varargin)
+ a = varargin(1)
+ dims = size(a);
+
+ nargs = size(varargin);
+ select nargs
+ case 1
+ d = "*";
+ case 2
+ if or(varargin(2) == ["native", "double"]) then
+ d = "*";
+ else
+ d = varargin(2);
+ end
+ case 3
+ d = varargin(2);
+ else
+ error(msprintf(_("%s: Wrong number of input argument(s): %d to %d expected.\n"),"cumsum", 1, 3));
+ end
+
+ // Check second argument : d
+ select type(d)
+ case 1
+ if size(d,'*') <> 1 then
+ error(msprintf(_("%s: Wrong size for input argument #%d: A scalar expected.\n"),"cumsum", 2))
+ end
+ if int(d) <> d | d < 0 then
+ error(msprintf(_("%s: Wrong value for input argument #%d: Integer >= %d expected.\n"),"cumsum", 2, 1))
+ end
+ case 10
+ if size(d,'*') <> 1 then
+ error(msprintf(_("%s: Wrong size for input argument #%d: A string expected.\n"),"cumsum",2))
+ end
+ if and(d<>["r","c","*","m"]) then
+ error(msprintf(_("%s: Wrong value for input argument #%d: Must be in the set {%s}.\n"),..
+ "cumsum",2,"""*"",""r"",""c"",""m"""))
+ end
+
+ pos = [1,2,0,find(dims>1,1)];
+ d=pos(find(d==["r","c","*","m"]))
+
+ else
+ error(msprintf(_("%s: Wrong type for input argument #%d: A string or scalar expected.\n"),"cumsum",2))
+ end
+
+ select d
+ case 0 then
+ for k=2:prod(dims)
+ a(k)=a(k-1)+a(k)
+ end
+ case 1 then
+ for k=1:dims(2)
+ a(:,k)=cumsum(a(:,k))
+ end
+ case 2 then
+ for k=1:dims(1)
+ a(k,:)=cumsum(a(k,:))
+ end
+ else
+ a=a
+ end
+endfunction
diff --git a/modules/overloading/macros/%p_d_p.bin b/modules/overloading/macros/%p_d_p.bin
new file mode 100755
index 000000000..2dd183804
--- /dev/null
+++ b/modules/overloading/macros/%p_d_p.bin
Binary files differ
diff --git a/modules/overloading/macros/%p_d_p.sci b/modules/overloading/macros/%p_d_p.sci
new file mode 100755
index 000000000..90b3b0534
--- /dev/null
+++ b/modules/overloading/macros/%p_d_p.sci
@@ -0,0 +1,21 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function f=%p_d_p(p1,p2)
+ //f= %p_d_p(p1,p2) <=> f=p1./p2
+ //!
+ // Copyright INRIA
+ if size(p1,"*")==1 then
+ p1=p1*ones(p2)
+ elseif size(p2,"*")==1 then
+ p2=p2*ones(p1)
+ end
+ [p1,p2]=simp(p1,p2);
+ f=rlist(p1,p2,[])
+endfunction
diff --git a/modules/overloading/macros/%p_d_r.bin b/modules/overloading/macros/%p_d_r.bin
new file mode 100755
index 000000000..fcd6a3796
--- /dev/null
+++ b/modules/overloading/macros/%p_d_r.bin
Binary files differ
diff --git a/modules/overloading/macros/%p_d_r.sci b/modules/overloading/macros/%p_d_r.sci
new file mode 100755
index 000000000..ee85e3430
--- /dev/null
+++ b/modules/overloading/macros/%p_d_r.sci
@@ -0,0 +1,15 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function f=%p_d_r(n1,f2)
+ // n1./f2
+ //!
+
+ f=rlist(n1.*f2("den"),ones(n1).*f2("num"),f2("dt"))
+endfunction
diff --git a/modules/overloading/macros/%p_d_s.bin b/modules/overloading/macros/%p_d_s.bin
new file mode 100755
index 000000000..091a019b0
--- /dev/null
+++ b/modules/overloading/macros/%p_d_s.bin
Binary files differ
diff --git a/modules/overloading/macros/%p_d_s.sci b/modules/overloading/macros/%p_d_s.sci
new file mode 100755
index 000000000..b53ae3e0d
--- /dev/null
+++ b/modules/overloading/macros/%p_d_s.sci
@@ -0,0 +1,19 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function [z]=%p_d_s(x,y)
+ //z = x ./ y , x vector of polynomials y scalar
+ // and other matrix polynomial
+ [m,n]=size(x)
+ if m*n==1 then
+ z=x*ones(y)./y
+ else
+ z=x./y*ones(x)
+ end
+endfunction
diff --git a/modules/overloading/macros/%p_det.bin b/modules/overloading/macros/%p_det.bin
new file mode 100755
index 000000000..b53ac55da
--- /dev/null
+++ b/modules/overloading/macros/%p_det.bin
Binary files differ
diff --git a/modules/overloading/macros/%p_det.sci b/modules/overloading/macros/%p_det.sci
new file mode 100755
index 000000000..8106e8ddd
--- /dev/null
+++ b/modules/overloading/macros/%p_det.sci
@@ -0,0 +1,12 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function x=%p_det(a)
+ x=determ(a)
+endfunction
diff --git a/modules/overloading/macros/%p_e.bin b/modules/overloading/macros/%p_e.bin
new file mode 100755
index 000000000..78e2e23ef
--- /dev/null
+++ b/modules/overloading/macros/%p_e.bin
Binary files differ
diff --git a/modules/overloading/macros/%p_e.sci b/modules/overloading/macros/%p_e.sci
new file mode 100755
index 000000000..3d8675c13
--- /dev/null
+++ b/modules/overloading/macros/%p_e.sci
@@ -0,0 +1,34 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function f=%p_e(varargin)
+ //A(i,j,k,..)
+
+ rhs=size(varargin)
+ M=varargin(rhs)
+
+ nind=rhs-1
+ dims=[]
+ //check if all indexes of order greater than 2 contains only ones
+ for k=3:nind
+ ind=varargin(k)
+ if type(ind)==2|type(ind)==129 then ind=horner(ind,1),end
+ if type(ind)==4 then ind=find(ind),end
+ if or(ind<>1) then error(21),end
+ n=size(ind,"*")
+ dims=[dims,n]
+ end
+ f=M(varargin(1:min(2,rhs-1)))
+ k=find(dims>1)
+ if k<>[] then
+ dims(k($)+1:$)=[]
+ N=prod(dims)
+ f=mlist(["hm","dims","entries"],int32([size(f) dims]),ones(N,1).*.f(:))
+ end
+endfunction
diff --git a/modules/overloading/macros/%p_f_lss.bin b/modules/overloading/macros/%p_f_lss.bin
new file mode 100755
index 000000000..bdeaa5b88
--- /dev/null
+++ b/modules/overloading/macros/%p_f_lss.bin
Binary files differ
diff --git a/modules/overloading/macros/%p_f_lss.sci b/modules/overloading/macros/%p_f_lss.sci
new file mode 100755
index 000000000..aebf1b940
--- /dev/null
+++ b/modules/overloading/macros/%p_f_lss.sci
@@ -0,0 +1,17 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function [s]=%p_f_lss(d1,s2)
+ //[s]=%p_f_lss(d1,s2) <=> s=[d1,s2]
+ //!
+
+ [a2,b2,c2,d2,x2,dom2]=s2(2:7)
+ [n2,m2]=size(c2);[p1,m1]=size(d1)
+ s=tlist(["lss","A","B","C","D","X0","dt"],a2,b2,[0*ones(p1,m2);c2],[d1;d2],x2,dom2)
+endfunction
diff --git a/modules/overloading/macros/%p_f_r.bin b/modules/overloading/macros/%p_f_r.bin
new file mode 100755
index 000000000..c40e95832
--- /dev/null
+++ b/modules/overloading/macros/%p_f_r.bin
Binary files differ
diff --git a/modules/overloading/macros/%p_f_r.sci b/modules/overloading/macros/%p_f_r.sci
new file mode 100755
index 000000000..a3205443e
--- /dev/null
+++ b/modules/overloading/macros/%p_f_r.sci
@@ -0,0 +1,14 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function f=%p_f_r(m,f)
+ // [m;f] [polynomial;rational]
+ //!
+ f=rlist([m;f("num")],[ones(m);f("den")],f("dt"))
+endfunction
diff --git a/modules/overloading/macros/%p_i_ce.bin b/modules/overloading/macros/%p_i_ce.bin
new file mode 100755
index 000000000..c38241f3c
--- /dev/null
+++ b/modules/overloading/macros/%p_i_ce.bin
Binary files differ
diff --git a/modules/overloading/macros/%p_i_ce.sci b/modules/overloading/macros/%p_i_ce.sci
new file mode 100755
index 000000000..7adf2bee1
--- /dev/null
+++ b/modules/overloading/macros/%p_i_ce.sci
@@ -0,0 +1,13 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA - Vincent Couvert
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function M=%p_i_ce(varargin)
+ // Insertion of a polynomial matrix in a cell
+ M=generic_i_ce(varargin(:))
+endfunction
diff --git a/modules/overloading/macros/%p_i_h.bin b/modules/overloading/macros/%p_i_h.bin
new file mode 100755
index 000000000..649d43e1e
--- /dev/null
+++ b/modules/overloading/macros/%p_i_h.bin
Binary files differ
diff --git a/modules/overloading/macros/%p_i_h.sci b/modules/overloading/macros/%p_i_h.sci
new file mode 100755
index 000000000..4b6d5321d
--- /dev/null
+++ b/modules/overloading/macros/%p_i_h.sci
@@ -0,0 +1,16 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function h=%p_i_h(i,v,h)
+ h=generic_i_h(i,v,h)
+endfunction
+
+
+
+
diff --git a/modules/overloading/macros/%p_i_hm.bin b/modules/overloading/macros/%p_i_hm.bin
new file mode 100755
index 000000000..217a20cc9
--- /dev/null
+++ b/modules/overloading/macros/%p_i_hm.bin
Binary files differ
diff --git a/modules/overloading/macros/%p_i_hm.sci b/modules/overloading/macros/%p_i_hm.sci
new file mode 100755
index 000000000..946ca7cad
--- /dev/null
+++ b/modules/overloading/macros/%p_i_hm.sci
@@ -0,0 +1,14 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function M=%p_i_hm(varargin)
+
+ //insertion of an polynomial matrix in an hypermatrix
+ M=generic_i_hm(0,varargin(:))
+endfunction
diff --git a/modules/overloading/macros/%p_i_lss.bin b/modules/overloading/macros/%p_i_lss.bin
new file mode 100755
index 000000000..51457023e
--- /dev/null
+++ b/modules/overloading/macros/%p_i_lss.bin
Binary files differ
diff --git a/modules/overloading/macros/%p_i_lss.sci b/modules/overloading/macros/%p_i_lss.sci
new file mode 100755
index 000000000..a0e66bdb6
--- /dev/null
+++ b/modules/overloading/macros/%p_i_lss.sci
@@ -0,0 +1,30 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function s2=%p_i_lss(i,j,s1,s2)
+ //s2=%p_i_lss(i,j,s1,s2) <=> s2(i,j)=s1
+ //!
+
+ if type(i)==10 then // sl('D')
+ [lhs,rhs]=argn(0)
+ if rhs<>3 then error(21),end
+ if i<>"D" then
+ error(msprintf(_("%s: Wrong type for input argument #%d.\n"),"%p_i_lss",1));
+ end
+ s2=s1;kf=5
+ if size(s2(kf))<>size(j) then
+ warning(msprintf(_("%s: Wrong type for input argument #%d.\n"),"%p_i_lss",1));
+ end
+ s2(kf)=j
+ return
+ end
+
+ s1=tlist(["lss","A","B","C","D","X0","dt"],[],[],[],s1,[],[])
+ s2(i,j)=s1
+endfunction
diff --git a/modules/overloading/macros/%p_i_p.bin b/modules/overloading/macros/%p_i_p.bin
new file mode 100755
index 000000000..ed441a217
--- /dev/null
+++ b/modules/overloading/macros/%p_i_p.bin
Binary files differ
diff --git a/modules/overloading/macros/%p_i_p.sci b/modules/overloading/macros/%p_i_p.sci
new file mode 100755
index 000000000..7fc1ea46d
--- /dev/null
+++ b/modules/overloading/macros/%p_i_p.sci
@@ -0,0 +1,17 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA - serge Steer
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function M=%p_i_p(varargin)
+ //insertion of an polynomial matrix in an matrix of polynomials for more than 2 indices
+
+ M=varargin($)
+ M=mlist(["hm","dims","entries"],int32(size(M)),M(:))
+ varargin($)=M;
+ M=generic_i_hm(0,varargin(:))
+endfunction
diff --git a/modules/overloading/macros/%p_i_r.bin b/modules/overloading/macros/%p_i_r.bin
new file mode 100755
index 000000000..38db6f228
--- /dev/null
+++ b/modules/overloading/macros/%p_i_r.bin
Binary files differ
diff --git a/modules/overloading/macros/%p_i_r.sci b/modules/overloading/macros/%p_i_r.sci
new file mode 100755
index 000000000..1f9af2cba
--- /dev/null
+++ b/modules/overloading/macros/%p_i_r.sci
@@ -0,0 +1,26 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function s1=%p_i_r(varargin)
+ //Author Serge Steer, INRIA
+ //!
+ s2=varargin($)
+ s1=varargin($-1)
+ //s2(i,...)=s1, s1 matrix of polynomials
+
+ num=s2.num;
+ sz2=size(num)
+ ind=list(); for i=sz2,ind($+1)=1:i,end
+ num(varargin(1:$-2))=s1
+ den=ones(num);
+ den(ind(:))=s2.den;
+ den(varargin(1:$-2))=ones(s1);
+
+ s1=rlist(num,den,s2.dt)
+endfunction
diff --git a/modules/overloading/macros/%p_i_s.bin b/modules/overloading/macros/%p_i_s.bin
new file mode 100755
index 000000000..dc92aec65
--- /dev/null
+++ b/modules/overloading/macros/%p_i_s.bin
Binary files differ
diff --git a/modules/overloading/macros/%p_i_s.sci b/modules/overloading/macros/%p_i_s.sci
new file mode 100755
index 000000000..8b5ac0b4c
--- /dev/null
+++ b/modules/overloading/macros/%p_i_s.sci
@@ -0,0 +1,31 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function M=%p_i_s(varargin)
+ [lhs,rhs]=argn(0)
+ M=varargin(rhs)
+ N=varargin(rhs-1)//inserted matrix
+ index=varargin(1) //
+
+ if rhs==3&(type(index)==10|type(index)==15) then
+ M=createstruct(index,N)
+ if type(index(1))<>10 & index(2)=="entries" then
+ // change struct to cell
+ f=getfield(1,M);f(1)="ce"
+ setfield(1,f,M)
+ end
+ elseif rhs>4 then //more than 2 indices: insertion of a polynomial in an matrix of numbers
+ M=varargin($)
+ M=mlist(["hm","dims","entries"],int32(size(M)),M(:))
+ varargin($)=M;
+ M=generic_i_hm(0,varargin(:))
+ else
+ //should not occurs (hard coded case)
+ end
+endfunction
diff --git a/modules/overloading/macros/%p_i_st.bin b/modules/overloading/macros/%p_i_st.bin
new file mode 100755
index 000000000..111452beb
--- /dev/null
+++ b/modules/overloading/macros/%p_i_st.bin
Binary files differ
diff --git a/modules/overloading/macros/%p_i_st.sci b/modules/overloading/macros/%p_i_st.sci
new file mode 100755
index 000000000..f3c97ae27
--- /dev/null
+++ b/modules/overloading/macros/%p_i_st.sci
@@ -0,0 +1,12 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function out=%p_i_st(i,in,out)
+ out=generic_i_st(i,in,out)
+endfunction
diff --git a/modules/overloading/macros/%p_inv.bin b/modules/overloading/macros/%p_inv.bin
new file mode 100755
index 000000000..0feb1e679
--- /dev/null
+++ b/modules/overloading/macros/%p_inv.bin
Binary files differ
diff --git a/modules/overloading/macros/%p_inv.sci b/modules/overloading/macros/%p_inv.sci
new file mode 100755
index 000000000..d6e0dddb5
--- /dev/null
+++ b/modules/overloading/macros/%p_inv.sci
@@ -0,0 +1,13 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function x=%p_inv(a)
+
+ x=invr(a)
+endfunction
diff --git a/modules/overloading/macros/%p_j_s.bin b/modules/overloading/macros/%p_j_s.bin
new file mode 100755
index 000000000..3a7afdb60
--- /dev/null
+++ b/modules/overloading/macros/%p_j_s.bin
Binary files differ
diff --git a/modules/overloading/macros/%p_j_s.sci b/modules/overloading/macros/%p_j_s.sci
new file mode 100755
index 000000000..d9e11729c
--- /dev/null
+++ b/modules/overloading/macros/%p_j_s.sci
@@ -0,0 +1,54 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function f=%p_j_s(p,s)
+ // %p_j_s(p,s) computes p.^s for p polynomial matrix in special cases
+ //!
+
+ if s==[] then f=[],return,end
+ if or(imag(s)<>0)|or(int(s)<>s) then error(msprintf(_("%s: Wrong type for input argument #%d: An integer matrix expected.\n"),"%p_j_s",2)),end
+ [m,n]=size(p)
+ [ms,ns]=size(s)
+ if ms==1&ns==1 then
+ if s<0 then
+ if or(abs(coeff(p(:)))*ones(max(degree(p))+1,1)==0) then
+ error(27)
+ end
+ f=rlist(ones(p),p.^(-s),[])
+ else // this case is in fact hard coded
+ f=p.^s
+ end
+ elseif m==1&n==1 then // Element wise exponentiation p.^s with p "scalar"
+ kp=find(s>=0)
+ kn=find(s<0)
+ num=ones(s)
+ den=ones(s)
+ num(kp)=p.^s(kp)
+ p=1/p
+ num(kn)=p(2).^(-s(kn))
+ den(kn)=p(3).^(-s(kn))
+ f=rlist(num,den,[])
+ elseif ms==m&ns==n then // Element wise exponentiation
+ p=p(:);s=s(:);
+ kp=find(s>=0)
+ kn=find(s<0)
+ num=p
+ den=ones(s)
+ num(kp)=num(kp).^s(kp)
+ if or(abs(coeff(p(kn)))*ones(max(degree(p(kn)))+1,1)==0) then
+ error(27)
+ end
+ num(kn)=ones(p(kn))
+ den(kn)=p(kn).^(-s(kn))
+ f = rlist(matrix(num,n,m),matrix(den,n,m),[])
+ else
+ error(30)
+ end
+
+endfunction
diff --git a/modules/overloading/macros/%p_k_p.bin b/modules/overloading/macros/%p_k_p.bin
new file mode 100755
index 000000000..ef2eacf5c
--- /dev/null
+++ b/modules/overloading/macros/%p_k_p.bin
Binary files differ
diff --git a/modules/overloading/macros/%p_k_p.sci b/modules/overloading/macros/%p_k_p.sci
new file mode 100755
index 000000000..a73febc00
--- /dev/null
+++ b/modules/overloading/macros/%p_k_p.sci
@@ -0,0 +1,25 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function r=%p_k_p(a,b)
+ // a.*.b
+
+ [ma,na]=size(a)
+ [mb,nb]=size(b)
+ r=zeros(ma*mb,na*nb)
+ k=0
+ for j=1:na
+ l=0
+ for i=1:ma
+ r(l+(1:mb),k+(1:nb))=a(i,j)*b
+ l=l+mb
+ end
+ k=k+nb
+ end
+endfunction
diff --git a/modules/overloading/macros/%p_k_r.bin b/modules/overloading/macros/%p_k_r.bin
new file mode 100755
index 000000000..2310450af
--- /dev/null
+++ b/modules/overloading/macros/%p_k_r.bin
Binary files differ
diff --git a/modules/overloading/macros/%p_k_r.sci b/modules/overloading/macros/%p_k_r.sci
new file mode 100755
index 000000000..820308aa8
--- /dev/null
+++ b/modules/overloading/macros/%p_k_r.sci
@@ -0,0 +1,25 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function r=%p_k_r(a,b)
+ // a.*.b
+
+ [ma,na]=size(a)
+ [mb,nb]=size(b)
+ r=zeros(ma*mb,na*nb)
+ k=0
+ for j=1:na
+ l=0
+ for i=1:ma
+ r(l+(1:mb),k+(1:nb))=a(i,j)*b
+ l=l+mb
+ end
+ k=k+nb
+ end
+endfunction
diff --git a/modules/overloading/macros/%p_k_s.bin b/modules/overloading/macros/%p_k_s.bin
new file mode 100755
index 000000000..b4309fc11
--- /dev/null
+++ b/modules/overloading/macros/%p_k_s.bin
Binary files differ
diff --git a/modules/overloading/macros/%p_k_s.sci b/modules/overloading/macros/%p_k_s.sci
new file mode 100755
index 000000000..532fa8135
--- /dev/null
+++ b/modules/overloading/macros/%p_k_s.sci
@@ -0,0 +1,25 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function r=%p_k_s(a,b)
+ // a.*.b
+
+ [ma,na]=size(a)
+ [mb,nb]=size(b)
+ r=zeros(ma*mb,na*nb)
+ k=0
+ for j=1:na
+ l=0
+ for i=1:ma
+ r(l+(1:mb),k+(1:nb))=a(i,j)*b
+ l=l+mb
+ end
+ k=k+nb
+ end
+endfunction
diff --git a/modules/overloading/macros/%p_l_lss.bin b/modules/overloading/macros/%p_l_lss.bin
new file mode 100755
index 000000000..532458d40
--- /dev/null
+++ b/modules/overloading/macros/%p_l_lss.bin
Binary files differ
diff --git a/modules/overloading/macros/%p_l_lss.sci b/modules/overloading/macros/%p_l_lss.sci
new file mode 100755
index 000000000..195754e7a
--- /dev/null
+++ b/modules/overloading/macros/%p_l_lss.sci
@@ -0,0 +1,16 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA - Serge Steer
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function [sr]=%p_l_lss(p,s)
+ //sr=%p_l_lss(p,s) <=> sr=p\s
+ // p polynomial mat.
+ // s state-space syslin list
+ //!
+ sr=tlist(["lss","A","B","C","D","X0","dt"],[],[],[],p,[],[])\s
+endfunction
diff --git a/modules/overloading/macros/%p_l_p.bin b/modules/overloading/macros/%p_l_p.bin
new file mode 100755
index 000000000..ff02b7ae2
--- /dev/null
+++ b/modules/overloading/macros/%p_l_p.bin
Binary files differ
diff --git a/modules/overloading/macros/%p_l_p.sci b/modules/overloading/macros/%p_l_p.sci
new file mode 100755
index 000000000..08946a515
--- /dev/null
+++ b/modules/overloading/macros/%p_l_p.sci
@@ -0,0 +1,18 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function f=%p_l_p(p2,p1)
+ // f=%p_l_p(p2,p1) <=> f=p2\p1 for polynomial matrices
+ //!
+ [l,c]=size(p2)
+ if l*c <>1 then f=invr(p2)*p1,return,end
+ [l,c]=size(p1)
+ [p1,p2]=simp(p1,p2*ones(l,c))
+ f = rlist(p1,p2,[])
+endfunction
diff --git a/modules/overloading/macros/%p_l_r.bin b/modules/overloading/macros/%p_l_r.bin
new file mode 100755
index 000000000..cdf91090a
--- /dev/null
+++ b/modules/overloading/macros/%p_l_r.bin
Binary files differ
diff --git a/modules/overloading/macros/%p_l_r.sci b/modules/overloading/macros/%p_l_r.sci
new file mode 100755
index 000000000..9e49ddb0c
--- /dev/null
+++ b/modules/overloading/macros/%p_l_r.sci
@@ -0,0 +1,20 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function f1=%p_l_r(p1,f1)
+ // f1=p1\f1
+ //!
+
+ if size(p1,"*")<>1 then
+ f1=invr(p1)*f1
+ else
+ [n1,d1]=simp(f1("num"),p1*f1("den")),
+ f1=rlist(n1,d1,f1("dt"))
+ end
+endfunction
diff --git a/modules/overloading/macros/%p_l_s.bin b/modules/overloading/macros/%p_l_s.bin
new file mode 100755
index 000000000..594fb8777
--- /dev/null
+++ b/modules/overloading/macros/%p_l_s.bin
Binary files differ
diff --git a/modules/overloading/macros/%p_l_s.sci b/modules/overloading/macros/%p_l_s.sci
new file mode 100755
index 000000000..b5b998b38
--- /dev/null
+++ b/modules/overloading/macros/%p_l_s.sci
@@ -0,0 +1,25 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function f=%p_l_s(p,m)
+ // f=%p_l_s(p,m) <=>f= p\m.
+ //!
+ [mp,np]=size(p)
+ if mp*np<>1 then
+ f=invr(p)*m,
+ else
+ [l,c]=size(m)
+ if m<>[] then m=m+poly(0,varn(p),"c"),end
+ if mp==-1&l*c==1|l==-1 then
+ f = rlist(m,p*eye(),[])
+ else
+ f = rlist(m,p*ones(l,c),[])
+ end
+ end
+endfunction
diff --git a/modules/overloading/macros/%p_m_hm.bin b/modules/overloading/macros/%p_m_hm.bin
new file mode 100755
index 000000000..089d5c1d0
--- /dev/null
+++ b/modules/overloading/macros/%p_m_hm.bin
Binary files differ
diff --git a/modules/overloading/macros/%p_m_hm.sci b/modules/overloading/macros/%p_m_hm.sci
new file mode 100755
index 000000000..2d49ac24a
--- /dev/null
+++ b/modules/overloading/macros/%p_m_hm.sci
@@ -0,0 +1,17 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function M2=%p_m_hm(M1,M2)
+ //author Serge Steer INRIA
+ if size(M1,"*")<>1 then
+ M2=hypermat(size(M1),M1)*M2
+ else
+ M2.entries=M1*M2.entries
+ end
+endfunction
diff --git a/modules/overloading/macros/%p_m_lss.bin b/modules/overloading/macros/%p_m_lss.bin
new file mode 100755
index 000000000..43fbd6b0c
--- /dev/null
+++ b/modules/overloading/macros/%p_m_lss.bin
Binary files differ
diff --git a/modules/overloading/macros/%p_m_lss.sci b/modules/overloading/macros/%p_m_lss.sci
new file mode 100755
index 000000000..c0951e1b4
--- /dev/null
+++ b/modules/overloading/macros/%p_m_lss.sci
@@ -0,0 +1,18 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA - Serge Steer
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function [s]=%p_m_lss(d2,s1)
+ // [s]=%lssmp(d2,s1)
+ // d2*s1
+ //
+ // s1 : state-space
+ // d2 : polynomial matrix
+ //!
+ s=tlist(["lss","A","B","C","D","X0","dt"],[],[],[],d2,[],[])*s1
+endfunction
diff --git a/modules/overloading/macros/%p_m_r.bin b/modules/overloading/macros/%p_m_r.bin
new file mode 100755
index 000000000..caf897d3b
--- /dev/null
+++ b/modules/overloading/macros/%p_m_r.bin
Binary files differ
diff --git a/modules/overloading/macros/%p_m_r.sci b/modules/overloading/macros/%p_m_r.sci
new file mode 100755
index 000000000..a87ec0212
--- /dev/null
+++ b/modules/overloading/macros/%p_m_r.sci
@@ -0,0 +1,67 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function f2=%p_m_r(n1,f2)
+ // r=%p_m_r(p,f) <=> r= p*f with p=polynomial matrix
+ // and f= rational
+ //author Serge Steer INRIA
+
+ //!
+
+ [n2,d2]=f2(["num","den"]);
+ sz1=size(n1);sz2=size(n2);
+ if prod(sz1)==0|prod(sz2)==0 then f2=[],return,end
+
+
+ indef=%f
+ if or(sz1==-1) then
+ n1=n1+0;sz1=[1 1];
+ if prod(sz2)==1 then indef=%t,else error(14),end
+ end
+ if or(sz2==-1) then
+ n2=n2+0;d2=d2+0;sz2=[1 1];
+ if prod(sz1)==1 then indef=%t,else error(14),end
+ end
+
+ //
+ if prod(sz1)==1 then
+ num=n1*n2,
+ den=d2
+ elseif prod(sz2)==1 then
+ num=n1*n2,
+ den=d2(ones(n1))
+ else,
+ if size(sz1,"*")>2|size(sz2,"*")>2 then error(10),end
+ if sz1(2)<>sz2(1) then error(10),end,
+ l1=sz1(1);m1=sz1(2);m2=sz2(2);
+ for j=1:m2,
+ [y,fact]=lcm(d2(:,j)),
+ n2(:,j)=n2(:,j).*fact,
+ den(1:l1,j)=ones(l1,1)*y,
+ for i=1:l1,
+ num(i,j)=n1(i,:)*n2(:,j),
+ end
+ end
+ end
+
+ if ndims(num)<=2 then
+ [num,den]=simp(num,den),
+ else
+ sz=size(num)
+ [num,den]=simp(num.entries,den.entries),
+ num=matrix(num,sz)
+ den=matrix(den,sz)
+ end
+
+ if indef then
+ num=num*eye()
+ den=den*eye()
+ end
+ f2=rlist(num,den,f2.dt)
+endfunction
diff --git a/modules/overloading/macros/%p_matrix.bin b/modules/overloading/macros/%p_matrix.bin
new file mode 100755
index 000000000..f26fd3860
--- /dev/null
+++ b/modules/overloading/macros/%p_matrix.bin
Binary files differ
diff --git a/modules/overloading/macros/%p_matrix.sci b/modules/overloading/macros/%p_matrix.sci
new file mode 100755
index 000000000..474638044
--- /dev/null
+++ b/modules/overloading/macros/%p_matrix.sci
@@ -0,0 +1,12 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function y=%p_matrix(a,varargin)
+ y=%hm_matrix(a,varargin(:))
+endfunction
diff --git a/modules/overloading/macros/%p_n_l.bin b/modules/overloading/macros/%p_n_l.bin
new file mode 100755
index 000000000..b2133ce92
--- /dev/null
+++ b/modules/overloading/macros/%p_n_l.bin
Binary files differ
diff --git a/modules/overloading/macros/%p_n_l.sci b/modules/overloading/macros/%p_n_l.sci
new file mode 100755
index 000000000..f6ed79545
--- /dev/null
+++ b/modules/overloading/macros/%p_n_l.sci
@@ -0,0 +1,14 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function [r]=%p_n_l(l1,l2)
+ //r= %p_n_l(l1,l2) <=> r=(l1==l2) list==polynomial
+ //!
+ r=%t
+endfunction
diff --git a/modules/overloading/macros/%p_n_lss.bin b/modules/overloading/macros/%p_n_lss.bin
new file mode 100755
index 000000000..19fedfda3
--- /dev/null
+++ b/modules/overloading/macros/%p_n_lss.bin
Binary files differ
diff --git a/modules/overloading/macros/%p_n_lss.sci b/modules/overloading/macros/%p_n_lss.sci
new file mode 100755
index 000000000..cd6e19561
--- /dev/null
+++ b/modules/overloading/macros/%p_n_lss.sci
@@ -0,0 +1,14 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function [r]=%p_n_lss(s1,s2)
+ //r=%p_n_lss(s1,s2) <=> r=(s1<>s2) polynomial<> state-space list
+ //!
+ r=%t
+endfunction
diff --git a/modules/overloading/macros/%p_n_r.bin b/modules/overloading/macros/%p_n_r.bin
new file mode 100755
index 000000000..3bfe4156a
--- /dev/null
+++ b/modules/overloading/macros/%p_n_r.bin
Binary files differ
diff --git a/modules/overloading/macros/%p_n_r.sci b/modules/overloading/macros/%p_n_r.sci
new file mode 100755
index 000000000..c12af6ab1
--- /dev/null
+++ b/modules/overloading/macros/%p_n_r.sci
@@ -0,0 +1,17 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function [r]=%p_n_r(l1,l2)
+ //r%p_n_r(l1,l2) <=>r= (l1<>l2 ) l1 polynomial l2 rational
+ //!
+
+ r=degree(l2("den"))==0
+ if r then r=l2("num")./coeff(l2("den"))==l1,end
+ r=~r
+endfunction
diff --git a/modules/overloading/macros/%p_o_l.bin b/modules/overloading/macros/%p_o_l.bin
new file mode 100755
index 000000000..f521b18f2
--- /dev/null
+++ b/modules/overloading/macros/%p_o_l.bin
Binary files differ
diff --git a/modules/overloading/macros/%p_o_l.sci b/modules/overloading/macros/%p_o_l.sci
new file mode 100755
index 000000000..5740632c0
--- /dev/null
+++ b/modules/overloading/macros/%p_o_l.sci
@@ -0,0 +1,15 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function [r]=%p_o_l(l1,l2)
+ //r=%p_o_l(l1,l2) <=> r=(l1==l2) list==polynomail
+ //!
+
+ r=%f
+endfunction
diff --git a/modules/overloading/macros/%p_o_lss.bin b/modules/overloading/macros/%p_o_lss.bin
new file mode 100755
index 000000000..3634a8262
--- /dev/null
+++ b/modules/overloading/macros/%p_o_lss.bin
Binary files differ
diff --git a/modules/overloading/macros/%p_o_lss.sci b/modules/overloading/macros/%p_o_lss.sci
new file mode 100755
index 000000000..732134417
--- /dev/null
+++ b/modules/overloading/macros/%p_o_lss.sci
@@ -0,0 +1,15 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function [r]=%p_o_lss(s1,s2)
+ //r=%p_o_lss(s1,s2) <=> r=(s1==s2) polynomail==state-space syslin list
+ //!
+
+ r=%f
+endfunction
diff --git a/modules/overloading/macros/%p_o_r.bin b/modules/overloading/macros/%p_o_r.bin
new file mode 100755
index 000000000..71eede2e4
--- /dev/null
+++ b/modules/overloading/macros/%p_o_r.bin
Binary files differ
diff --git a/modules/overloading/macros/%p_o_r.sci b/modules/overloading/macros/%p_o_r.sci
new file mode 100755
index 000000000..46368faa3
--- /dev/null
+++ b/modules/overloading/macros/%p_o_r.sci
@@ -0,0 +1,16 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function [r]=%p_o_r(l1,l2)
+ //r=%p_o_r(l1,l2) <=> r=(l1==l2) l1 polynomial l2 rational
+ //!
+
+ r=degree(l2("den"))==0
+ if r then r=l2("num")./coeff(l2("den"))==l1,end
+endfunction
diff --git a/modules/overloading/macros/%p_o_sp.bin b/modules/overloading/macros/%p_o_sp.bin
new file mode 100755
index 000000000..cfd1a5b32
--- /dev/null
+++ b/modules/overloading/macros/%p_o_sp.bin
Binary files differ
diff --git a/modules/overloading/macros/%p_o_sp.sci b/modules/overloading/macros/%p_o_sp.sci
new file mode 100755
index 000000000..4af7f7c5d
--- /dev/null
+++ b/modules/overloading/macros/%p_o_sp.sci
@@ -0,0 +1,14 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA, Serge Steer
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function r=%p_o_st(a,b)
+ // implements r=a==b
+ // for a a matrix of polynomials and b a struct
+ r=%f
+endfunction
diff --git a/modules/overloading/macros/%p_p_s.bin b/modules/overloading/macros/%p_p_s.bin
new file mode 100755
index 000000000..92102e48a
--- /dev/null
+++ b/modules/overloading/macros/%p_p_s.bin
Binary files differ
diff --git a/modules/overloading/macros/%p_p_s.sci b/modules/overloading/macros/%p_p_s.sci
new file mode 100755
index 000000000..891264938
--- /dev/null
+++ b/modules/overloading/macros/%p_p_s.sci
@@ -0,0 +1,58 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function f=%p_p_s(p,s)
+ // %p_p_s(p,s) computes p^s for p polynomial matrix in special cases
+ //!
+
+ if s==[] then f=[],return,end
+ if or(imag(s)<>0)|or(int(s)<>s) then error(msprintf(_("%s: Wrong type for input argument #%d: An integer matrix expected.\n"),"%p_p_s",2)),end
+ [m,n]=size(p)
+ [ms,ns]=size(s)
+ if ms==1&ns==1 then
+ if m==1|n==1 then //Element wise exponentiation p.^s with p vector
+ if s<0 then
+ if or(abs(coeff(p(:)))*ones(max(degree(p))+1,1)==0) then
+ error(27)
+ end
+ f = rlist(ones(p),p.^(-s),[])
+ else // this case is in fact hard coded
+ f=p.^s
+ end
+ elseif m==n then //square matrix exponentiation p^s
+ if s<0 then
+ f=invr(p),
+ s=-s;
+ f1=f;for k=2:s,f=f*f1;end
+ else
+ f=p
+ for k=2:s,f=f*p;end
+ end
+ else
+ error(20,1)
+ end
+ elseif ms==1|ns==1 then // Element wise exponentiation f.^s with f "scalar"
+ if m<>1|n<>1 then error(43),end
+
+ kp=find(s>=0)
+ kn=find(s<0)
+ num=ones(s)
+ den=ones(s)
+ num(kp)=p.^s(kp)
+ if abs(coeff(p))*ones(degree(p)+1,1)==0 then
+ error(27)
+ end
+ den(kn)=p.^(-s(kn))
+ f = rlist(num,den,[])
+ else
+ error(43)
+ end
+
+
+endfunction
diff --git a/modules/overloading/macros/%p_prod.bin b/modules/overloading/macros/%p_prod.bin
new file mode 100755
index 000000000..701d01c3a
--- /dev/null
+++ b/modules/overloading/macros/%p_prod.bin
Binary files differ
diff --git a/modules/overloading/macros/%p_prod.sci b/modules/overloading/macros/%p_prod.sci
new file mode 100755
index 000000000..bab445812
--- /dev/null
+++ b/modules/overloading/macros/%p_prod.sci
@@ -0,0 +1,70 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2010 - INRIA - Serge Steer
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function r = %p_prod(varargin)
+ // If we call prod with 3 arguments, the third is optional for polynomial matrices
+ a = varargin(1)
+ dims = size(a);
+
+ nargs = size(varargin);
+ select nargs
+ case 1
+ d = "*";
+ case 2
+ if or(varargin(2) == ["native", "double"]) then
+ d = "*";
+ else
+ d = varargin(2);
+ end
+ case 3
+ d = varargin(2);
+ else
+ error(msprintf(_("%s: Wrong number of input argument(s): %d to %d expected.\n"),"prod", 1, 3));
+ end
+
+ // Check second argument : d
+ select type(d)
+ case 1
+ if size(d,'*') <> 1 then
+ error(msprintf(_("%s: Wrong size for input argument #%d: A scalar expected.\n"),"prod", 2))
+ end
+ if int(d) <> d | d < 0 then
+ error(msprintf(_("%s: Wrong value for input argument #%d: Integer >= %d expected.\n"),"prod", 2, 1))
+ end
+ case 10
+ if size(d,'*') <> 1 then
+ error(msprintf(_("%s: Wrong size for input argument #%d: A string expected.\n"),"prod",2))
+ end
+ if and(d<>["r","c","*","m"]) then
+ error(msprintf(_("%s: Wrong value for input argument #%d: Must be in the set {%s}.\n"),..
+ "prod",2,"""*"",""r"",""c"",""m"""))
+ end
+
+ pos = [1,2,0,find(dims>1,1)];
+ d=pos(find(d==["r","c","*","m"]))
+ else
+ error(msprintf(_("%s: Wrong type for input argument #%d: A string or scalar expected.\n"),"prod",2))
+ end
+
+ select d
+ case 0 then
+ r=prod(a)
+ case 1 then
+ for k=1:dims(2)
+ r(1,k) = prod(a(:,k))
+ end
+ case 2 then
+ for k=1:dims(1)
+ r(k,1)=prod(a(k,:))
+ end
+ else
+ r=a
+ end
+
+endfunction
diff --git a/modules/overloading/macros/%p_q_p.bin b/modules/overloading/macros/%p_q_p.bin
new file mode 100755
index 000000000..72e5124f2
--- /dev/null
+++ b/modules/overloading/macros/%p_q_p.bin
Binary files differ
diff --git a/modules/overloading/macros/%p_q_p.sci b/modules/overloading/macros/%p_q_p.sci
new file mode 100755
index 000000000..7790efedd
--- /dev/null
+++ b/modules/overloading/macros/%p_q_p.sci
@@ -0,0 +1,21 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function f=%p_q_p(p1,p2)
+ //f= p1.\p2
+ //!
+
+ if size(p1,"*")==1 then
+ p1=p1*ones(p2)
+ elseif size(p2,"*")==1 then
+ p2=p2*ones(p1)
+ end
+ [p1,p2]=simp(p1,p2)
+ f = rlist(p2,p1,[])
+endfunction
diff --git a/modules/overloading/macros/%p_q_r.bin b/modules/overloading/macros/%p_q_r.bin
new file mode 100755
index 000000000..cd37f97e8
--- /dev/null
+++ b/modules/overloading/macros/%p_q_r.bin
Binary files differ
diff --git a/modules/overloading/macros/%p_q_r.sci b/modules/overloading/macros/%p_q_r.sci
new file mode 100755
index 000000000..02f8d1542
--- /dev/null
+++ b/modules/overloading/macros/%p_q_r.sci
@@ -0,0 +1,15 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function r=%p_q_r(p,r)
+ // r= p.\ r polynomial./rational
+ //!
+
+ r=rlist(ones(p).*r("num"),p.*r("den"),r("dt"))
+endfunction
diff --git a/modules/overloading/macros/%p_q_s.bin b/modules/overloading/macros/%p_q_s.bin
new file mode 100755
index 000000000..2e6e6b41c
--- /dev/null
+++ b/modules/overloading/macros/%p_q_s.bin
Binary files differ
diff --git a/modules/overloading/macros/%p_q_s.sci b/modules/overloading/macros/%p_q_s.sci
new file mode 100755
index 000000000..13a362edb
--- /dev/null
+++ b/modules/overloading/macros/%p_q_s.sci
@@ -0,0 +1,20 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function f=%p_q_s(p1,p2)
+ // f=%p_q_s(p,m) <=> f=p.\m
+ //!
+
+ if size(p1,"*")==1 then
+ p1=p1*ones(p2)
+ elseif size(p2,"*")==1 then
+ p2=p2*ones(p1)
+ end
+ f = rlist(p2,p1,[])
+endfunction
diff --git a/modules/overloading/macros/%p_r_lss.bin b/modules/overloading/macros/%p_r_lss.bin
new file mode 100755
index 000000000..bd0fc5285
--- /dev/null
+++ b/modules/overloading/macros/%p_r_lss.bin
Binary files differ
diff --git a/modules/overloading/macros/%p_r_lss.sci b/modules/overloading/macros/%p_r_lss.sci
new file mode 100755
index 000000000..ccb3f56b2
--- /dev/null
+++ b/modules/overloading/macros/%p_r_lss.sci
@@ -0,0 +1,16 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA - Serge Steer
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function [sr]=%p_r_lss(p,s)
+ // sr=%lssrp(p,s) ou sr=p/s
+ // s : state-space syslin list
+ // p : polynomial matrix
+ //!
+ sr=tlist(["lss","A","B","C","D","X0","dt"],[],[],[],p,[],[])/s
+endfunction
diff --git a/modules/overloading/macros/%p_r_p.bin b/modules/overloading/macros/%p_r_p.bin
new file mode 100755
index 000000000..d0975c94b
--- /dev/null
+++ b/modules/overloading/macros/%p_r_p.bin
Binary files differ
diff --git a/modules/overloading/macros/%p_r_p.sci b/modules/overloading/macros/%p_r_p.sci
new file mode 100755
index 000000000..22a04d125
--- /dev/null
+++ b/modules/overloading/macros/%p_r_p.sci
@@ -0,0 +1,21 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function f=%p_r_p(p1,p2)
+ // f=%p_r_p(p1,p2) <=> f= p1*(p2^(-1))
+ //p1 polynomial matrix
+ //p2 polynomial matrix
+ //!
+
+ [l,c]=size(p2)
+ if l*c <>1 then f=p1*invr(p2),return,end
+ [l,c]=size(p1)
+ [p1 p2]=simp(p1,p2*ones(l,c))
+ f=rlist(p1,p2,[])
+endfunction
diff --git a/modules/overloading/macros/%p_r_r.bin b/modules/overloading/macros/%p_r_r.bin
new file mode 100755
index 000000000..3aa19bd1c
--- /dev/null
+++ b/modules/overloading/macros/%p_r_r.bin
Binary files differ
diff --git a/modules/overloading/macros/%p_r_r.sci b/modules/overloading/macros/%p_r_r.sci
new file mode 100755
index 000000000..996a67db6
--- /dev/null
+++ b/modules/overloading/macros/%p_r_r.sci
@@ -0,0 +1,18 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function f=%p_r_r(m,f)
+ // f=%p_r_r(p1,p2) <=> f= p1*(p2^(-1))
+ // p1 polynomial matrix
+ // p2: rational matrix
+ //!
+
+ if prod(size(f("num")))<>1 then f=m*invr(f),return,end
+ f=rlist(m*f("den"),ones(m)*f("num"),f("dt"))
+endfunction
diff --git a/modules/overloading/macros/%p_r_s.bin b/modules/overloading/macros/%p_r_s.bin
new file mode 100755
index 000000000..4324d878e
--- /dev/null
+++ b/modules/overloading/macros/%p_r_s.bin
Binary files differ
diff --git a/modules/overloading/macros/%p_r_s.sci b/modules/overloading/macros/%p_r_s.sci
new file mode 100755
index 000000000..6303fb996
--- /dev/null
+++ b/modules/overloading/macros/%p_r_s.sci
@@ -0,0 +1,26 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function f=%p_r_s(p,m)
+ // f=%p_r_s(p,m) <=> f=p/m
+ // with p matrix of polynomials, m constant matrix
+ //!
+
+ [l,c]=size(m)
+ [mp,np]=size(p);
+ if l==c then
+ f=p*inv(m)
+ else
+ s=poly(0,varn(p))
+ f=coeff(p,0)/m
+ for k=1:max(degree(p))
+ f=f+(coeff(p,k)/m)*(s^k)
+ end
+ end
+endfunction
diff --git a/modules/overloading/macros/%p_s_lss.bin b/modules/overloading/macros/%p_s_lss.bin
new file mode 100755
index 000000000..84d809ad3
--- /dev/null
+++ b/modules/overloading/macros/%p_s_lss.bin
Binary files differ
diff --git a/modules/overloading/macros/%p_s_lss.sci b/modules/overloading/macros/%p_s_lss.sci
new file mode 100755
index 000000000..8c80d2b9d
--- /dev/null
+++ b/modules/overloading/macros/%p_s_lss.sci
@@ -0,0 +1,17 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function s2=%p_s_lss(d1,s2)
+ //s=%p_s_lss(s1,d2) <=> s=p-s1
+ // s1 : syslin list
+ // p : polynomial matrix
+ //!
+
+ s2(5)=d1-s2(5)
+endfunction
diff --git a/modules/overloading/macros/%p_s_r.bin b/modules/overloading/macros/%p_s_r.bin
new file mode 100755
index 000000000..16f5b8a2c
--- /dev/null
+++ b/modules/overloading/macros/%p_s_r.bin
Binary files differ
diff --git a/modules/overloading/macros/%p_s_r.sci b/modules/overloading/macros/%p_s_r.sci
new file mode 100755
index 000000000..d13eaeff9
--- /dev/null
+++ b/modules/overloading/macros/%p_s_r.sci
@@ -0,0 +1,44 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function f=%p_s_r(m,f)
+ //f= m-f
+ //author Serge Steer INRIA
+ //!
+ [num,den]=f(["num","den"])
+ szf=size(den)
+ szm=size(m)
+
+ if and(szf>=0)&and(szm>=0) then
+ if prod(szf)==1&prod(szm)>1 then
+ den=den(ones(m))
+ szf=szm
+ end
+
+ if size(szf,"*")>2 then
+ num=num(:);den=den(:);m=m(:)
+ end
+ [num,den]=simp(-num+m.*den,den)
+ num=matrix(num,szf)
+ den=matrix(den,szf)
+ else
+ //at leat one matrix is eye*x
+ if size(szf,"*")>2|size(szm,"*")>2 then
+ error(9)
+ end
+ if or(szf<0)&or(szm<0) then
+ [num,den]=simp(-num+m.*den,den)
+ elseif or(szf<0) then
+ [num,den]=simp(-num+m.*den,den*ones(m))
+ elseif or(szm<0) then
+ [num,den]=simp(-num+(m+0)*eye(den).*den,den)
+ end
+ end
+ f=rlist(num,den,f.dt)
+endfunction
diff --git a/modules/overloading/macros/%p_simp.bin b/modules/overloading/macros/%p_simp.bin
new file mode 100755
index 000000000..c02b87029
--- /dev/null
+++ b/modules/overloading/macros/%p_simp.bin
Binary files differ
diff --git a/modules/overloading/macros/%p_simp.sci b/modules/overloading/macros/%p_simp.sci
new file mode 100755
index 000000000..b8d1acef1
--- /dev/null
+++ b/modules/overloading/macros/%p_simp.sci
@@ -0,0 +1,12 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function [num,den]=%p_simp(num,den)
+ // implement complex case
+endfunction
diff --git a/modules/overloading/macros/%p_string.bin b/modules/overloading/macros/%p_string.bin
new file mode 100755
index 000000000..21eb59bdb
--- /dev/null
+++ b/modules/overloading/macros/%p_string.bin
Binary files differ
diff --git a/modules/overloading/macros/%p_string.sci b/modules/overloading/macros/%p_string.sci
new file mode 100755
index 000000000..0e482f91f
--- /dev/null
+++ b/modules/overloading/macros/%p_string.sci
@@ -0,0 +1,69 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function txt=%p_string(p)
+ [m,n]=size(p)
+ s=stripblanks(varn(p))
+ txt=emptystr(2*m,n)
+
+ for l=1:m
+ for k=1:n
+ c=coeff(p(l,k))
+ knz=find(c<>0)
+ if knz==[] then
+ txt(2*l-1:2*l,k)=[" ";"0"];
+ else
+ c=c(knz)
+ //special case for i=1
+ if isreal(c(1),0) then
+ w=real(c(1))
+ if w<0 then
+ C(1)=" - "+string(abs(c(1))),
+ else
+ C(1)=string(c(1)),
+ end
+ else
+ w=string(c(1));
+ if knz(1)<> 1 then w="("+w+")",end
+ C(1)=w;
+ end
+
+ for i=2:size(c,"*"),
+ if isreal(c(i),0) then
+ w=real(c(i))
+ if w<0 then
+ C(i)=" - "+string(abs(c(i))),
+ else
+ C(i)=" + "+string(c(i)),
+ end
+ else
+ C(i)=" + ("+string(c(i))+")";
+ end
+ end
+
+ if knz(1)>1 then
+ C=C+s
+ else
+ C(2:$)=C(2:$)+s
+ end
+
+ i=min(find(knz>2))
+ blank=" "
+ e=blank(ones(1,i-1))
+ if size(knz,"*")>=i then e=[e string(knz(i:$)-1)],end
+
+ lc=cumsum(length(C))
+ C=strcat(C)
+ E="";
+ for i=1:size(c,"*"),E=E+part(" ",1:(lc(i)-length(E)))+e(i);end
+ txt(2*l-1:2*l,k)=[E;C];
+ end
+ end
+ end
+endfunction
diff --git a/modules/overloading/macros/%p_sum.bin b/modules/overloading/macros/%p_sum.bin
new file mode 100755
index 000000000..913c05ecb
--- /dev/null
+++ b/modules/overloading/macros/%p_sum.bin
Binary files differ
diff --git a/modules/overloading/macros/%p_sum.sci b/modules/overloading/macros/%p_sum.sci
new file mode 100755
index 000000000..a08d2461d
--- /dev/null
+++ b/modules/overloading/macros/%p_sum.sci
@@ -0,0 +1,68 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2010 - INRIA - Serge Steer
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function a = %p_sum(varargin)
+ //sum of a polynomial matrix. Sum of Polynomial hypermatrices are
+ //handled by %hm_sum
+ // If we call sum with 3 arguments, the third is optional for polynomial matrices
+ a = varargin(1)
+ dims = size(a);
+
+ nargs = size(varargin);
+ select nargs
+ case 1
+ d = "*";
+ case 2
+ if or(varargin(2) == ["native", "double"]) then
+ d = "*";
+ else
+ d = varargin(2);
+ end
+ case 3
+ d = varargin(2);
+ else
+ error(msprintf(_("%s: Wrong number of input argument(s): %d to %d expected.\n"),"sum", 1, 3));
+ end
+
+ // Check second argument : d
+ select type(d)
+ case 1
+ if size(d,'*') <> 1 then
+ error(msprintf(_("%s: Wrong size for input argument #%d: A scalar expected.\n"),"sum", 2))
+ end
+ if int(d) <> d | d < 0 then
+ error(msprintf(_("%s: Wrong value for input argument #%d: Integer >= %d expected.\n"),"sum", 2, 1))
+ end
+ case 10
+ if size(d,'*') <> 1 then
+ error(msprintf(_("%s: Wrong size for input argument #%d: A string expected.\n"),"sum",2))
+ end
+ if and(d<>["r","c","*","m"]) then
+ error(msprintf(_("%s: Wrong value for input argument #%d: Must be in the set {%s}.\n"),..
+ "sum",2,"""*"",""r"",""c"",""m"""))
+ end
+
+ pos = [1,2,0,find(dims>1,1)];
+ d=pos(find(d==["r","c","*","m"]))
+ else
+ error(msprintf(_("%s: Wrong type for input argument #%d: A string or scalar expected.\n"),"sum",2))
+ end
+
+ select d
+ case 0 then
+ a=sum(a)
+ case 1 then
+ a=ones(1,dims(1))*a;
+ case 2 then
+ a=a*ones(dims(2),1);
+ else
+ a=a
+ end
+
+endfunction
diff --git a/modules/overloading/macros/%p_v_lss.bin b/modules/overloading/macros/%p_v_lss.bin
new file mode 100755
index 000000000..3022a9172
--- /dev/null
+++ b/modules/overloading/macros/%p_v_lss.bin
Binary files differ
diff --git a/modules/overloading/macros/%p_v_lss.sci b/modules/overloading/macros/%p_v_lss.sci
new file mode 100755
index 000000000..a342ddd88
--- /dev/null
+++ b/modules/overloading/macros/%p_v_lss.sci
@@ -0,0 +1,18 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function [sr]=%p_v_lss(p,s)
+ // feedback sr=(eye+p*s)\p
+ //s=%p_v_lss(p,s) <=> sr=p/.s
+ // p : polynomial matrix
+ // s : state-space syslin list
+ //!
+
+ sr=tlist(["lss","A","B","C","D","X0","dt"],[],[],[],p,[],[])/.s
+endfunction
diff --git a/modules/overloading/macros/%p_v_p.bin b/modules/overloading/macros/%p_v_p.bin
new file mode 100755
index 000000000..76b7068a0
--- /dev/null
+++ b/modules/overloading/macros/%p_v_p.bin
Binary files differ
diff --git a/modules/overloading/macros/%p_v_p.sci b/modules/overloading/macros/%p_v_p.sci
new file mode 100755
index 000000000..76e7b7e7f
--- /dev/null
+++ b/modules/overloading/macros/%p_v_p.sci
@@ -0,0 +1,18 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function h=%p_v_p(h1,h2)
+ // h=%p_v_p(h1,h2) <=> h=(I+h1*h2)\h1 with h1 h2 polynomial matrices
+ //!
+
+ [m1,n1]=size(h1)
+ [m2,n2]=size(h2)
+ if abs(n1-m2)+abs(m1-n2)<>0 then error(msprintf(_("%s: Wrong size for input arguments.\n"),"%p_v_p")),end
+ h=(eye(m1,m1)+h1*h2)\h1
+endfunction
diff --git a/modules/overloading/macros/%p_v_r.bin b/modules/overloading/macros/%p_v_r.bin
new file mode 100755
index 000000000..e9f77a4c1
--- /dev/null
+++ b/modules/overloading/macros/%p_v_r.bin
Binary files differ
diff --git a/modules/overloading/macros/%p_v_r.sci b/modules/overloading/macros/%p_v_r.sci
new file mode 100755
index 000000000..e0e6d31a4
--- /dev/null
+++ b/modules/overloading/macros/%p_v_r.sci
@@ -0,0 +1,20 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function h=%p_v_r(h1,h2)
+ // h=%p_v_r(h1,h2) <=> (I+h1*h2)\h1.
+ // h1 polynomial matrix
+ // h2 rational matrix
+ //!
+
+ [m1,n1]=size(h1)
+ [m2,n2]=size(h2("num"))
+ if abs(n1-m2)+abs(m1-n2)<>0 then error(msprintf(_("%s: Wrong size for input argument(s).\n"),"%p_v_r")),end
+ h=(eye(m1,m1)+h1*h2)\h1
+endfunction
diff --git a/modules/overloading/macros/%p_v_s.bin b/modules/overloading/macros/%p_v_s.bin
new file mode 100755
index 000000000..17c4c1f09
--- /dev/null
+++ b/modules/overloading/macros/%p_v_s.bin
Binary files differ
diff --git a/modules/overloading/macros/%p_v_s.sci b/modules/overloading/macros/%p_v_s.sci
new file mode 100755
index 000000000..722e9a513
--- /dev/null
+++ b/modules/overloading/macros/%p_v_s.sci
@@ -0,0 +1,14 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function h=%p_v_s(p,s)
+ //!
+
+ h=p/(1+p*s)
+endfunction
diff --git a/modules/overloading/macros/%p_x_hm.bin b/modules/overloading/macros/%p_x_hm.bin
new file mode 100755
index 000000000..84f0eb840
--- /dev/null
+++ b/modules/overloading/macros/%p_x_hm.bin
Binary files differ
diff --git a/modules/overloading/macros/%p_x_hm.sci b/modules/overloading/macros/%p_x_hm.sci
new file mode 100755
index 000000000..b2842473a
--- /dev/null
+++ b/modules/overloading/macros/%p_x_hm.sci
@@ -0,0 +1,12 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+function h=%p_x_hm(p,h)
+ //author Serge Steer INRIA
+ h.entries=p.*h.entries
+endfunction
diff --git a/modules/overloading/macros/%p_x_r.bin b/modules/overloading/macros/%p_x_r.bin
new file mode 100755
index 000000000..3a61cf49f
--- /dev/null
+++ b/modules/overloading/macros/%p_x_r.bin
Binary files differ
diff --git a/modules/overloading/macros/%p_x_r.sci b/modules/overloading/macros/%p_x_r.sci
new file mode 100755
index 000000000..51fa1072c
--- /dev/null
+++ b/modules/overloading/macros/%p_x_r.sci
@@ -0,0 +1,24 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function r=%p_x_r(p,r)
+ // r=%p_x_r(p,r) <=> r=p.*r polynomial.* rational
+ //author Serge Steer, INRIA
+ //!
+
+ r.num=p.*r.num
+ sz=size(r.num)
+ if size(sz,"*")<=2 then
+ r=simp(r)
+ else
+ [num,den]=simp(r.num.entries,r.den.entries)
+ r.num=matrix(num,sz)
+ r.den=matrix(den,sz)
+ end
+endfunction
diff --git a/modules/overloading/macros/%p_y_p.bin b/modules/overloading/macros/%p_y_p.bin
new file mode 100755
index 000000000..8f775b407
--- /dev/null
+++ b/modules/overloading/macros/%p_y_p.bin
Binary files differ
diff --git a/modules/overloading/macros/%p_y_p.sci b/modules/overloading/macros/%p_y_p.sci
new file mode 100755
index 000000000..ccded4381
--- /dev/null
+++ b/modules/overloading/macros/%p_y_p.sci
@@ -0,0 +1,25 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function r=%p_y_p(a,b)
+ // a./.b
+
+ [ma,na]=size(a)
+ [mb,nb]=size(b)
+ r=zeros(ma*mb,na*nb)
+ k=0
+ for j=1:na
+ l=0
+ for i=1:ma
+ r(l+(1:mb),k+(1:nb))=a(i,j)./b
+ l=l+mb
+ end
+ k=k+nb
+ end
+endfunction
diff --git a/modules/overloading/macros/%p_y_r.bin b/modules/overloading/macros/%p_y_r.bin
new file mode 100755
index 000000000..ef76546fa
--- /dev/null
+++ b/modules/overloading/macros/%p_y_r.bin
Binary files differ
diff --git a/modules/overloading/macros/%p_y_r.sci b/modules/overloading/macros/%p_y_r.sci
new file mode 100755
index 000000000..cf85b7453
--- /dev/null
+++ b/modules/overloading/macros/%p_y_r.sci
@@ -0,0 +1,25 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function r=%p_y_r(a,b)
+ // a./.b
+
+ [ma,na]=size(a)
+ [mb,nb]=size(b)
+ r=zeros(ma*mb,na*nb)
+ k=0
+ for j=1:na
+ l=0
+ for i=1:ma
+ r(l+(1:mb),k+(1:nb))=a(i,j)./b
+ l=l+mb
+ end
+ k=k+nb
+ end
+endfunction
diff --git a/modules/overloading/macros/%p_y_s.bin b/modules/overloading/macros/%p_y_s.bin
new file mode 100755
index 000000000..5105e7b2e
--- /dev/null
+++ b/modules/overloading/macros/%p_y_s.bin
Binary files differ
diff --git a/modules/overloading/macros/%p_y_s.sci b/modules/overloading/macros/%p_y_s.sci
new file mode 100755
index 000000000..4b332901c
--- /dev/null
+++ b/modules/overloading/macros/%p_y_s.sci
@@ -0,0 +1,25 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function r=%p_y_s(a,b)
+ // a./.b
+
+ [ma,na]=size(a)
+ [mb,nb]=size(b)
+ r=zeros(ma*mb,na*nb)
+ k=0
+ for j=1:na
+ l=0
+ for i=1:ma
+ r(l+(1:mb),k+(1:nb))=a(i,j)./b
+ l=l+mb
+ end
+ k=k+nb
+ end
+endfunction
diff --git a/modules/overloading/macros/%p_z_p.bin b/modules/overloading/macros/%p_z_p.bin
new file mode 100755
index 000000000..49fd66661
--- /dev/null
+++ b/modules/overloading/macros/%p_z_p.bin
Binary files differ
diff --git a/modules/overloading/macros/%p_z_p.sci b/modules/overloading/macros/%p_z_p.sci
new file mode 100755
index 000000000..860d913c8
--- /dev/null
+++ b/modules/overloading/macros/%p_z_p.sci
@@ -0,0 +1,25 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function r=%p_z_p(a,b)
+ // a.\.b
+
+ [ma,na]=size(a)
+ [mb,nb]=size(b)
+ r=zeros(ma*mb,na*nb)
+ k=0
+ for j=1:na
+ l=0
+ for i=1:ma
+ r(l+(1:mb),k+(1:nb))=a(i,j).\b
+ l=l+mb
+ end
+ k=k+nb
+ end
+endfunction
diff --git a/modules/overloading/macros/%p_z_r.bin b/modules/overloading/macros/%p_z_r.bin
new file mode 100755
index 000000000..a6f1fdf1e
--- /dev/null
+++ b/modules/overloading/macros/%p_z_r.bin
Binary files differ
diff --git a/modules/overloading/macros/%p_z_r.sci b/modules/overloading/macros/%p_z_r.sci
new file mode 100755
index 000000000..5172c3c6c
--- /dev/null
+++ b/modules/overloading/macros/%p_z_r.sci
@@ -0,0 +1,25 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function r=%p_z_r(a,b)
+ // a.\.b
+
+ [ma,na]=size(a)
+ [mb,nb]=size(b)
+ r=zeros(ma*mb,na*nb)
+ k=0
+ for j=1:na
+ l=0
+ for i=1:ma
+ r(l+(1:mb),k+(1:nb))=a(i,j).\b
+ l=l+mb
+ end
+ k=k+nb
+ end
+endfunction
diff --git a/modules/overloading/macros/%p_z_s.bin b/modules/overloading/macros/%p_z_s.bin
new file mode 100755
index 000000000..778baa27a
--- /dev/null
+++ b/modules/overloading/macros/%p_z_s.bin
Binary files differ
diff --git a/modules/overloading/macros/%p_z_s.sci b/modules/overloading/macros/%p_z_s.sci
new file mode 100755
index 000000000..e772069a4
--- /dev/null
+++ b/modules/overloading/macros/%p_z_s.sci
@@ -0,0 +1,25 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function r=%p_z_s(a,b)
+ // a.\.b
+
+ [ma,na]=size(a)
+ [mb,nb]=size(b)
+ r=zeros(ma*mb,na*nb)
+ k=0
+ for j=1:na
+ l=0
+ for i=1:ma
+ r(l+(1:mb),k+(1:nb))=a(i,j).\b
+ l=l+mb
+ end
+ k=k+nb
+ end
+endfunction
diff --git a/modules/overloading/macros/%plist_p.bin b/modules/overloading/macros/%plist_p.bin
new file mode 100755
index 000000000..864da3af4
--- /dev/null
+++ b/modules/overloading/macros/%plist_p.bin
Binary files differ
diff --git a/modules/overloading/macros/%plist_p.sci b/modules/overloading/macros/%plist_p.sci
new file mode 100755
index 000000000..c8b3433d6
--- /dev/null
+++ b/modules/overloading/macros/%plist_p.sci
@@ -0,0 +1,21 @@
+// Copyright (C) 2010 - DIGITEO - Michael Baudin
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+//
+// %plist_p --
+// Prints the string containing the parameters list
+//
+function %plist_p ( this )
+
+ str = string(this)
+ nbrows = size(str, "r")
+ for i = 1:nbrows
+ mprintf("%s\n", str(i))
+ end
+
+endfunction
diff --git a/modules/overloading/macros/%r_0.bin b/modules/overloading/macros/%r_0.bin
new file mode 100755
index 000000000..6eb591a18
--- /dev/null
+++ b/modules/overloading/macros/%r_0.bin
Binary files differ
diff --git a/modules/overloading/macros/%r_0.sci b/modules/overloading/macros/%r_0.sci
new file mode 100755
index 000000000..4dedf799a
--- /dev/null
+++ b/modules/overloading/macros/%r_0.sci
@@ -0,0 +1,15 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2010 - Samuel GOUGEON
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function rep = %r_0(R)
+ s = poly(0, varn(R(2)(1)))
+ rep = ones(R).' ./ s ;
+ rep(2) = R(2).'
+ rep(3) = R(3).';
+endfunction
diff --git a/modules/overloading/macros/%r_a_hm.bin b/modules/overloading/macros/%r_a_hm.bin
new file mode 100755
index 000000000..7ccf2ce89
--- /dev/null
+++ b/modules/overloading/macros/%r_a_hm.bin
Binary files differ
diff --git a/modules/overloading/macros/%r_a_hm.sci b/modules/overloading/macros/%r_a_hm.sci
new file mode 100755
index 000000000..fcabf117e
--- /dev/null
+++ b/modules/overloading/macros/%r_a_hm.sci
@@ -0,0 +1,31 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function f=%r_a_hm(f,m)
+ //f = f+m,
+ //f: transfer matrix, m : hypermatrix
+ //author Serge Steer INRIA
+ //!
+ [num,den]=f(["num","den"])
+ szf=size(den)
+ szm=size(m)
+
+ if and(szf>=0)&and(szm>=0) then
+ num=num(:);den=den(:);m=m(:)
+ if prod(szf)==1&prod(szm)>1 then
+ den=den(ones(m))
+ end
+ [num,den]=simp(num+m.*den,den)
+ num=matrix(num,szf)
+ den=matrix(den,szf)
+ f=rlist(num,den,f.dt)
+ else
+ error(8)
+ end
+endfunction
diff --git a/modules/overloading/macros/%r_a_lss.bin b/modules/overloading/macros/%r_a_lss.bin
new file mode 100755
index 000000000..15c9190b4
--- /dev/null
+++ b/modules/overloading/macros/%r_a_lss.bin
Binary files differ
diff --git a/modules/overloading/macros/%r_a_lss.sci b/modules/overloading/macros/%r_a_lss.sci
new file mode 100755
index 000000000..ab32ac348
--- /dev/null
+++ b/modules/overloading/macros/%r_a_lss.sci
@@ -0,0 +1,14 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA - Serge Steer
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function s=%r_a_lss(s1,s2)
+ //s=%r_a_lss(s1,s2) <=> s=s1+s2 rational + state-space
+ //!
+ [s1,s2]=sysconv(s1,s2);s=s1+s2;
+endfunction
diff --git a/modules/overloading/macros/%r_a_p.bin b/modules/overloading/macros/%r_a_p.bin
new file mode 100755
index 000000000..0a5eeb21c
--- /dev/null
+++ b/modules/overloading/macros/%r_a_p.bin
Binary files differ
diff --git a/modules/overloading/macros/%r_a_p.sci b/modules/overloading/macros/%r_a_p.sci
new file mode 100755
index 000000000..cfc0a33fe
--- /dev/null
+++ b/modules/overloading/macros/%r_a_p.sci
@@ -0,0 +1,46 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function f=%r_a_p(f,m)
+ //f = f+m,
+ //f: transfer matrix, m : polynomial matrix
+ //author Serge Steer INRIA
+ //!
+ [num,den]=f(["num","den"])
+ szf=size(den)
+ szm=size(m)
+
+ if and(szf>=0)&and(szm>=0) then
+ if prod(szf)==1&prod(szm)>1 then
+ den=den(ones(m))
+ szf=szm
+ end
+
+ if size(szf,"*")>2 then
+ num=num(:);den=den(:);m=m(:)
+ end
+ [num,den]=simp(num+m.*den,den)
+ num=matrix(num,szf)
+ den=matrix(den,szf)
+ else
+ //at leat one matrix is eye*x
+ if size(szf,"*")>2|size(szm,"*")>2 then
+ error(8)
+ end
+ if or(szf<0)&or(szm<0) then
+ [num,den]=simp(num+m.*den,den)
+ elseif or(szf<0) then
+ [num,den]=simp(num+m.*den,den*ones(m))
+ elseif or(szm<0) then
+ [num,den]=simp(num+(m+0)*eye(den).*den,den)
+ end
+ end
+ f=rlist(num,den,f.dt)
+
+endfunction
diff --git a/modules/overloading/macros/%r_a_r.bin b/modules/overloading/macros/%r_a_r.bin
new file mode 100755
index 000000000..06c51ba9e
--- /dev/null
+++ b/modules/overloading/macros/%r_a_r.bin
Binary files differ
diff --git a/modules/overloading/macros/%r_a_r.sci b/modules/overloading/macros/%r_a_r.sci
new file mode 100755
index 000000000..7fb68d029
--- /dev/null
+++ b/modules/overloading/macros/%r_a_r.sci
@@ -0,0 +1,71 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function f=%r_a_r(s1,s2)
+ //f=s1+s2 s1,s2 : rational matrices
+ //author Serge Steer, INRIA
+ //!
+ if ndims(s1)<2&ndims(s2)<2 then [s1,s2]=sysconv(s1,s2),end
+ [num1,den1]=s1(["num","den"]),
+ [num2,den2]=s2(["num","den"]),
+ sz1=size(num1)
+ sz2=size(num2)
+
+ if and(sz1>=0)&and(sz2>=0) then
+ num1=num1(:);den1=den1(:);
+ num2=num2(:);den2=den2(:);
+
+ if prod(sz1)==1&prod(sz2)>1 then
+ den1=den1(ones(den2))
+ num1=num1(ones(num2))
+ sz1=sz2
+ elseif prod(sz2)==1&prod(sz1)>1 then
+ den2=den2(ones(den1))
+ num2=num2(ones(num1))
+ sz2=sz1
+ end
+ if and(sz1<>sz2) then error(8),end
+ for l=1:prod(sz1)
+ [den,fact]=lcm([den1(l);den2(l)])
+ num1(l)=[num1(l),num2(l)]*fact
+ den1(l)=den
+ end,
+ [num1,den1]=simp(num1,den1),
+ f=rlist(matrix(num1,sz1),matrix(den1,sz1),s1.dt)
+ else
+ if size(sz1,"*")>2|size(sz2,"*")>2 then error(8),end
+
+ if or(sz1<0)&or(sz2<0) then
+ // both are eye*x
+ [den1,fact]=lcm([den1;den2])
+ [num1,den1]=simp([num1,num2]*fact,den1)
+ f=rlist(num1*eye(),den1*eye(),s1("dt")),
+ elseif or(sz1<0) then
+ den1=den1+0;num1=num1+0
+ for l=1:min(sz2)
+ [den,fact]=lcm([den1;den2(l,l)])
+ num2(l,l)=[num1,num2(l,l)]*fact
+ den2(l,l)=den
+ end
+ [num2,den2]=simp(num2,den2),
+ f=rlist(num2,den2,s1.dt)
+ elseif or(sz2<0) then
+ den2=den2+0;num2=num2+0
+ for l=1:min(sz1)
+ [den,fact]=lcm([den1(l,l);den2])
+ num1(l,l)=[num1(l,l),num2]*fact
+ den1(l,l)=den
+ end
+ [num1,den1]=simp(num1,den1),
+ f=rlist(num1,den1,s1.dt)
+ end
+ end
+
+
+endfunction
diff --git a/modules/overloading/macros/%r_a_s.bin b/modules/overloading/macros/%r_a_s.bin
new file mode 100755
index 000000000..f46ddacba
--- /dev/null
+++ b/modules/overloading/macros/%r_a_s.bin
Binary files differ
diff --git a/modules/overloading/macros/%r_a_s.sci b/modules/overloading/macros/%r_a_s.sci
new file mode 100755
index 000000000..2029e4d80
--- /dev/null
+++ b/modules/overloading/macros/%r_a_s.sci
@@ -0,0 +1,45 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function f=%r_a_s(f,m)
+ //f = f+m,
+ //f: transfer matrix, m : scalar or scalar matrix
+ //author Serge Steer INRIA
+ //!
+ [num,den]=f(["num","den"])
+ szf=size(den)
+ szm=size(m)
+
+ if and(szf>=0)&and(szm>=0) then
+ if prod(szf)==1&prod(szm)>1 then
+ den=den(ones(m))
+ szf=szm
+ end
+
+ if size(szf,"*")>2 then
+ num=num(:);den=den(:);m=m(:)
+ end
+ [num,den]=simp(num+m.*den,den)
+ num=matrix(num,szf)
+ den=matrix(den,szf)
+ else
+ //at leat one matrix is eye*x
+ if size(szf,"*")>2|size(szm,"*")>2 then
+ error(8)
+ end
+ if or(szf<0)&or(szm<0) then
+ [num,den]=simp(num+m.*den,den)
+ elseif or(szf<0) then
+ [num,den]=simp(num+m.*den,den*ones(m))
+ elseif or(szm<0) then
+ [num,den]=simp(num+(m+0)*eye(den).*den,den)
+ end
+ end
+ f=rlist(num,den,f.dt)
+endfunction
diff --git a/modules/overloading/macros/%r_c_lss.bin b/modules/overloading/macros/%r_c_lss.bin
new file mode 100755
index 000000000..9635f89eb
--- /dev/null
+++ b/modules/overloading/macros/%r_c_lss.bin
Binary files differ
diff --git a/modules/overloading/macros/%r_c_lss.sci b/modules/overloading/macros/%r_c_lss.sci
new file mode 100755
index 000000000..f376d8ff3
--- /dev/null
+++ b/modules/overloading/macros/%r_c_lss.sci
@@ -0,0 +1,14 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA - Serge Steer
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function s=%r_c_lss(s1,s2)
+ //s=%r_c_lss(s1,s2) <=> s=[s1,s2] [rational, state-space]
+ //!
+ [s1,s2]=sysconv(s1,s2);s=[s1,s2]
+endfunction
diff --git a/modules/overloading/macros/%r_c_p.bin b/modules/overloading/macros/%r_c_p.bin
new file mode 100755
index 000000000..df8c4f9fe
--- /dev/null
+++ b/modules/overloading/macros/%r_c_p.bin
Binary files differ
diff --git a/modules/overloading/macros/%r_c_p.sci b/modules/overloading/macros/%r_c_p.sci
new file mode 100755
index 000000000..b31b3f2cf
--- /dev/null
+++ b/modules/overloading/macros/%r_c_p.sci
@@ -0,0 +1,14 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function f=%r_c_p(f,p)
+ // f=%r_c_p(f,p) <=> f=[f,p] [rational, polynomial]
+
+ f=rlist([f("num"),p],[f("den"),ones(p)],f("dt"))
+endfunction
diff --git a/modules/overloading/macros/%r_c_r.bin b/modules/overloading/macros/%r_c_r.bin
new file mode 100755
index 000000000..45eab27c1
--- /dev/null
+++ b/modules/overloading/macros/%r_c_r.bin
Binary files differ
diff --git a/modules/overloading/macros/%r_c_r.sci b/modules/overloading/macros/%r_c_r.sci
new file mode 100755
index 000000000..cde0277ca
--- /dev/null
+++ b/modules/overloading/macros/%r_c_r.sci
@@ -0,0 +1,15 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function [f]=%r_c_r(s1,s2)
+ //f=[s1,s2]
+ //!
+ [s1,s2]=sysconv(s1,s2)
+ f=rlist([s1("num"),s2("num")],[s1("den"),s2("den")],s1("dt"))
+endfunction
diff --git a/modules/overloading/macros/%r_c_s.bin b/modules/overloading/macros/%r_c_s.bin
new file mode 100755
index 000000000..7262f3196
--- /dev/null
+++ b/modules/overloading/macros/%r_c_s.bin
Binary files differ
diff --git a/modules/overloading/macros/%r_c_s.sci b/modules/overloading/macros/%r_c_s.sci
new file mode 100755
index 000000000..e7913bc1a
--- /dev/null
+++ b/modules/overloading/macros/%r_c_s.sci
@@ -0,0 +1,14 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function f=%r_c_s(f,m)
+ // f=%r_c_s(r,m) <=> f=[r, m] [rational, constant]
+ //!
+ f=rlist([f("num"),m],[f("den"),ones(m)],f("dt"))
+endfunction
diff --git a/modules/overloading/macros/%r_clean.bin b/modules/overloading/macros/%r_clean.bin
new file mode 100755
index 000000000..7c73e4845
--- /dev/null
+++ b/modules/overloading/macros/%r_clean.bin
Binary files differ
diff --git a/modules/overloading/macros/%r_clean.sci b/modules/overloading/macros/%r_clean.sci
new file mode 100755
index 000000000..cbc22ed6e
--- /dev/null
+++ b/modules/overloading/macros/%r_clean.sci
@@ -0,0 +1,29 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function a=%r_clean(a,epsa,epsr)
+ //Syntax: a=%r_ clean(a,epsa,epsr)
+ // Given a, matrix of rationals , this function
+ // eliminates all the coefficients of a with absolute value < epsa
+ // and realtive value < epsr (relative means realive wrt norm 1 of
+ // the coefficients)
+ // Default values : epsa=1.d-10; epsr=1.d-10;
+ //!
+
+
+ [lhs,rhs]=argn(0)
+ if rhs == 1 then
+ epsa=1.d-10;
+ epsr=1.d-10;
+ elseif rhs==2 then
+ epsr=1.d-10;
+ end
+ tdom=a("dt")
+ a=simp(clean(a("num"),epsa,epsr)./clean(a("den"),epsa,epsr));a("dt")=tdom
+endfunction
diff --git a/modules/overloading/macros/%r_cumprod.bin b/modules/overloading/macros/%r_cumprod.bin
new file mode 100755
index 000000000..a0c29735e
--- /dev/null
+++ b/modules/overloading/macros/%r_cumprod.bin
Binary files differ
diff --git a/modules/overloading/macros/%r_cumprod.sci b/modules/overloading/macros/%r_cumprod.sci
new file mode 100755
index 000000000..5e08d779e
--- /dev/null
+++ b/modules/overloading/macros/%r_cumprod.sci
@@ -0,0 +1,70 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2010 - INRIA - Serge Steer
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function a=%r_cumprod(varargin)
+ //prod of a rational matrix
+ // If we call cumprod with 3 arguments, the third is optional for rational matrices.
+ a = varargin(1)
+ dims = size(a);
+
+ nargs = size(varargin);
+ select nargs
+ case 1
+ d = "*";
+ case 2
+ if or(varargin(2) == ["native", "double"]) then
+ d = "*";
+ else
+ d = varargin(2);
+ end
+ case 3
+ d = varargin(2);
+ else
+ error(msprintf(_("%s: Wrong number of input argument(s): %d to %d expected.\n"),"cumprod", 1, 3));
+ end
+
+ // Check second argument : d
+ select type(d)
+ case 1
+ if size(d,'*') <> 1 then
+ error(msprintf(_("%s: Wrong size for input argument #%d: A scalar expected.\n"),"cumprod", 2))
+ end
+ if int(d) <> d | d < 0 then
+ error(msprintf(_("%s: Wrong value for input argument #%d: Integer >= %d expected.\n"),"cumprod", 2, 1))
+ end
+ case 10
+ if size(d,'*') <> 1 then
+ error(msprintf(_("%s: Wrong size for input argument #%d: A string expected.\n"),"cumprod",2))
+ end
+ if and(d<>["r","c","*","m"]) then
+ error(msprintf(_("%s: Wrong value for input argument #%d: Must be in the set {%s}.\n"),..
+ "cumprod",2,"""*"",""r"",""c"",""m"""))
+ end
+
+ pos = [1,2,0,find(dims>1,1)];
+ d=pos(find(d==["r","c","*","m"]))
+ else
+ error(msprintf(_("%s: Wrong type for input argument #%d: A string or scalar expected.\n"),"cumprod",2))
+ end
+
+ if d==0 then //'*'
+ a=rlist(cumprod(a.num),cumprod(a.den),a.dt)
+ if simp_mode() then
+ a=simp(a)
+ end
+ elseif or(d==[1 2]) then
+ a=rlist(cumprod(a.num,d),cumprod(a.den,d),a.dt)
+ if simp_mode() then
+ a=simp(a)
+ end
+ else
+ a=a
+ end
+
+endfunction
diff --git a/modules/overloading/macros/%r_cumsum.bin b/modules/overloading/macros/%r_cumsum.bin
new file mode 100755
index 000000000..c8696a674
--- /dev/null
+++ b/modules/overloading/macros/%r_cumsum.bin
Binary files differ
diff --git a/modules/overloading/macros/%r_cumsum.sci b/modules/overloading/macros/%r_cumsum.sci
new file mode 100755
index 000000000..b254571d6
--- /dev/null
+++ b/modules/overloading/macros/%r_cumsum.sci
@@ -0,0 +1,80 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2013 - Scilab Enterprises - Adeline CARNIS
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function a = %r_cumsum(varargin)
+ // cumulative sum for rational matrices
+ // If we call cumsum with 3 arguments, the third is optional for rational matrices.
+ a = varargin(1)
+ dims = size(a);
+
+ nargs = size(varargin);
+ select nargs
+ case 1
+ d = "*";
+ case 2
+ if or(varargin(2) == ["native", "double"]) then
+ d = "*";
+ else
+ d = varargin(2);
+ end
+ case 3
+ d = varargin(2);
+ else
+ error(msprintf(_("%s: Wrong number of input argument(s): %d to %d expected.\n"),"cumsum", 1, 3));
+ end
+
+ // Check second argument : d
+ select type(d)
+ case 1
+ if size(d,'*') <> 1 then
+ error(msprintf(_("%s: Wrong size for input argument #%d: A scalar expected.\n"),"cumsum", 2))
+ end
+ if int(d) <> d | d < 0 then
+ error(msprintf(_("%s: Wrong value for input argument #%d: Integer >= %d expected.\n"),"cumsum", 2, 1))
+ end
+ case 10
+ if size(d,'*') <> 1 then
+ error(msprintf(_("%s: Wrong size for input argument #%d: A string expected.\n"),"cumsum",2))
+ end
+ if and(d<>["r","c","*","m"]) then
+ error(msprintf(_("%s: Wrong value for input argument #%d: Must be in the set {%s}.\n"),..
+ "cumsum",2,"""*"",""r"",""c"",""m"""))
+ end
+
+ pos = [1,2,0,find(dims>1,1)];
+ d=pos(find(d==["r","c","*","m"]))
+
+ else
+ error(msprintf(_("%s: Wrong type for input argument #%d: A string or scalar expected.\n"),"cumsum",2))
+ end
+
+ select d
+ case 0 then // case "*"
+ a = tril(ones(size(a,"*"), size(a, "*"))) * matrix(a, -1, 1);
+ if simp_mode() then
+ a = simp(a);
+ end
+ a = matrix(a, dims(1), dims(2));
+ case 1 then // case 1 or 'r'
+ a = [tril(ones(dims(1), dims(1))) zeros(dims(2), dims(2)); zeros(dims(1), dims(1)) tril(ones(dims(2), dims(2)))] * matrix(a, -1, 1);
+ if simp_mode() then
+ a = simp(a);
+ end
+ a = matrix(a, dims(1), dims(2));
+ case 2 then // case 2 or 'c"
+ a = [eye(dims(1), dims(1)) zeros(dims(2), dims(2)); eye(dims(1), dims(1)) eye(dims(2), dims(2))] * matrix(a, -1, 1);
+ if simp_mode() then
+ a = simp(a);
+ end
+ a = matrix(a, dims(1), dims(2));
+ else
+ a=a
+ end
+
+endfunction
diff --git a/modules/overloading/macros/%r_d_p.bin b/modules/overloading/macros/%r_d_p.bin
new file mode 100755
index 000000000..398f773ba
--- /dev/null
+++ b/modules/overloading/macros/%r_d_p.bin
Binary files differ
diff --git a/modules/overloading/macros/%r_d_p.sci b/modules/overloading/macros/%r_d_p.sci
new file mode 100755
index 000000000..d509876dd
--- /dev/null
+++ b/modules/overloading/macros/%r_d_p.sci
@@ -0,0 +1,15 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function r=%r_d_p(r,m)
+ // r=r./p
+ //!
+
+ r=rlist(r("num").*ones(m),r("den").*m,r("dt"))
+endfunction
diff --git a/modules/overloading/macros/%r_d_r.bin b/modules/overloading/macros/%r_d_r.bin
new file mode 100755
index 000000000..e977bb8cc
--- /dev/null
+++ b/modules/overloading/macros/%r_d_r.bin
Binary files differ
diff --git a/modules/overloading/macros/%r_d_r.sci b/modules/overloading/macros/%r_d_r.sci
new file mode 100755
index 000000000..b8eba7b11
--- /dev/null
+++ b/modules/overloading/macros/%r_d_r.sci
@@ -0,0 +1,26 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function f=%r_d_r(s1,s2)
+ // f=s1./s2
+ //!
+ if ndims(s1)<=2& ndims(s2)<=2 then
+ [s1,s2]=sysconv(s1,s2)
+ [num,den]=simp(s1.num.*s2.den,s1.den.*s2.num)
+ f=rlist(num,den,s1.dt)
+ else
+ if size(s1,"*")==1 then
+ sz=size(s2)
+ else
+ sz=size(s1)
+ end
+ [num,den]=simp(s1.num(:).*s2.den(:),s1.den(:).*s2.num(:))
+ f=rlist(matrix(num,sz),matrix(den,sz),s1.dt)
+ end
+endfunction
diff --git a/modules/overloading/macros/%r_d_s.bin b/modules/overloading/macros/%r_d_s.bin
new file mode 100755
index 000000000..8fced539c
--- /dev/null
+++ b/modules/overloading/macros/%r_d_s.bin
Binary files differ
diff --git a/modules/overloading/macros/%r_d_s.sci b/modules/overloading/macros/%r_d_s.sci
new file mode 100755
index 000000000..2feec7ff6
--- /dev/null
+++ b/modules/overloading/macros/%r_d_s.sci
@@ -0,0 +1,16 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function r=%r_d_s(r,m)
+ // r=r./m
+ //!
+
+ if size(m,"*")==0 then r=[],return,end
+ r=rlist(r.num./m,r.den.*ones(m),r.dt)
+endfunction
diff --git a/modules/overloading/macros/%r_det.bin b/modules/overloading/macros/%r_det.bin
new file mode 100755
index 000000000..91123b1aa
--- /dev/null
+++ b/modules/overloading/macros/%r_det.bin
Binary files differ
diff --git a/modules/overloading/macros/%r_det.sci b/modules/overloading/macros/%r_det.sci
new file mode 100755
index 000000000..01ba91f3d
--- /dev/null
+++ b/modules/overloading/macros/%r_det.sci
@@ -0,0 +1,14 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function x=%r_det(a)
+
+ [n,d]=lcmdiag(a);
+ x=determ(n)/determ(d);
+endfunction
diff --git a/modules/overloading/macros/%r_diag.bin b/modules/overloading/macros/%r_diag.bin
new file mode 100755
index 000000000..047faf7c8
--- /dev/null
+++ b/modules/overloading/macros/%r_diag.bin
Binary files differ
diff --git a/modules/overloading/macros/%r_diag.sci b/modules/overloading/macros/%r_diag.sci
new file mode 100755
index 000000000..134c9cb3f
--- /dev/null
+++ b/modules/overloading/macros/%r_diag.sci
@@ -0,0 +1,28 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 1995-2010 - INRIA - Serge Steer
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function d=%r_diag(a,k)
+ // %r_diag - implement diag function for rational matrix ,..
+ if argn(2)<2 then
+ k=0,
+ else
+ if type(k)<>1 then error(53,2);end
+ if size(k,"*")<>1 then error(89,2);end
+ if ~isreal(k) then error(52,2);end
+ end
+ [m,n]=size(a.num)
+ if m<>1&n<>1 then
+ d=rlist(diag(a.num,k),diag(a.den,k),a.dt)
+ else
+ mn=max(m,n)
+ den=ones(mn,mn)
+ den=den-diag(diag(den,k))+diag(a.den,k)
+ d=rlist(diag(a.num,k),den,a.dt)
+ end
+endfunction
diff --git a/modules/overloading/macros/%r_e.bin b/modules/overloading/macros/%r_e.bin
new file mode 100755
index 000000000..33b7f5e8f
--- /dev/null
+++ b/modules/overloading/macros/%r_e.bin
Binary files differ
diff --git a/modules/overloading/macros/%r_e.sci b/modules/overloading/macros/%r_e.sci
new file mode 100755
index 000000000..838517f52
--- /dev/null
+++ b/modules/overloading/macros/%r_e.sci
@@ -0,0 +1,19 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function r=%r_e(varargin)
+ // %r_e(i,j,f) extraction f(i,j) in a rational matrix
+ //author Serge Steer, INRIA
+ //!
+ f=varargin($)
+ num=f.num
+ den=f.den
+ r=rlist(num(varargin(1:$-1)),den(varargin(1:$-1)),f.dt)
+ if r.num==[] then r=[],end
+endfunction
diff --git a/modules/overloading/macros/%r_eye.bin b/modules/overloading/macros/%r_eye.bin
new file mode 100755
index 000000000..2502ad145
--- /dev/null
+++ b/modules/overloading/macros/%r_eye.bin
Binary files differ
diff --git a/modules/overloading/macros/%r_eye.sci b/modules/overloading/macros/%r_eye.sci
new file mode 100755
index 000000000..54b4602f5
--- /dev/null
+++ b/modules/overloading/macros/%r_eye.sci
@@ -0,0 +1,13 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function x=%r_eye(a)
+
+ x=eye(a("num"));
+endfunction
diff --git a/modules/overloading/macros/%r_f_lss.bin b/modules/overloading/macros/%r_f_lss.bin
new file mode 100755
index 000000000..36e3feee7
--- /dev/null
+++ b/modules/overloading/macros/%r_f_lss.bin
Binary files differ
diff --git a/modules/overloading/macros/%r_f_lss.sci b/modules/overloading/macros/%r_f_lss.sci
new file mode 100755
index 000000000..0f8c66bee
--- /dev/null
+++ b/modules/overloading/macros/%r_f_lss.sci
@@ -0,0 +1,14 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA - Serge Steer
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function [s]=%r_f_lss(s1,s2)
+ //[s]=%r_f_lss(s1,s2) <=> s= [s1;s2] [rational;state-space]
+ //!
+ [s1,s2]=sysconv(s1,s2);s=[s1;s2]
+endfunction
diff --git a/modules/overloading/macros/%r_f_p.bin b/modules/overloading/macros/%r_f_p.bin
new file mode 100755
index 000000000..6efde9a04
--- /dev/null
+++ b/modules/overloading/macros/%r_f_p.bin
Binary files differ
diff --git a/modules/overloading/macros/%r_f_p.sci b/modules/overloading/macros/%r_f_p.sci
new file mode 100755
index 000000000..821d5d390
--- /dev/null
+++ b/modules/overloading/macros/%r_f_p.sci
@@ -0,0 +1,15 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function f=%r_f_p(f,m)
+ // [f;m]
+ //!
+
+ f=rlist([f("num");m],[f("den");ones(m)],f("dt"))
+endfunction
diff --git a/modules/overloading/macros/%r_f_r.bin b/modules/overloading/macros/%r_f_r.bin
new file mode 100755
index 000000000..f2aa6a69e
--- /dev/null
+++ b/modules/overloading/macros/%r_f_r.bin
Binary files differ
diff --git a/modules/overloading/macros/%r_f_r.sci b/modules/overloading/macros/%r_f_r.sci
new file mode 100755
index 000000000..a47d08370
--- /dev/null
+++ b/modules/overloading/macros/%r_f_r.sci
@@ -0,0 +1,16 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function [f]=%r_f_r(s1,s2)
+ //f=[s1;s2]
+ //!
+
+ [s1,s2]=sysconv(s1,s2)
+ f=rlist([s1("num");s2("num")],[s1("den");s2("den")],s1("dt"))
+endfunction
diff --git a/modules/overloading/macros/%r_f_s.bin b/modules/overloading/macros/%r_f_s.bin
new file mode 100755
index 000000000..b1b9e693e
--- /dev/null
+++ b/modules/overloading/macros/%r_f_s.bin
Binary files differ
diff --git a/modules/overloading/macros/%r_f_s.sci b/modules/overloading/macros/%r_f_s.sci
new file mode 100755
index 000000000..096834065
--- /dev/null
+++ b/modules/overloading/macros/%r_f_s.sci
@@ -0,0 +1,15 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function f=%r_f_s(f,m)
+ // [f;m] [rational;constant]
+ //!
+
+ f=rlist([f("num");m],[f("den");ones(m)],f("dt"))
+endfunction
diff --git a/modules/overloading/macros/%r_i_ce.bin b/modules/overloading/macros/%r_i_ce.bin
new file mode 100755
index 000000000..d0f19d33d
--- /dev/null
+++ b/modules/overloading/macros/%r_i_ce.bin
Binary files differ
diff --git a/modules/overloading/macros/%r_i_ce.sci b/modules/overloading/macros/%r_i_ce.sci
new file mode 100755
index 000000000..1da34a74d
--- /dev/null
+++ b/modules/overloading/macros/%r_i_ce.sci
@@ -0,0 +1,13 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA - Vincent Couvert
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function M=%r_i_ce(varargin)
+ // Insertion of a rationnal matrix in a cell
+ M=generic_i_ce(varargin(:))
+endfunction
diff --git a/modules/overloading/macros/%r_i_hm.bin b/modules/overloading/macros/%r_i_hm.bin
new file mode 100755
index 000000000..ddb25177a
--- /dev/null
+++ b/modules/overloading/macros/%r_i_hm.bin
Binary files differ
diff --git a/modules/overloading/macros/%r_i_hm.sci b/modules/overloading/macros/%r_i_hm.sci
new file mode 100755
index 000000000..f9223d18e
--- /dev/null
+++ b/modules/overloading/macros/%r_i_hm.sci
@@ -0,0 +1,21 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+function N=%r_i_hm(varargin)
+ //author Serge Steer INRIA
+ M=varargin($);
+ N=varargin($-1);//inserted matrix
+ // M(i,...)=N, M hypermatrix; N rational matrix
+ Num=M;
+ Den=ones(M);
+ Num(varargin(1:$-2))=N.num
+ Den(varargin(1:$-2))=N.den
+
+ N.num=Num;
+ N.den=Den;
+endfunction
diff --git a/modules/overloading/macros/%r_i_lss.bin b/modules/overloading/macros/%r_i_lss.bin
new file mode 100755
index 000000000..89f643892
--- /dev/null
+++ b/modules/overloading/macros/%r_i_lss.bin
Binary files differ
diff --git a/modules/overloading/macros/%r_i_lss.sci b/modules/overloading/macros/%r_i_lss.sci
new file mode 100755
index 000000000..4c91a493b
--- /dev/null
+++ b/modules/overloading/macros/%r_i_lss.sci
@@ -0,0 +1,18 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA - Serge Steer
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function s2=%r_i_lss(i,j,s1,s2)
+ //%r_i_lss(i,j,s1,s2) <=> s2(i,j)=s1
+ //!
+ if type(i)==10|type(j)==10 then
+ error(21)
+ end
+ [s1 s2]=sysconv(s1,s2)
+ s2(i,j)=s1
+endfunction
diff --git a/modules/overloading/macros/%r_i_p.bin b/modules/overloading/macros/%r_i_p.bin
new file mode 100755
index 000000000..3cddc572e
--- /dev/null
+++ b/modules/overloading/macros/%r_i_p.bin
Binary files differ
diff --git a/modules/overloading/macros/%r_i_p.sci b/modules/overloading/macros/%r_i_p.sci
new file mode 100755
index 000000000..772e155f1
--- /dev/null
+++ b/modules/overloading/macros/%r_i_p.sci
@@ -0,0 +1,22 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function f2=%r_i_p(varargin)
+ // /author Serge Steer INRIA
+ //
+ f2=varargin($-1)
+ n= varargin($)
+ // f2=%r_i_p(i,j,f2,p) insertion
+ d=ones(n);
+ n(varargin(1:$-2))=f2.num;
+ d=ones(n);
+ d(varargin(1:$-2))=f2.den;
+
+ f2=rlist(n,d,f2("dt"))
+endfunction
diff --git a/modules/overloading/macros/%r_i_r.bin b/modules/overloading/macros/%r_i_r.bin
new file mode 100755
index 000000000..0c40f644f
--- /dev/null
+++ b/modules/overloading/macros/%r_i_r.bin
Binary files differ
diff --git a/modules/overloading/macros/%r_i_r.sci b/modules/overloading/macros/%r_i_r.sci
new file mode 100755
index 000000000..63dcb2cee
--- /dev/null
+++ b/modules/overloading/macros/%r_i_r.sci
@@ -0,0 +1,28 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function s1=%r_i_r(varargin)
+ //author Serge Steer INRIA
+ s1=varargin($-1)
+ s2=varargin($)
+ // %r_i_r(i,j,s1,s2) insertion s2(i,j)=s1
+
+ [s1,s2]=sysconv(s1,s2)
+ n=s2.num;
+ n(varargin(1:$-2))=s1.num,
+ if ndims(s2.den)<=2 then
+ d=ones(n);
+ [n1,n2]=size(s2.den)
+ d(1:n1,1:n2)=s2.den;
+ d(varargin(1:$-2))=s1.den
+ else
+ d=generic_i_hm(1,varargin(1:$-2),s1.den,s2.den)
+ end
+ s1=rlist(n,d,s1.dt)
+endfunction
diff --git a/modules/overloading/macros/%r_i_s.bin b/modules/overloading/macros/%r_i_s.bin
new file mode 100755
index 000000000..9c442af7e
--- /dev/null
+++ b/modules/overloading/macros/%r_i_s.bin
Binary files differ
diff --git a/modules/overloading/macros/%r_i_s.sci b/modules/overloading/macros/%r_i_s.sci
new file mode 100755
index 000000000..5e87fc7ec
--- /dev/null
+++ b/modules/overloading/macros/%r_i_s.sci
@@ -0,0 +1,36 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function f2=%r_i_s(varargin)
+ //author Serge Steer INRIA
+ f2=varargin($-1)
+ n= varargin($)
+ // %r_i_s(i,j,f2,n)
+
+ if size(varargin)==3 then
+ i= varargin(1)
+ if (type(i)==10|type(i)==15) then //cell or struct case
+ f2=createstruct(i,f2)
+ if type(i(1))<>10 & i(2)=="entries" then
+ // change struct to cell
+ f=getfield(1,f2);f(1)="ce"
+ setfield(1,f,f2)
+ end
+ return
+ end
+ d=ones(n);
+ n(i)=f2.num,d(i)=f2.den
+ else
+ d=ones(n);
+ n(varargin(1:$-2))=f2.num;
+ d=ones(n);
+ d(varargin(1:$-2))=f2.den;
+ end
+ f2=rlist(n,d,f2.dt)
+endfunction
diff --git a/modules/overloading/macros/%r_i_st.bin b/modules/overloading/macros/%r_i_st.bin
new file mode 100755
index 000000000..bbba3ab91
--- /dev/null
+++ b/modules/overloading/macros/%r_i_st.bin
Binary files differ
diff --git a/modules/overloading/macros/%r_i_st.sci b/modules/overloading/macros/%r_i_st.sci
new file mode 100755
index 000000000..e4911cdca
--- /dev/null
+++ b/modules/overloading/macros/%r_i_st.sci
@@ -0,0 +1,12 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function M=%r_i_st(varargin)
+ M=generic_i_st(varargin(:))
+endfunction
diff --git a/modules/overloading/macros/%r_inv.bin b/modules/overloading/macros/%r_inv.bin
new file mode 100755
index 000000000..16e9b470a
--- /dev/null
+++ b/modules/overloading/macros/%r_inv.bin
Binary files differ
diff --git a/modules/overloading/macros/%r_inv.sci b/modules/overloading/macros/%r_inv.sci
new file mode 100755
index 000000000..7c9c36aa4
--- /dev/null
+++ b/modules/overloading/macros/%r_inv.sci
@@ -0,0 +1,13 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function x=%r_inv(a)
+
+ x=invr(a)
+endfunction
diff --git a/modules/overloading/macros/%r_j_s.bin b/modules/overloading/macros/%r_j_s.bin
new file mode 100755
index 000000000..0faba3abd
--- /dev/null
+++ b/modules/overloading/macros/%r_j_s.bin
Binary files differ
diff --git a/modules/overloading/macros/%r_j_s.sci b/modules/overloading/macros/%r_j_s.sci
new file mode 100755
index 000000000..e3bacd74d
--- /dev/null
+++ b/modules/overloading/macros/%r_j_s.sci
@@ -0,0 +1,58 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function f=%r_j_s(f,s)
+ // p.^s for p rational matrix
+ //!
+ if s==[] then f=[],return,end
+ if or(imag(s)<>0)|or(int(s)<>s) then error(30),end
+ [m,n]=size(f)
+ [ms,ns]=size(s)
+ if ms==1&ns==1 then
+ if s<0 then
+ num=f("num")
+ if or(abs(coeff(num(:)))*ones(max(degree(num))+1,1)==0) then
+ error(27)
+ end
+ s=-s
+ f=rlist(f("den").^s,f("num").^s,f("dt"))
+ else
+ f=rlist(f("num").^s,f("den").^s,f("dt"))
+ end
+ elseif m==1&n==1 then // Element wise exponentiation f.^s with f "scalar"
+ kp=find(s>=0)
+ kn=find(s<0)
+ num=ones(s)
+ den=ones(s)
+ num(kp)=f("num").^s(kp)
+ den(kp)=f("den").^s(kp)
+ p=1/f
+ num(kn)=p("num").^(-s(kn))
+ den(kn)=p("den").^(-s(kn))
+ f=rlist(num,den,[])
+ elseif ms==m&ns==n then // Element wise exponentiation
+ s=s(:);
+ kp=find(s>=0)
+ kn=find(s<0)
+ num=f("num")(:);
+ den=f("den")(:);
+ num(kp)=num(kp).^s(kp)
+ den(kp)=den(kp).^s(kp)
+
+ if or(abs(coeff(num(kn)))*ones(max(degree(num(kn)))+1,1)==0) then
+ error(27)
+ end
+ num(kn)=den(kn).^(-s(kn))
+ den(kn)=num(kn).^(-s(kn))
+ f=rlist(matrix(num,n,m),matrix(den,n,m),[])
+ else
+ error(30)
+ end
+
+endfunction
diff --git a/modules/overloading/macros/%r_k_p.bin b/modules/overloading/macros/%r_k_p.bin
new file mode 100755
index 000000000..652f07208
--- /dev/null
+++ b/modules/overloading/macros/%r_k_p.bin
Binary files differ
diff --git a/modules/overloading/macros/%r_k_p.sci b/modules/overloading/macros/%r_k_p.sci
new file mode 100755
index 000000000..15ba88eb7
--- /dev/null
+++ b/modules/overloading/macros/%r_k_p.sci
@@ -0,0 +1,25 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function r=%r_k_p(a,b)
+ // a.*.b
+
+ [ma,na]=size(a)
+ [mb,nb]=size(b)
+ r=zeros(ma*mb,na*nb)
+ k=0
+ for j=1:na
+ l=0
+ for i=1:ma
+ r(l+(1:mb),k+(1:nb))=a(i,j)*b
+ l=l+mb
+ end
+ k=k+nb
+ end
+endfunction
diff --git a/modules/overloading/macros/%r_k_r.bin b/modules/overloading/macros/%r_k_r.bin
new file mode 100755
index 000000000..8729c8529
--- /dev/null
+++ b/modules/overloading/macros/%r_k_r.bin
Binary files differ
diff --git a/modules/overloading/macros/%r_k_r.sci b/modules/overloading/macros/%r_k_r.sci
new file mode 100755
index 000000000..143829ae9
--- /dev/null
+++ b/modules/overloading/macros/%r_k_r.sci
@@ -0,0 +1,24 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function r=%r_k_r(a,b)
+ // a.*.b
+ [ma,na]=size(a)
+ [mb,nb]=size(b)
+ r=zeros(ma*mb,na*nb)
+ k=0
+ for j=1:na
+ l=0
+ for i=1:ma
+ r(l+(1:mb),k+(1:nb))=a(i,j)*b
+ l=l+mb
+ end
+ k=k+nb
+ end
+endfunction
diff --git a/modules/overloading/macros/%r_k_s.bin b/modules/overloading/macros/%r_k_s.bin
new file mode 100755
index 000000000..c432eac69
--- /dev/null
+++ b/modules/overloading/macros/%r_k_s.bin
Binary files differ
diff --git a/modules/overloading/macros/%r_k_s.sci b/modules/overloading/macros/%r_k_s.sci
new file mode 100755
index 000000000..57e378fa9
--- /dev/null
+++ b/modules/overloading/macros/%r_k_s.sci
@@ -0,0 +1,24 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+function r=%r_k_s(a,b)
+ // a.*.b
+
+ [ma,na]=size(a)
+ [mb,nb]=size(b)
+ r=zeros(ma*mb,na*nb)
+ k=0
+ for j=1:na
+ l=0
+ for i=1:ma
+ r(l+(1:mb),k+(1:nb))=a(i,j)*b
+ l=l+mb
+ end
+ k=k+nb
+ end
+endfunction
diff --git a/modules/overloading/macros/%r_l_lss.bin b/modules/overloading/macros/%r_l_lss.bin
new file mode 100755
index 000000000..2364069a1
--- /dev/null
+++ b/modules/overloading/macros/%r_l_lss.bin
Binary files differ
diff --git a/modules/overloading/macros/%r_l_lss.sci b/modules/overloading/macros/%r_l_lss.sci
new file mode 100755
index 000000000..195b3d499
--- /dev/null
+++ b/modules/overloading/macros/%r_l_lss.sci
@@ -0,0 +1,14 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function s=%r_l_lss(s1,s2)
+ //!
+ [s1,s2]=sysconv(s1,s2)
+ s=s1\s2
+endfunction
diff --git a/modules/overloading/macros/%r_l_p.bin b/modules/overloading/macros/%r_l_p.bin
new file mode 100755
index 000000000..e9611dc06
--- /dev/null
+++ b/modules/overloading/macros/%r_l_p.bin
Binary files differ
diff --git a/modules/overloading/macros/%r_l_p.sci b/modules/overloading/macros/%r_l_p.sci
new file mode 100755
index 000000000..cf9129db9
--- /dev/null
+++ b/modules/overloading/macros/%r_l_p.sci
@@ -0,0 +1,19 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function f=%r_l_p(f,m)
+ // f\m
+ //!
+
+ if size(f("num"),"*")<>1 then
+ f=invr(f)*m
+ else
+ f=rlist(m*f("den"),ones(m)*f("num"),f("dt"))
+ end
+endfunction
diff --git a/modules/overloading/macros/%r_l_r.bin b/modules/overloading/macros/%r_l_r.bin
new file mode 100755
index 000000000..379384e10
--- /dev/null
+++ b/modules/overloading/macros/%r_l_r.bin
Binary files differ
diff --git a/modules/overloading/macros/%r_l_r.sci b/modules/overloading/macros/%r_l_r.sci
new file mode 100755
index 000000000..1f74fe641
--- /dev/null
+++ b/modules/overloading/macros/%r_l_r.sci
@@ -0,0 +1,29 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function s1=%r_l_r(s1,s2)
+ // %r_l_r(s1,s2) s1\s2
+ //!
+ [s1,s2]=sysconv(s1,s2)
+ [n,m]=size(s1("den"))
+ if n<>m then error(43),end
+ if m*n==1 then
+ s1=%r_m_r(rlist(s1("den"),s1("num"),s1("dt")),s2)
+ else
+ // reduction de s1 sous la forme D1**(-1)* N1 (D1 diagonale)
+ p=s1("num")
+ s1=s1("den")
+ for l=1:n
+ [pp,fact]=lcm(s1(l,:))
+ p(l,:)=p(l,:).*fact
+ s2(l,:)=s2(l,:)*pp
+ end
+ s1=invr(p)*s2,
+ end
+endfunction
diff --git a/modules/overloading/macros/%r_l_s.bin b/modules/overloading/macros/%r_l_s.bin
new file mode 100755
index 000000000..ccdd42038
--- /dev/null
+++ b/modules/overloading/macros/%r_l_s.bin
Binary files differ
diff --git a/modules/overloading/macros/%r_l_s.sci b/modules/overloading/macros/%r_l_s.sci
new file mode 100755
index 000000000..1993d57d2
--- /dev/null
+++ b/modules/overloading/macros/%r_l_s.sci
@@ -0,0 +1,19 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function f=%r_l_s(f,m)
+ // f\m
+ //!
+
+ if size(f("num"),"*")<>1 then
+ f=invr(f)*m
+ else
+ f=rlist(m*f("den"),ones(m)*f("num"),f("dt"))
+ end
+endfunction
diff --git a/modules/overloading/macros/%r_m_hm.bin b/modules/overloading/macros/%r_m_hm.bin
new file mode 100755
index 000000000..da6e1832e
--- /dev/null
+++ b/modules/overloading/macros/%r_m_hm.bin
Binary files differ
diff --git a/modules/overloading/macros/%r_m_hm.sci b/modules/overloading/macros/%r_m_hm.sci
new file mode 100755
index 000000000..7c30793c6
--- /dev/null
+++ b/modules/overloading/macros/%r_m_hm.sci
@@ -0,0 +1,34 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function f1=%r_m_hm(f1,n2)
+ // %r_m_s(f1,n2)
+ //f1 = f1*n2
+ //author Serge Steer INRIA
+ //!
+
+ [n1,d1]=f1(["num","den"]),
+ sz1=size(n1);
+ if prod(sz1)==0 then return,end
+ sz2=size(n2);
+ n2=n2(:)
+
+ if or(sz1==-1) then
+ n1=n1+0;d1=d1+0;
+ end
+ if prod(sz1)==1 then
+ num=n1*n2,
+ den=d1(ones(n2))
+ else,
+ error(10)
+ end,
+
+ f1=rlist(matrix(num,sz2),matrix(den,sz2),f1.dt)
+endfunction
+
diff --git a/modules/overloading/macros/%r_m_lss.bin b/modules/overloading/macros/%r_m_lss.bin
new file mode 100755
index 000000000..f0e92134c
--- /dev/null
+++ b/modules/overloading/macros/%r_m_lss.bin
Binary files differ
diff --git a/modules/overloading/macros/%r_m_lss.sci b/modules/overloading/macros/%r_m_lss.sci
new file mode 100755
index 000000000..7a4688bb7
--- /dev/null
+++ b/modules/overloading/macros/%r_m_lss.sci
@@ -0,0 +1,15 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function s=%r_m_lss(s1,s2)
+ //s=s1*s2
+ //!
+
+ [s1,s2]=sysconv(s1,s2);s=s1*s2
+endfunction
diff --git a/modules/overloading/macros/%r_m_p.bin b/modules/overloading/macros/%r_m_p.bin
new file mode 100755
index 000000000..1e58cdcfa
--- /dev/null
+++ b/modules/overloading/macros/%r_m_p.bin
Binary files differ
diff --git a/modules/overloading/macros/%r_m_p.sci b/modules/overloading/macros/%r_m_p.sci
new file mode 100755
index 000000000..27dbf674d
--- /dev/null
+++ b/modules/overloading/macros/%r_m_p.sci
@@ -0,0 +1,54 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function [f1]=%r_m_p(f1,n2)
+ // r=%r_m_p(f1,n2) <=> r=f1*n2
+ // f1=rational n2=polynomial
+ //!
+
+ [n1,d1]=f1(["num","den"]),
+ [l1,m1]=size(n1);[l2,m2]=size(n2),
+ //
+ indef=%f
+ if l1==-1 then
+ n1=n1+0;d1=d1+0;l1=1;m1=1;
+ if l2*m2==1 then indef=%t,else error(14),end
+ end
+ if l2==-1 then
+ n2=n2+0;l2=1;m2=1;
+ if l1*m1==1 then indef=%t,else error(14),end
+ end
+ if min([l1*m1,l2*m2])==1 then,
+ num=n1*n2,
+ den=d1*ones(l2,m2),
+ else,
+ if m1<>l2 then error(10),end,
+ for i=1:l1,
+ n=n1(i,:);
+ [y,fact]=lcm(d1(i,:)),
+ den(i,1:m2)=ones(1,m2)*y,
+ for j=1:m2,
+ num(i,j)=n*(n2(:,j).*matrix(fact,l2,1)),
+ end,
+ end,
+ end,
+ if ndims(num)<=2 then
+ [num,den]=simp(num,den),
+ else
+ sz=size(num)
+ [num,den]=simp(num.entries,den.entries),
+ num=matrix(num,sz)
+ den=matrix(den,sz)
+ end
+ if indef then
+ num=num*eye()
+ den=den*eye()
+ end
+ f1=rlist(num,den,f1("dt"))
+endfunction
diff --git a/modules/overloading/macros/%r_m_r.bin b/modules/overloading/macros/%r_m_r.bin
new file mode 100755
index 000000000..50f34f867
--- /dev/null
+++ b/modules/overloading/macros/%r_m_r.bin
Binary files differ
diff --git a/modules/overloading/macros/%r_m_r.sci b/modules/overloading/macros/%r_m_r.sci
new file mode 100755
index 000000000..5803840f0
--- /dev/null
+++ b/modules/overloading/macros/%r_m_r.sci
@@ -0,0 +1,61 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function s1=%r_m_r(s1,s2)
+ //s1=s1*s2
+ //!
+
+ [s1,s2]=sysconv(s1,s2),
+ [n1,d1]=s1(["num","den"]);
+ [n2,d2]=s2(["num","den"]);
+ sz1=size(n1)
+ sz2=size(n2)
+
+ indef=%f
+ if or(sz1==-1) then
+ n1=n1+0;d1=d1+0;sz1=[1 1]
+ if prod(sz2)==1 then indef=%t,else error(14),end
+ end
+ if or(sz2==-1) then
+ n2=n2+0;d2=d2+0;sz2=[1 1]
+ if prod(sz1)==1 then indef=%t,else error(14),end
+ end
+ if prod(sz1)==1 then
+ [num,den]=simp(n1.*n2(:),d1.*d2(:)),
+ num=matrix(num,sz2)
+ den=matrix(den,sz2)
+ elseif prod(sz2)==1 then
+ [num,den]=simp(n1(:).*n2,d1(:).*d2),
+ num=matrix(num,sz1)
+ den=matrix(den,sz1)
+ else
+ if size(sz1,"*")>2|size(sz2,"*")>2 then error(10),end
+ if sz1(2)<>sz2(1) then error(10),end,
+ l1=sz1(1);m1=sz1(2);m2=sz2(2);
+ for i=1:l1, pp(i)=lcm(d1(i,:)),end,
+ for j=1:m2,
+ y=lcm(d2(:,j)),
+ for i=1:l1,
+ yij=y*pp(i),
+ x=0;
+ for k=1:m1,
+ x=x+n1(i,k)*n2(k,j)*pppdiv(y,d2(k,j))*pppdiv(pp(i),d1(i,k)),
+ end
+ num(i,j)=x,den(i,j)=yij,
+ end
+ end
+ [num,den]=simp(num,den),
+ end
+
+ if indef then
+ num=num*eye()
+ den=den*eye()
+ end
+ s1=rlist(num,den,s1.dt)
+endfunction
diff --git a/modules/overloading/macros/%r_m_s.bin b/modules/overloading/macros/%r_m_s.bin
new file mode 100755
index 000000000..210a407c5
--- /dev/null
+++ b/modules/overloading/macros/%r_m_s.bin
Binary files differ
diff --git a/modules/overloading/macros/%r_m_s.sci b/modules/overloading/macros/%r_m_s.sci
new file mode 100755
index 000000000..20ea29fff
--- /dev/null
+++ b/modules/overloading/macros/%r_m_s.sci
@@ -0,0 +1,57 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function f1=%r_m_s(f1,n2)
+ // %r_m_s(f1,n2)
+ //f1 = f1*n2
+ //author Serge Steer INRIA
+ //!
+
+ [n1,d1]=f1(["num","den"]),
+ sz1=size(n1);sz2=size(n2);
+ if prod(sz1)==0|prod(sz2)==0 then return,end
+
+
+ indef=%f
+ if or(sz1==-1) then
+ n1=n1+0;d1=d1+0;sz1=[1 1];
+ if prod(sz2)==1 then indef=%t,else error(14),end
+ end
+ if or(sz2==-1) then
+ n2=n2+0;sz2=[1 1];
+ if prod(sz1)==1 then indef=%t,else error(14),end
+ end
+ //
+ if prod(sz1)==1 then
+ num=n1*n2,
+ den=d1(ones(n2))
+ elseif prod(sz2)==1 then
+ num=n1*n2,
+ den=d1
+ else,
+ if size(sz1,"*")>2|size(sz2,"*")>2 then error(10),end
+ if sz1(2)<>sz2(1) then error(10),end,
+ l1=sz1(1);l2=sz2(1);m2=sz2(2)
+ for i=1:l1,
+ n=n1(i,:);
+ [y,fact]=lcm(d1(i,:)),
+ den(i,1:m2)=ones(1,m2)*y,
+ for j=1:m2,
+ num(i,j)=n*(n2(:,j).*matrix(fact,l2,1)),
+ end,
+ end,
+ [num,den]=simp(num,den),
+ end,
+
+ if indef then
+ num=num*eye()
+ den=den*eye()
+ end
+ f1=rlist(num,den,f1.dt)
+endfunction
diff --git a/modules/overloading/macros/%r_matrix.bin b/modules/overloading/macros/%r_matrix.bin
new file mode 100755
index 000000000..406e1e1f2
--- /dev/null
+++ b/modules/overloading/macros/%r_matrix.bin
Binary files differ
diff --git a/modules/overloading/macros/%r_matrix.sci b/modules/overloading/macros/%r_matrix.sci
new file mode 100755
index 000000000..c0136425c
--- /dev/null
+++ b/modules/overloading/macros/%r_matrix.sci
@@ -0,0 +1,12 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+function r=%r_matrix(r,varargin)
+ r.num=matrix(r.num,varargin(:))
+ r.den=matrix(r.den,varargin(:))
+endfunction
diff --git a/modules/overloading/macros/%r_n_lss.bin b/modules/overloading/macros/%r_n_lss.bin
new file mode 100755
index 000000000..1864e356d
--- /dev/null
+++ b/modules/overloading/macros/%r_n_lss.bin
Binary files differ
diff --git a/modules/overloading/macros/%r_n_lss.sci b/modules/overloading/macros/%r_n_lss.sci
new file mode 100755
index 000000000..3873681ee
--- /dev/null
+++ b/modules/overloading/macros/%r_n_lss.sci
@@ -0,0 +1,15 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function r=%r_n_lss(s1,s2)
+ //%r_n_lss(s1,s2) <=> s1<>s2
+ //!
+
+ r=%t
+endfunction
diff --git a/modules/overloading/macros/%r_n_p.bin b/modules/overloading/macros/%r_n_p.bin
new file mode 100755
index 000000000..8e56a90b4
--- /dev/null
+++ b/modules/overloading/macros/%r_n_p.bin
Binary files differ
diff --git a/modules/overloading/macros/%r_n_p.sci b/modules/overloading/macros/%r_n_p.sci
new file mode 100755
index 000000000..b7bce75f2
--- /dev/null
+++ b/modules/overloading/macros/%r_n_p.sci
@@ -0,0 +1,16 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function [r]=%r_n_p(l1,l2)
+ // l1<>l2
+
+ r=degree(l1("den"))==0
+ if r then r=l1("num")./coeff(l1("den"))==l2,end
+ r=~r
+endfunction
diff --git a/modules/overloading/macros/%r_n_r.bin b/modules/overloading/macros/%r_n_r.bin
new file mode 100755
index 000000000..ab37670c5
--- /dev/null
+++ b/modules/overloading/macros/%r_n_r.bin
Binary files differ
diff --git a/modules/overloading/macros/%r_n_r.sci b/modules/overloading/macros/%r_n_r.sci
new file mode 100755
index 000000000..8bfc8a32a
--- /dev/null
+++ b/modules/overloading/macros/%r_n_r.sci
@@ -0,0 +1,18 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function r=%r_n_r(l1,l2)
+ //%r_n_r(l1,l2) <=> l1<>l2 for rational matrices
+ //!
+
+ r=l1("dt")<>l2("dt")
+ if ~r then
+ r=l1("num")<>l2("num")|(l1("den")<>l2("den")&l1("num")<>0)
+ end
+endfunction
diff --git a/modules/overloading/macros/%r_n_s.bin b/modules/overloading/macros/%r_n_s.bin
new file mode 100755
index 000000000..baf028a17
--- /dev/null
+++ b/modules/overloading/macros/%r_n_s.bin
Binary files differ
diff --git a/modules/overloading/macros/%r_n_s.sci b/modules/overloading/macros/%r_n_s.sci
new file mode 100755
index 000000000..2e10437e3
--- /dev/null
+++ b/modules/overloading/macros/%r_n_s.sci
@@ -0,0 +1,16 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function [r]=%r_n_s(l1,l2)
+ // l1<>l2 rational<>constant
+
+ r=degree(l1("num"))==0&degree(l1("den"))==0
+ if r then r=coeff(l1("num"))./coeff(l1("den"))==l2,end
+ r=~r
+endfunction
diff --git a/modules/overloading/macros/%r_norm.bin b/modules/overloading/macros/%r_norm.bin
new file mode 100755
index 000000000..00aeecbe2
--- /dev/null
+++ b/modules/overloading/macros/%r_norm.bin
Binary files differ
diff --git a/modules/overloading/macros/%r_norm.sci b/modules/overloading/macros/%r_norm.sci
new file mode 100755
index 000000000..51219e4c3
--- /dev/null
+++ b/modules/overloading/macros/%r_norm.sci
@@ -0,0 +1,19 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function y=%r_norm(A,flag)
+ if argn(2)==1 then flag=2,end
+ if flag==2 then
+ y=h2norm(A)
+ elseif flag==%inf|flag=="inf" then
+ y=h_norm(A)
+ else
+ error(msprintf(_("%s: Wrong value for input argument #%d: %d or %s expected.\n"),"%r_norm",2,2,"inf"));
+ end
+endfunction
diff --git a/modules/overloading/macros/%r_o_lss.bin b/modules/overloading/macros/%r_o_lss.bin
new file mode 100755
index 000000000..78daa7224
--- /dev/null
+++ b/modules/overloading/macros/%r_o_lss.bin
Binary files differ
diff --git a/modules/overloading/macros/%r_o_lss.sci b/modules/overloading/macros/%r_o_lss.sci
new file mode 100755
index 000000000..300ed268a
--- /dev/null
+++ b/modules/overloading/macros/%r_o_lss.sci
@@ -0,0 +1,15 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function r=%r_o_lss(s1,s2)
+ //%r_o_lss(s1,s2) <=> s1==s2 , s1 rational, s2 state-space
+ //!
+
+ r=%f
+endfunction
diff --git a/modules/overloading/macros/%r_o_p.bin b/modules/overloading/macros/%r_o_p.bin
new file mode 100755
index 000000000..55c59746f
--- /dev/null
+++ b/modules/overloading/macros/%r_o_p.bin
Binary files differ
diff --git a/modules/overloading/macros/%r_o_p.sci b/modules/overloading/macros/%r_o_p.sci
new file mode 100755
index 000000000..f8bff4d16
--- /dev/null
+++ b/modules/overloading/macros/%r_o_p.sci
@@ -0,0 +1,16 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function r=%r_o_p(l1,l2)
+ // l1==l2 with l1 rational and l2 polynomial
+ //!
+
+ r=degree(l1("den"))==0
+ if r then r=l1("num")./coeff(l1("den"))==l2,end
+endfunction
diff --git a/modules/overloading/macros/%r_o_r.bin b/modules/overloading/macros/%r_o_r.bin
new file mode 100755
index 000000000..667ea910f
--- /dev/null
+++ b/modules/overloading/macros/%r_o_r.bin
Binary files differ
diff --git a/modules/overloading/macros/%r_o_r.sci b/modules/overloading/macros/%r_o_r.sci
new file mode 100755
index 000000000..17295667e
--- /dev/null
+++ b/modules/overloading/macros/%r_o_r.sci
@@ -0,0 +1,21 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function r=%r_o_r(l1,l2)
+ // l1==l2 with l1 and l2 rationals
+ //!
+ //r=l1('dt')==l2('dt')&l1('num')==l2('num')&(l1('den')==l2('den')|l1('num')==0)
+ r = and((l1.num == l2.num))&and((l1.den==l2.den))&(l1.dt==l2.dt);
+
+// if varn([l1("num"),l1("den")])~=varn([l2("num"),l2("den")]) then
+// r=%f;
+// else
+// r=(l1("dt")==l2("dt"))&(numer(l1-l2)==0)
+// end
+endfunction
diff --git a/modules/overloading/macros/%r_o_s.bin b/modules/overloading/macros/%r_o_s.bin
new file mode 100755
index 000000000..1292d9676
--- /dev/null
+++ b/modules/overloading/macros/%r_o_s.bin
Binary files differ
diff --git a/modules/overloading/macros/%r_o_s.sci b/modules/overloading/macros/%r_o_s.sci
new file mode 100755
index 000000000..9c101a6f7
--- /dev/null
+++ b/modules/overloading/macros/%r_o_s.sci
@@ -0,0 +1,16 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function r=%r_o_s(l1,l2)
+ // l1==l2 with l1 rational and l2 constant
+ //!
+
+ r=degree(l1("num"))==0&degree(l1("den"))==0
+ if r then r=coeff(l1("num"))./coeff(l1("den"))==l2,end
+endfunction
diff --git a/modules/overloading/macros/%r_ones.bin b/modules/overloading/macros/%r_ones.bin
new file mode 100755
index 000000000..5249de17a
--- /dev/null
+++ b/modules/overloading/macros/%r_ones.bin
Binary files differ
diff --git a/modules/overloading/macros/%r_ones.sci b/modules/overloading/macros/%r_ones.sci
new file mode 100755
index 000000000..91b01dd6a
--- /dev/null
+++ b/modules/overloading/macros/%r_ones.sci
@@ -0,0 +1,13 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function x=%r_ones(a)
+
+ x=ones(a("num"))
+endfunction
diff --git a/modules/overloading/macros/%r_p.bin b/modules/overloading/macros/%r_p.bin
new file mode 100755
index 000000000..d3a895de5
--- /dev/null
+++ b/modules/overloading/macros/%r_p.bin
Binary files differ
diff --git a/modules/overloading/macros/%r_p.sci b/modules/overloading/macros/%r_p.sci
new file mode 100755
index 000000000..ac11d142d
--- /dev/null
+++ b/modules/overloading/macros/%r_p.sci
@@ -0,0 +1,202 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+// Copyright (C) DIGITEO - 2012 - Allan CORNET
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function %r_p(h)
+
+ if exists("with_texmacs")==1 & typeof(with_texmacs)=="function" then
+ texout(h);
+ else
+ //used to display rational fraction with complex coefficients
+ //The real case is hard coded
+ if size(size(h),"*")>2 then
+ //hypermatrix case
+ %hmr_p(h)
+ return
+ end
+
+ [m, n]=size(h);
+ if (m == 0) | (n == 0) then
+ return
+ end
+ del="!"
+ blank=" "
+ if m*n==1 then del=" ",end
+ height=zeros(m,1) // to store "height" of each row do be displayed
+ width=zeros(1,n) // to store "width" of each column do be displayed
+ T=list() // to store display of each entry of the rational
+ for k=1:n
+ for l=1:m
+ tlk=r2str(h(l,k))
+ height(l)=max(size(tlk,1),height(l))
+ width(k)=max(max(length(tlk)),width(k))
+ T($+1)=tlk
+ end
+ end
+ ll=lines()
+ k0=0
+
+ //manage column display
+ while %t
+ // find how many columns can be displayed simultaneously
+ last=find(cumsum(width+2)<ll(1)-3);last=last($);
+ if last==[] then last=1,end
+ // form display of these columns
+ txt=[]
+ for l=1:m
+ txtr=emptystr(height(l),1)
+ for k=1:last
+ txtr=txtr+part(blank(ones(height(l),1)),1:2)
+ tlk=T(l+(k0+k-1)*m)
+ txtr=txtr+[part(tlk,1:width(k));emptystr(height(l)-size(tlk,1),1)]
+ end
+ txt=[txt;txtr]
+ end
+ // add matrix delimiter and columns title and display
+ nt=size(txt,1)
+ txt=part(txt,1:max(length(txt)))
+ if k0==0&last==n then
+ write(%io(2),del(ones(nt,1))+txt+blank(ones(nt,1))+del(ones(nt,1)))
+ else
+ if last==1 then
+ leg="column "+string(k0+1)
+ else
+ leg="column "+string(k0+1)+" to "+string(k0+last)
+ end
+ write(%io(2),[" ";
+ leg;
+ " ";
+ del(ones(nt,1))+txt+blank(ones(nt,1))+del(ones(nt,1))])
+ end
+ width(1:last)=[]
+ k0=last
+ if width==[] then break,end
+ end
+
+ end
+
+endfunction
+
+function txt=p2str(p)
+ //form display of a single polynomial with complex coefficients
+ lparen="("
+ rparen=")"
+ blank=" "
+ if type(p)==1 then p=poly(p,"s","c"),end
+ d=degree(p)
+ v=stripblanks(varn(p))
+
+ c=strsubst(string(coeff(p)),"%i","i")
+ // find coefficients with displays as "0" (deleted later)
+ kz=find(c=="0")
+ // find coefficients with displays as "1"
+ k1=find(c=="1");if k1(1)==1 then k1(1)=[],end
+ if k1<>[] then c(k1)=emptystr(1,size(k1,"*")),end
+ // find coefficients with real AND imaginary part (to be parenthezied)
+ kc=find(imag(coeff(p))<>0&real(coeff(p))<>0)
+ w=ones(1,size(kc,"*"))
+ if kc<>[] then c(kc)=lparen(w)+c(kc)+rparen(w),end
+ // add formal variable name
+ c=c+[emptystr(),v(ones(1:d))]
+
+ // form exponents
+ expo1=[" "," ",string(2:d)]
+
+ //delete coeffiecients and exponents corresponding to "0"s
+ c(kz)=[]
+ expo1(kz)=[]
+ if c==[] then
+ c="0"
+ expo1=emptystr()
+ end
+
+ // change coefficients sign display and adjust length of exponents
+ le=0
+ expo=emptystr(c)
+ for kc=1:size(c,"*")
+ if kc>1 then
+ if part(c(kc),1)<>"-" then
+ c(kc)=" + "+c(kc),
+ else
+ c(kc)=" - "+part(c(kc),2:length(c(kc)))
+ end
+ end
+ expo(kc)=part(blank,ones(1,length(c(kc))-le))
+ le=length(expo1(kc))
+ end
+ expo=expo+expo1(1:size(c,"*"))
+
+ //Handle long lines
+ ll=lines()
+ nn=size(expo,"*")
+ txt=[]
+ count=0
+ while %t
+ L=cumsum(length(expo))
+ last=find(L<ll(1)-3);last=last($)
+ txt=[txt;
+ part(blank,ones(1,count))+strcat(expo(1:last));
+ strcat(c(1:last))]
+ expo(1:last)=[]
+ c(1:last)=[]
+ if c==[] then break,end
+ count=count+1
+ end
+
+endfunction
+function txt=r2str(h)
+ //form display of a single rational with complex coefficients
+ dash="-"
+ blank=" "
+
+ t1=p2str(h("num")) //display of numerator
+ t2=p2str(h("den")) //display of denominator
+
+ //add fraction bar and center
+ l1=max(length(t1))
+ l2=max(length(t2))
+ if l1>l2 then
+ ll1=int((l1-l2)/2)
+ ll2=l1-l2-ll1
+ b=blank(ones(size(t2,"*"),1))
+ txt=[t1;
+ part(dash,ones(1,l1));
+ part(b,ones(1,ll1))+t2+part(b,ones(1,ll2))]
+ elseif l1<l2 then
+ ll1=int((l2-l1)/2)
+ ll2=l2-l1-ll1
+ b=blank(ones(size(t1,"*"),1))
+ txt=[part(b,ones(1,ll1))+t1+part(b,ones(1,ll2));
+ part(dash,ones(1,l2));
+ t2]
+ else
+ txt=[t1;part(dash,ones(1,l1));t2]
+ end
+endfunction
+
+function %hmr_p(h)
+ // hypermatrix display
+ dims=size(h)
+ num=h.num
+ den=h.den
+ nd=size(dims,"*")
+ I=(1:dims(3));
+ for k=4:nd
+ I=[ones(1,dims(k)).*.I;
+ (1:dims(k)).*.ones(1,size(I,2))];
+ end
+ k=1;sz=dims(1)*dims(2)
+ for II=I
+ tit="(:,:,"+strcat(string(II'),",")+")"
+ write(%io(2),tit)
+ hb=rlist(matrix(num.entries(k:k-1+sz),dims(1),dims(2)),matrix(den.entries(k:k-1+sz),dims(1),dims(2)),h.dt)
+ disp(hb)
+ k=k+sz
+ end
+endfunction
diff --git a/modules/overloading/macros/%r_p_s.bin b/modules/overloading/macros/%r_p_s.bin
new file mode 100755
index 000000000..0f237ee8a
--- /dev/null
+++ b/modules/overloading/macros/%r_p_s.bin
Binary files differ
diff --git a/modules/overloading/macros/%r_p_s.sci b/modules/overloading/macros/%r_p_s.sci
new file mode 100755
index 000000000..52b986f95
--- /dev/null
+++ b/modules/overloading/macros/%r_p_s.sci
@@ -0,0 +1,60 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function f=%r_p_s(f,s)
+ // %r_p_s(p,n) computes f^s for f a rational matrix s scalar or vector
+ //!
+
+ if s==[] then f=[],return,end
+ if or(imag(s)<>0)|or(int(s)<>s) then error(30),end
+
+ [m,n]=size(f("num"))
+ [ms,ns]=size(s)
+ if ms==1&ns==1 then
+ if m==1|n==1 then //Element wise exponentiation f.^s with f vector
+ if m>1|n>1&warning("query")=="on" then
+ //obsolescence warning
+ mprintf(_(" Warning: Syntax ""vector ^ scalar"" is obsolete it will be removed in scilab-6.\n Use ""vector .^ scalar"" instead.\n"));
+ end
+ if s<0 then
+ num=f("num")
+ if or(abs(coeff(num(:)))*ones(max(degree(num))+1,1)==0) then
+ error(27)
+ end
+ s=-s
+ f=rlist(f("den").^s,num.^s,f("dt"))
+ else
+ f=rlist(f("num").^s,f("den").^s,f("dt"))
+ end
+ elseif m==n then //square matrix exponentiation f^s
+ if s==0 then f=eye(m,n),return,end
+ if s<0 then f=invr(f),s=-s,end
+ f1=f;for k=2:s,f=f*f1;end
+ else
+ error(20,1)
+ end
+ elseif ms==1|ns==1 then // Element wise exponentiation f.^s with f "scalar"
+ if m<>1|n<>1 then error(43),end
+ kp=find(s>=0)
+ kn=find(s<0)
+ num=ones(s)
+ den=ones(s)
+ num(kp)=f("num").^s(kp)
+ den(kp)=f("den").^s(kp)
+ if abs(coeff(f("num")))*ones(degree(f("num"))+1,1)==0 then
+ error(27)
+ end
+ num(kn)=f("den").^(-s(kn))
+ den(kn)=f("num").^(-s(kn))
+ f=rlist(num,den,[])
+ else
+ error(30)
+ end
+
+endfunction
diff --git a/modules/overloading/macros/%r_prod.bin b/modules/overloading/macros/%r_prod.bin
new file mode 100755
index 000000000..4c39960c3
--- /dev/null
+++ b/modules/overloading/macros/%r_prod.bin
Binary files differ
diff --git a/modules/overloading/macros/%r_prod.sci b/modules/overloading/macros/%r_prod.sci
new file mode 100755
index 000000000..95204fd1e
--- /dev/null
+++ b/modules/overloading/macros/%r_prod.sci
@@ -0,0 +1,65 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2010 - INRIA - Serge Steer
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function a = %r_prod(varargin)
+ //prod of a rational matrix
+ // If we call prod with 3 argumetns, the thrid argumetn is optional for rational matrices.
+ a = varargin(1)
+ dims = size(a);
+
+ nargs = size(varargin);
+ select nargs
+ case 1
+ d = "*";
+ case 2
+ if or(varargin(2) == ["native", "double"]) then
+ d = "*";
+ else
+ d = varargin(2);
+ end
+ case 3
+ d = varargin(2);
+ else
+ error(msprintf(_("%s: Wrong number of input argument(s): %d to %d expected.\n"),"prod", 1, 3));
+ end
+
+ // Check second argument : d
+ select type(d)
+ case 1
+ if size(d,'*') <> 1 then
+ error(msprintf(_("%s: Wrong size for input argument #%d: A scalar expected.\n"),"prod", 2))
+ end
+ if int(d) <> d | d < 0 then
+ error(msprintf(_("%s: Wrong value for input argument #%d: Integer >= %d expected.\n"),"prod", 2, 1))
+ end
+ case 10
+ if size(d,'*') <> 1 then
+ error(msprintf(_("%s: Wrong size for input argument #%d: A string expected.\n"),"prod",2))
+ end
+ if and(d<>["r","c","*","m"]) then
+ error(msprintf(_("%s: Wrong value for input argument #%d: Must be in the set {%s}.\n"),..
+ "prod",2,"""*"",""r"",""c"",""m"""))
+ end
+
+ pos = [1,2,0,find(dims>1,1)];
+ d=pos(find(d==["r","c","*","m"]))
+ else
+ error(msprintf(_("%s: Wrong type for input argument #%d: A string or scalar expected.\n"),"prod",2))
+ end
+
+ if d==0 then //'*'
+ a=rlist(prod(a.num),prod(a.den),a.dt)
+ if simp_mode() then a=simp(a),end
+ elseif or(d==[1 2]) then
+ a=rlist(prod(a.num,d),prod(a.den,d),a.dt)
+ if simp_mode() then a=simp(a),end
+ else
+ a=a
+ end
+endfunction
diff --git a/modules/overloading/macros/%r_q_p.bin b/modules/overloading/macros/%r_q_p.bin
new file mode 100755
index 000000000..2d0d2b7e5
--- /dev/null
+++ b/modules/overloading/macros/%r_q_p.bin
Binary files differ
diff --git a/modules/overloading/macros/%r_q_p.sci b/modules/overloading/macros/%r_q_p.sci
new file mode 100755
index 000000000..e940a2279
--- /dev/null
+++ b/modules/overloading/macros/%r_q_p.sci
@@ -0,0 +1,15 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function f1=%r_q_p(f1,f2)
+ // r.\p
+ //!
+
+ f1=rlist(f1("den").*f2,f1("num").*ones(f2),f1("dt"))
+endfunction
diff --git a/modules/overloading/macros/%r_q_r.bin b/modules/overloading/macros/%r_q_r.bin
new file mode 100755
index 000000000..2dd2360db
--- /dev/null
+++ b/modules/overloading/macros/%r_q_r.bin
Binary files differ
diff --git a/modules/overloading/macros/%r_q_r.sci b/modules/overloading/macros/%r_q_r.sci
new file mode 100755
index 000000000..cf964e1fc
--- /dev/null
+++ b/modules/overloading/macros/%r_q_r.sci
@@ -0,0 +1,28 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function s1=%r_q_r(s1,s2)
+ // %r_q_r(s1,s2) <=> s1= s1.\s2 for rationals
+ //author Serge Steer, INRIA
+ //!
+ if ndims(s1)<=2& ndims(s2)<=2 then
+ [s1,s2]=sysconv(s1,s2)
+ [num,den]=simp(s1.den.*s2.num,s1.num.*s2.den)
+ s1=rlist(num,den,s1.dt)
+ else
+ if size(s1,"*")==1 then
+ sz=size(s2)
+ else
+ sz=size(s1)
+ end
+ [num,den]=simp(s1.den(:).*s2.num(:),s1.num(:).*s2.den(:))
+ s1=rlist(matrix(num,sz),matrix(den,sz),s1.dt)
+ end
+
+endfunction
diff --git a/modules/overloading/macros/%r_q_s.bin b/modules/overloading/macros/%r_q_s.bin
new file mode 100755
index 000000000..3cb11d1a8
--- /dev/null
+++ b/modules/overloading/macros/%r_q_s.bin
Binary files differ
diff --git a/modules/overloading/macros/%r_q_s.sci b/modules/overloading/macros/%r_q_s.sci
new file mode 100755
index 000000000..ca3e910bd
--- /dev/null
+++ b/modules/overloading/macros/%r_q_s.sci
@@ -0,0 +1,16 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function f=%r_q_s(f1,n2)
+ // r.\m
+ //!
+
+ if size(n2,"*")==0 then f=[],return,end
+ f=rlist(f1("den").*n2,f1("num").*ones(n2),f1("dt"))
+endfunction
diff --git a/modules/overloading/macros/%r_r_lss.bin b/modules/overloading/macros/%r_r_lss.bin
new file mode 100755
index 000000000..5191fa52c
--- /dev/null
+++ b/modules/overloading/macros/%r_r_lss.bin
Binary files differ
diff --git a/modules/overloading/macros/%r_r_lss.sci b/modules/overloading/macros/%r_r_lss.sci
new file mode 100755
index 000000000..3e0cd0a3e
--- /dev/null
+++ b/modules/overloading/macros/%r_r_lss.sci
@@ -0,0 +1,15 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function s=%r_r_lss(s1,s2)
+ //!
+
+ [s1,s2]=sysconv(s1,s2)
+ s=s1/s2
+endfunction
diff --git a/modules/overloading/macros/%r_r_p.bin b/modules/overloading/macros/%r_r_p.bin
new file mode 100755
index 000000000..a8145c604
--- /dev/null
+++ b/modules/overloading/macros/%r_r_p.bin
Binary files differ
diff --git a/modules/overloading/macros/%r_r_p.sci b/modules/overloading/macros/%r_r_p.sci
new file mode 100755
index 000000000..7c9ea16ac
--- /dev/null
+++ b/modules/overloading/macros/%r_r_p.sci
@@ -0,0 +1,17 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function f=%r_r_p(f1,p2)
+ //
+ //!
+
+ if prod(size(p2)) <>1 then f=f1*invr(p2),return,end
+ [n1,p2]=simp(f1("num"),p2*f1("den"))
+ f=rlist(n1,p2,f1("dt"))
+endfunction
diff --git a/modules/overloading/macros/%r_r_r.bin b/modules/overloading/macros/%r_r_r.bin
new file mode 100755
index 000000000..e639616fa
--- /dev/null
+++ b/modules/overloading/macros/%r_r_r.bin
Binary files differ
diff --git a/modules/overloading/macros/%r_r_r.sci b/modules/overloading/macros/%r_r_r.sci
new file mode 100755
index 000000000..3a4b0947e
--- /dev/null
+++ b/modules/overloading/macros/%r_r_r.sci
@@ -0,0 +1,29 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function s1=%r_r_r(s1,s2)
+ // %r_r_r(s1,s2) <=> s1/s2 for rationals
+ //!
+
+ [s1,s2]=sysconv(s1,s2),
+ [n,m]=size(s2("num"))
+ if n<>m then error(43),end
+ if n*m==1 then
+ s1=%r_m_r(s1,rlist(s2("den"),s2("num"),s2("dt")) ),
+ else
+ p=s2("num")
+ s2=s2("den")
+ for k=1:n
+ pp=lcm(s2(:,k))
+ for l=1:n;p(l,k)=p(l,k)*pdiv(pp,s2(l,k)),end
+ s1(:,k)=s1(:,k)*pp
+ end
+ s1=s1*invr(p)
+ end
+endfunction
diff --git a/modules/overloading/macros/%r_r_s.bin b/modules/overloading/macros/%r_r_s.bin
new file mode 100755
index 000000000..19857e572
--- /dev/null
+++ b/modules/overloading/macros/%r_r_s.bin
Binary files differ
diff --git a/modules/overloading/macros/%r_r_s.sci b/modules/overloading/macros/%r_r_s.sci
new file mode 100755
index 000000000..cb6e798b7
--- /dev/null
+++ b/modules/overloading/macros/%r_r_s.sci
@@ -0,0 +1,39 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function a=%r_r_s(a,b)
+ // a/b a rational matrix, b scalar matrix
+ //author Serge Steer
+ //!
+ if size(b,"*")==0 then a=[],return,end
+ [mb,nb]=size(b);
+ if mb*nb==1 then
+ a.num=a.num/b,
+ if or(size(a)==-1)|mb==-1 then
+ a.den=a.den*eye(),
+ end
+ return,
+ end
+ [ma,na]=size(a.num)
+ ma=abs(ma);na=abs(na) //handling eye()
+ mb=abs(mb);nb=abs(nb) //handling eye()
+ if na==1 then
+ a=rlist(a.num/b,ones(nb,mb)*a.den,a.dt)
+ else
+ [num,den]=a(["num","den"]);
+ dd=[];nn=[]
+ for i=1:ma,
+ [y,fact]=lcm(den(i,:)),
+ nn=[nn;(num(i,:).*fact)/b];
+ dd=[dd;y]
+ end
+ [num,den]=simp(nn,dd*ones(1,mb))
+ a=rlist(num,den,a.dt)
+ end
+endfunction
diff --git a/modules/overloading/macros/%r_rand.bin b/modules/overloading/macros/%r_rand.bin
new file mode 100755
index 000000000..5f964f9b5
--- /dev/null
+++ b/modules/overloading/macros/%r_rand.bin
Binary files differ
diff --git a/modules/overloading/macros/%r_rand.sci b/modules/overloading/macros/%r_rand.sci
new file mode 100755
index 000000000..91f5950a9
--- /dev/null
+++ b/modules/overloading/macros/%r_rand.sci
@@ -0,0 +1,13 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function x=%r_rand(a)
+
+ x=rand(a("num"));
+endfunction
diff --git a/modules/overloading/macros/%r_s.bin b/modules/overloading/macros/%r_s.bin
new file mode 100755
index 000000000..57b31d639
--- /dev/null
+++ b/modules/overloading/macros/%r_s.bin
Binary files differ
diff --git a/modules/overloading/macros/%r_s.sci b/modules/overloading/macros/%r_s.sci
new file mode 100755
index 000000000..1ef9ef29f
--- /dev/null
+++ b/modules/overloading/macros/%r_s.sci
@@ -0,0 +1,15 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function f=%r_s(f)
+ // %r_s(f) -f, f rational
+ //!
+
+ f(2)=-f(2)
+endfunction
diff --git a/modules/overloading/macros/%r_s_hm.bin b/modules/overloading/macros/%r_s_hm.bin
new file mode 100755
index 000000000..d7a43860f
--- /dev/null
+++ b/modules/overloading/macros/%r_s_hm.bin
Binary files differ
diff --git a/modules/overloading/macros/%r_s_hm.sci b/modules/overloading/macros/%r_s_hm.sci
new file mode 100755
index 000000000..d623e9318
--- /dev/null
+++ b/modules/overloading/macros/%r_s_hm.sci
@@ -0,0 +1,31 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function f=%r_s_hm(f,m)
+ //f = f-m,
+ //f: transfer matrix, m : hypermatrix
+ //author Serge Steer INRIA
+ //!
+ [num,den]=f(["num","den"])
+ szf=size(den)
+ szm=size(m)
+
+ if and(szf>=0)&and(szm>=0) then
+ num=num(:);den=den(:);m=m(:)
+ if prod(szf)==1&prod(szm)>1 then
+ den=den(ones(m))
+ end
+ [num,den]=simp(num-m.*den,den)
+ num=matrix(num,szf)
+ den=matrix(den,szf)
+ f=rlist(num,den,f.dt)
+ else
+ error(9)
+ end
+endfunction
diff --git a/modules/overloading/macros/%r_s_lss.bin b/modules/overloading/macros/%r_s_lss.bin
new file mode 100755
index 000000000..bd4afd369
--- /dev/null
+++ b/modules/overloading/macros/%r_s_lss.bin
Binary files differ
diff --git a/modules/overloading/macros/%r_s_lss.sci b/modules/overloading/macros/%r_s_lss.sci
new file mode 100755
index 000000000..0d8b646ee
--- /dev/null
+++ b/modules/overloading/macros/%r_s_lss.sci
@@ -0,0 +1,18 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function [s]=%r_s_lss(s1,s2)
+ //s=%r_s_lss(s1,s2) ou s=s1-s2
+ // s1 : transfer
+ // s2 : state-space
+ //!
+
+ [s1,s2]=sysconv(s1,s2)
+ s=s1-s2
+endfunction
diff --git a/modules/overloading/macros/%r_s_p.bin b/modules/overloading/macros/%r_s_p.bin
new file mode 100755
index 000000000..d029e676a
--- /dev/null
+++ b/modules/overloading/macros/%r_s_p.bin
Binary files differ
diff --git a/modules/overloading/macros/%r_s_p.sci b/modules/overloading/macros/%r_s_p.sci
new file mode 100755
index 000000000..231750a20
--- /dev/null
+++ b/modules/overloading/macros/%r_s_p.sci
@@ -0,0 +1,45 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function f=%r_s_p(f,m)
+ //f = f-m,
+ //f: transfer matrix, m : scalar or scalar matrix
+ //author Serge Steer INRIA
+ //!
+ [num,den]=f(["num","den"])
+ szf=size(den)
+ szm=size(m)
+
+ if and(szf>=0)&and(szm>=0) then
+ if prod(szf)==1&prod(szm)>1 then
+ den=den(ones(m))
+ szf=szm
+ end
+
+ if size(szf,"*")>2 then
+ num=num(:);den=den(:);m=m(:)
+ end
+ [num,den]=simp(num-m.*den,den)
+ num=matrix(num,szf)
+ den=matrix(den,szf)
+ else
+ //at leat one matrix is eye*x
+ if size(szf,"*")>2|size(szm,"*")>2 then
+ error(9)
+ end
+ if or(szf<0)&or(szm<0) then
+ [num,den]=simp(num-m.*den,den)
+ elseif or(szf<0) then
+ [num,den]=simp(num-m.*den,den*ones(m))
+ elseif or(szm<0) then
+ [num,den]=simp(num-(m+0)*eye(den).*den,den)
+ end
+ end
+ f=rlist(num,den,f.dt)
+endfunction
diff --git a/modules/overloading/macros/%r_s_r.bin b/modules/overloading/macros/%r_s_r.bin
new file mode 100755
index 000000000..94126fde2
--- /dev/null
+++ b/modules/overloading/macros/%r_s_r.bin
Binary files differ
diff --git a/modules/overloading/macros/%r_s_r.sci b/modules/overloading/macros/%r_s_r.sci
new file mode 100755
index 000000000..3472ae6d2
--- /dev/null
+++ b/modules/overloading/macros/%r_s_r.sci
@@ -0,0 +1,68 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function f=%r_s_r(s1,s2)
+ //f=s1-s2 s1,s2 : rational matrices
+ //!
+ if ndims(s1)<2&ndims(s2)<2 then [s1,s2]=sysconv(s1,s2),end
+ [num1,den1]=s1(["num","den"]),
+ [num2,den2]=s2(["num","den"]),
+ sz1=size(num1)
+ sz2=size(num2)
+ if and(sz1>=0)&and(sz2>=0) then
+ num1=num1(:);den1=den1(:);
+ num2=num2(:);den2=den2(:);
+
+ if prod(sz1)==1&prod(sz2)>1 then
+ den1=den1(ones(den2))
+ num1=num1(ones(num2))
+ sz1=sz2
+ elseif prod(sz2)==1&prod(sz1)>1 then
+ den2=den2(ones(den1))
+ num2=num2(ones(num1))
+ sz2=sz1
+ end
+ if and(sz1<>sz2) then error(8),end
+ for l=1:prod(sz1)
+ [den,fact]=lcm([den1(l);den2(l)])
+ num1(l)=[num1(l),-num2(l)]*fact
+ den1(l)=den
+ end,
+ [num1,den1]=simp(num1,den1),
+ f=rlist(matrix(num1,sz1),matrix(den1,sz1),s1.dt)
+ else
+
+ if size(sz1,"*")>2|size(sz2,"*")>2 then error(8),end
+
+ if or(sz1<0)&or(sz2<0) then
+ // both are eye*x
+ [den1,fact]=lcm([den1;den2])
+ [num1,den1]=simp([num1,-num2]*fact,den1)
+ f=rlist(num1*eye(),den1*eye(),s1("dt")),
+ elseif or(sz1<0) then
+ den1=den1+0;num1=num1+0
+ for l=1:min(sz2)
+ [den,fact]=lcm([den1;den2(l,l)])
+ num2(l,l)=[num1,-num2(l,l)]*fact
+ den2(l,l)=den
+ end
+ [num2,den2]=simp(num2,den2),
+ f=rlist(num2,den2,s1.dt)
+ elseif or(sz2<0) then
+ den2=den2+0;num2=num2+0
+ for l=1:min(sz1)
+ [den,fact]=lcm([den1(l,l);den2])
+ num1(l,l)=[num1(l,l),-num2]*fact
+ den1(l,l)=den
+ end
+ [num1,den1]=simp(num1,den1),
+ f=rlist(num1,den1,s1.dt)
+ end
+ end
+endfunction
diff --git a/modules/overloading/macros/%r_s_s.bin b/modules/overloading/macros/%r_s_s.bin
new file mode 100755
index 000000000..96b50440e
--- /dev/null
+++ b/modules/overloading/macros/%r_s_s.bin
Binary files differ
diff --git a/modules/overloading/macros/%r_s_s.sci b/modules/overloading/macros/%r_s_s.sci
new file mode 100755
index 000000000..36adf6898
--- /dev/null
+++ b/modules/overloading/macros/%r_s_s.sci
@@ -0,0 +1,45 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function f=%r_s_s(f,m)
+ //f = f-m,
+ //f: transfer matrix, m : scalar or scalar matrix
+ //author Serge Steer INRIA
+ //!
+ [num,den]=f(["num","den"])
+ szf=size(den)
+ szm=size(m)
+
+ if and(szf>=0)&and(szm>=0) then
+ if prod(szf)==1&prod(szm)>1 then
+ den=den(ones(m))
+ szf=szm
+ end
+
+ if size(szf,"*")>2 then
+ num=num(:);den=den(:);m=m(:)
+ end
+ [num,den]=simp(num-m.*den,den)
+ num=matrix(num,szf)
+ den=matrix(den,szf)
+ else
+ //at leat one matrix is eye*x
+ if size(szf,"*")>2|size(szm,"*")>2 then
+ error(9)
+ end
+ if or(szf<0)&or(szm<0) then
+ [num,den]=simp(num-m.*den,den)
+ elseif or(szf<0) then
+ [num,den]=simp(num-m.*den,den*ones(m))
+ elseif or(szm<0) then
+ [num,den]=simp(num-(m+0)*eye(den).*den,den)
+ end
+ end
+ f=rlist(num,den,f.dt)
+endfunction
diff --git a/modules/overloading/macros/%r_simp.bin b/modules/overloading/macros/%r_simp.bin
new file mode 100755
index 000000000..3e2cacda7
--- /dev/null
+++ b/modules/overloading/macros/%r_simp.bin
Binary files differ
diff --git a/modules/overloading/macros/%r_simp.sci b/modules/overloading/macros/%r_simp.sci
new file mode 100755
index 000000000..ac6e7e6c9
--- /dev/null
+++ b/modules/overloading/macros/%r_simp.sci
@@ -0,0 +1,13 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function h=%r_simp(h)
+ // implement complex case
+
+endfunction
diff --git a/modules/overloading/macros/%r_size.bin b/modules/overloading/macros/%r_size.bin
new file mode 100755
index 000000000..52807d0e8
--- /dev/null
+++ b/modules/overloading/macros/%r_size.bin
Binary files differ
diff --git a/modules/overloading/macros/%r_size.sci b/modules/overloading/macros/%r_size.sci
new file mode 100755
index 000000000..33e1feb9c
--- /dev/null
+++ b/modules/overloading/macros/%r_size.sci
@@ -0,0 +1,30 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+// Copyright (C) DIGITEO - 2012 - Allan CORNET
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function [m, n, nx] = %r_size(x, flag)
+ // only to be called by size function for dynamical systems
+ //!
+ m = 0;
+ n = 0;
+ [lhs,rhs] = argn(0)
+ x1 = x(1);
+ if lhs == 1 then
+ if rhs == 1 then
+ execstr("m = size(x(''num''));","errcatch");
+ else
+ execstr("m = size(x(''num''), flag);","errcatch");
+ end
+ elseif lhs == 2 then
+ if rhs <> 1 then
+ error(41)
+ end
+ execstr("[m, n] = size(x(''num''));","errcatch");
+ end
+endfunction
diff --git a/modules/overloading/macros/%r_string.bin b/modules/overloading/macros/%r_string.bin
new file mode 100755
index 000000000..290c9650b
--- /dev/null
+++ b/modules/overloading/macros/%r_string.bin
Binary files differ
diff --git a/modules/overloading/macros/%r_string.sci b/modules/overloading/macros/%r_string.sci
new file mode 100755
index 000000000..8ed8abef1
--- /dev/null
+++ b/modules/overloading/macros/%r_string.sci
@@ -0,0 +1,30 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function txt=%r_string(r)
+ N=string(r.num)
+ D=string(r.den)
+ ln=max(matrix(length(N),2,-1),"r")
+ ld=max(matrix(length(D),2,-1),"r")
+ l=max(ln,ld)
+ [m,n]=size(r.num);
+ S=emptystr(m,n)
+ for i=1:m*n
+ s=2*i-1:2*i
+ N(s)=part(" ",1:(l(i)-ln(i))/2)+N(s)
+ D(s)=part(" ",1:(l(i)-ld(i))/2)+D(s)
+ S(i) =part("-",ones(1,l(i)))
+ end
+ txt=emptystr(5*m,n);
+ txt(1:5:$,:)=N(1:2:$,:)
+ txt(2:5:$,:)=N(2:2:$,:)
+ txt(3:5:$,:)=S(1:$,:)
+ txt(4:5:$,:)=D(1:2:$,:)
+ txt(5:5:$,:)=D(2:2:$,:)
+endfunction
diff --git a/modules/overloading/macros/%r_sum.bin b/modules/overloading/macros/%r_sum.bin
new file mode 100755
index 000000000..bf16b7053
--- /dev/null
+++ b/modules/overloading/macros/%r_sum.bin
Binary files differ
diff --git a/modules/overloading/macros/%r_sum.sci b/modules/overloading/macros/%r_sum.sci
new file mode 100755
index 000000000..c8d682144
--- /dev/null
+++ b/modules/overloading/macros/%r_sum.sci
@@ -0,0 +1,67 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2010 - INRIA - Serge Steer
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function a=%r_sum(varargin)
+ //sum of a rational matrix. Sum of rational hypermatrices are
+ //handled by %hm_sum
+ // If we call sum with 3 arguments, the third is optional with rational matrices.
+ a = varargin(1)
+ dims = size(a);
+
+ nargs = size(varargin);
+ select nargs
+ case 1
+ d = "*";
+ case 2
+ if or(varargin(2) == ["native", "double"]) then
+ d = "*";
+ else
+ d = varargin(2);
+ end
+ case 3
+ d = varargin(2);
+ else
+ error(msprintf(_("%s: Wrong number of input argument(s): %d to %d expected.\n"),"sum", 1, 3));
+ end
+
+ // Check second argument : d
+ select type(d)
+ case 1
+ if size(d,'*') <> 1 then
+ error(msprintf(_("%s: Wrong size for input argument #%d: A scalar expected.\n"),"sum", 2))
+ end
+ if int(d) <> d | d < 0 then
+ error(msprintf(_("%s: Wrong value for input argument #%d: Integer >= %d expected.\n"),"sum", 2, 1))
+ end
+ case 10
+ if size(d,'*') <> 1 then
+ error(msprintf(_("%s: Wrong size for input argument #%d: A string expected.\n"),"sum",2))
+ end
+ if and(d<>["r","c","*","m"]) then
+ error(msprintf(_("%s: Wrong value for input argument #%d: Must be in the set {%s}.\n"),..
+ "sum",2,"""*"",""r"",""c"",""m"""))
+ end
+
+ pos = [1,2,0,find(dims>1,1)];
+ d=pos(find(d==["r","c","*","m"]))
+ else
+ error(msprintf(_("%s: Wrong type for input argument #%d: A string or scalar expected.\n"),"sum",2))
+ end
+
+ select d
+ case 0 then//'*'
+ a=ones(1,size(a,"*"))*matrix(a,-1,1)
+ case 1 then
+ a=ones(1,dims(1))*a;
+ case 2 then
+ a=a*ones(dims(2),1);
+ else
+ a=a
+ end
+endfunction
diff --git a/modules/overloading/macros/%r_t.bin b/modules/overloading/macros/%r_t.bin
new file mode 100755
index 000000000..1492dca34
--- /dev/null
+++ b/modules/overloading/macros/%r_t.bin
Binary files differ
diff --git a/modules/overloading/macros/%r_t.sci b/modules/overloading/macros/%r_t.sci
new file mode 100755
index 000000000..05db88f7a
--- /dev/null
+++ b/modules/overloading/macros/%r_t.sci
@@ -0,0 +1,15 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function f=%r_t(f1)
+ // f=f1'
+ //!
+
+ f=rlist(f1("num")',f1("den")',f1("dt"))
+endfunction
diff --git a/modules/overloading/macros/%r_tril.bin b/modules/overloading/macros/%r_tril.bin
new file mode 100755
index 000000000..f4b013dcb
--- /dev/null
+++ b/modules/overloading/macros/%r_tril.bin
Binary files differ
diff --git a/modules/overloading/macros/%r_tril.sci b/modules/overloading/macros/%r_tril.sci
new file mode 100755
index 000000000..bf3281140
--- /dev/null
+++ b/modules/overloading/macros/%r_tril.sci
@@ -0,0 +1,20 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 1995-2010 - INRIA - Serge Steer
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function d=%r_tril(a,k)
+ if argn(2)<2 then
+ k=0,
+ else
+ if type(k)<>1 then error(53,2);end
+ if size(k,"*")<>1 then error(89,2);end
+ if ~isreal(k) then error(52,2);end
+ end
+
+ d=rlist(tril(a.num,k),tril(a.den,k)+triu(ones(a.den),k+1),a.dt)
+endfunction
diff --git a/modules/overloading/macros/%r_triu.bin b/modules/overloading/macros/%r_triu.bin
new file mode 100755
index 000000000..33d8560c4
--- /dev/null
+++ b/modules/overloading/macros/%r_triu.bin
Binary files differ
diff --git a/modules/overloading/macros/%r_triu.sci b/modules/overloading/macros/%r_triu.sci
new file mode 100755
index 000000000..89d2d8b9e
--- /dev/null
+++ b/modules/overloading/macros/%r_triu.sci
@@ -0,0 +1,21 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 1995-2010 - INRIA - Serge Steer
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function d=%r_triu(a,k)
+ // r_triu - implement triu function for rationnal matrix ,..
+ if argn(2)<2 then
+ k=0,
+ else
+ if type(k)<>1 then error(53,2);end
+ if size(k,"*")<>1 then error(89,2);end
+ if ~isreal(k) then error(52,2);end
+ end
+
+ d=rlist(triu(a.num,k),triu(a.den,k)+tril(ones(a.den),k-1),a.dt)
+endfunction
diff --git a/modules/overloading/macros/%r_v_lss.bin b/modules/overloading/macros/%r_v_lss.bin
new file mode 100755
index 000000000..48ef74141
--- /dev/null
+++ b/modules/overloading/macros/%r_v_lss.bin
Binary files differ
diff --git a/modules/overloading/macros/%r_v_lss.sci b/modules/overloading/macros/%r_v_lss.sci
new file mode 100755
index 000000000..551900902
--- /dev/null
+++ b/modules/overloading/macros/%r_v_lss.sci
@@ -0,0 +1,14 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA - Serge Steer
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function s=%r_v_lss(s1,s2)
+ //s=%r_v_lss(s1,s2) <=> s= s1/.s2
+ //!
+ [s1,s2]=sysconv(s1,s2);s=s1/.s2;
+endfunction
diff --git a/modules/overloading/macros/%r_v_p.bin b/modules/overloading/macros/%r_v_p.bin
new file mode 100755
index 000000000..edc701c7b
--- /dev/null
+++ b/modules/overloading/macros/%r_v_p.bin
Binary files differ
diff --git a/modules/overloading/macros/%r_v_p.sci b/modules/overloading/macros/%r_v_p.sci
new file mode 100755
index 000000000..743c7094d
--- /dev/null
+++ b/modules/overloading/macros/%r_v_p.sci
@@ -0,0 +1,19 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function h=%r_v_p(h1,h2)
+ // %r_v_p(h1,h2) computes (I+h1*h2)\h1. h1: rational
+ // h2 polynomial
+ //!
+
+ [m1,n1]=size(h1("num"))
+ [m2,n2]=size(h2)
+ if abs(n1-m2)+abs(m1-n2)<>0 then error(msprintf(_("%s: Wrong size for input argument(s).\n"),"%r_v_p")),end
+ h=(eye(m1,m1)+h1*h2)\h1
+endfunction
diff --git a/modules/overloading/macros/%r_v_r.bin b/modules/overloading/macros/%r_v_r.bin
new file mode 100755
index 000000000..84c6b0399
--- /dev/null
+++ b/modules/overloading/macros/%r_v_r.bin
Binary files differ
diff --git a/modules/overloading/macros/%r_v_r.sci b/modules/overloading/macros/%r_v_r.sci
new file mode 100755
index 000000000..453ea920e
--- /dev/null
+++ b/modules/overloading/macros/%r_v_r.sci
@@ -0,0 +1,23 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function h=%r_v_r(h1,h2)
+ // %r_v_r(h1,h2)=(I+h1*h2)\h1. h1 and h2 rational matrices
+ //!
+
+ [h1,h2]=sysconv(h1,h2),
+ [m1,n1]=size(h1("num"))
+ [m2,n2]=size(h2("num"))
+ if abs(n1-m2)+abs(m1-n2)<>0 then error(msprintf(_("%s: Wrong size for input argument(s).\n"),"%r_v_r")),end
+ if m1*n1==1 then
+ h=rlist(h1("num")*h2("den"),h1("num")*h2("num")+h1("den")*h2("den"),h1("dt"))
+ else
+ h=(eye(m1,m1)+h1*h2)\h1
+ end
+endfunction
diff --git a/modules/overloading/macros/%r_v_s.bin b/modules/overloading/macros/%r_v_s.bin
new file mode 100755
index 000000000..6e162a98e
--- /dev/null
+++ b/modules/overloading/macros/%r_v_s.bin
Binary files differ
diff --git a/modules/overloading/macros/%r_v_s.sci b/modules/overloading/macros/%r_v_s.sci
new file mode 100755
index 000000000..e3a259944
--- /dev/null
+++ b/modules/overloading/macros/%r_v_s.sci
@@ -0,0 +1,23 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function h=%r_v_s(h1,h2)
+ // %r_v_s(h1,h2)=(I+h1*h2)\h1. h1: rational
+ // h2 constant
+ //!
+
+ [m1,n1]=size(h1("num"))
+ [m2,n2]=size(h2)
+ if abs(n1-m2)+abs(m1-n2)<>0 then error(msprintf(_("%s: Wrong size for input argument(s).\n"),"%r_v_s")),end
+ if m1*n1==1 then
+ h=h1;h("den")=h1("num")*h2+h1("den");
+ else
+ h=(eye(m1,m1)+h1*h2)\h1
+ end
+endfunction
diff --git a/modules/overloading/macros/%r_varn.bin b/modules/overloading/macros/%r_varn.bin
new file mode 100755
index 000000000..941a0f9ee
--- /dev/null
+++ b/modules/overloading/macros/%r_varn.bin
Binary files differ
diff --git a/modules/overloading/macros/%r_varn.sci b/modules/overloading/macros/%r_varn.sci
new file mode 100755
index 000000000..31fcaa630
--- /dev/null
+++ b/modules/overloading/macros/%r_varn.sci
@@ -0,0 +1,16 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) Samuel GOUGEON <sgougeon@free.fr>
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function rep = %r_varn(p, varname)
+ if argn(2)==1 then
+ rep = varn(p("num"));
+ else
+ rep = rlist(varn(p.num, varname), varn(p.den, varname), p.dt);
+ end
+endfunction
diff --git a/modules/overloading/macros/%r_x_p.bin b/modules/overloading/macros/%r_x_p.bin
new file mode 100755
index 000000000..d62a37648
--- /dev/null
+++ b/modules/overloading/macros/%r_x_p.bin
Binary files differ
diff --git a/modules/overloading/macros/%r_x_p.sci b/modules/overloading/macros/%r_x_p.sci
new file mode 100755
index 000000000..254d96cc6
--- /dev/null
+++ b/modules/overloading/macros/%r_x_p.sci
@@ -0,0 +1,24 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function f1=%r_x_p(f1,f2)
+ // %r_x_p(r,p)=r.*p
+ //author Serge Steer, INRIA
+ //!
+ f1.num=f1.num.*f2
+ sz=size(f1.num)
+ if size(sz,"*")<=2 then
+
+ f1=simp(f1)
+ else
+ [num,den]=simp(f1.num.entries,f1.den.entries)
+ f1.num=matrix(num,sz)
+ f1.den=matrix(den,sz)
+ end
+endfunction
diff --git a/modules/overloading/macros/%r_x_r.bin b/modules/overloading/macros/%r_x_r.bin
new file mode 100755
index 000000000..e79184c50
--- /dev/null
+++ b/modules/overloading/macros/%r_x_r.bin
Binary files differ
diff --git a/modules/overloading/macros/%r_x_r.sci b/modules/overloading/macros/%r_x_r.sci
new file mode 100755
index 000000000..c7ca23d9f
--- /dev/null
+++ b/modules/overloading/macros/%r_x_r.sci
@@ -0,0 +1,27 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function f=%r_x_r(s1,s2)
+ // %r_x_r(r1,r2)=r1.*r2 r1,r2 rationals
+ //!
+ //author Serge Steer INRIA
+ if ndims(s1)<=2& ndims(s2)<=2 then
+ [s1,s2]=sysconv(s1,s2)
+ [num,den]=simp(s1.num.*s2.num,s1.den.*s2.den)
+ f=rlist(num,den,s1.dt)
+ else
+ if size(s1,"*")==1 then
+ sz=size(s2)
+ else
+ sz=size(s1)
+ end
+ [num,den]=simp(s1.num(:).*s2.num(:),s1.den(:).*s2.den(:))
+ f=rlist(matrix(num,sz),matrix(den,sz),s1.dt)
+ end
+endfunction
diff --git a/modules/overloading/macros/%r_x_s.bin b/modules/overloading/macros/%r_x_s.bin
new file mode 100755
index 000000000..247460936
--- /dev/null
+++ b/modules/overloading/macros/%r_x_s.bin
Binary files differ
diff --git a/modules/overloading/macros/%r_x_s.sci b/modules/overloading/macros/%r_x_s.sci
new file mode 100755
index 000000000..242c8a52e
--- /dev/null
+++ b/modules/overloading/macros/%r_x_s.sci
@@ -0,0 +1,19 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+function f1=%r_x_s(f1,n2)
+ // %r_x_s(r,M)=r.*M rational .* constant
+ //author Serge Steer INRIA
+ //!
+
+ if size(n2,"*")==0
+ f1=[]
+ else
+ f1.num=f1.num.*n2
+ end
+endfunction
diff --git a/modules/overloading/macros/%r_y_p.bin b/modules/overloading/macros/%r_y_p.bin
new file mode 100755
index 000000000..8048d4d07
--- /dev/null
+++ b/modules/overloading/macros/%r_y_p.bin
Binary files differ
diff --git a/modules/overloading/macros/%r_y_p.sci b/modules/overloading/macros/%r_y_p.sci
new file mode 100755
index 000000000..82d22ed3a
--- /dev/null
+++ b/modules/overloading/macros/%r_y_p.sci
@@ -0,0 +1,23 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+function r=%r_y_p(a,b)
+ // a./.b
+ [ma,na]=size(a)
+ [mb,nb]=size(b)
+ r=zeros(ma*mb,na*nb)
+ k=0
+ for j=1:na
+ l=0
+ for i=1:ma
+ r(l+(1:mb),k+(1:nb))=a(i,j)./b
+ l=l+mb
+ end
+ k=k+nb
+ end
+endfunction
diff --git a/modules/overloading/macros/%r_y_r.bin b/modules/overloading/macros/%r_y_r.bin
new file mode 100755
index 000000000..1131740df
--- /dev/null
+++ b/modules/overloading/macros/%r_y_r.bin
Binary files differ
diff --git a/modules/overloading/macros/%r_y_r.sci b/modules/overloading/macros/%r_y_r.sci
new file mode 100755
index 000000000..40d9ada5e
--- /dev/null
+++ b/modules/overloading/macros/%r_y_r.sci
@@ -0,0 +1,24 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+function r=%r_y_r(a,b)
+ // a./.b
+
+ [ma,na]=size(a)
+ [mb,nb]=size(b)
+ r=zeros(ma*mb,na*nb)
+ k=0
+ for j=1:na
+ l=0
+ for i=1:ma
+ r(l+(1:mb),k+(1:nb))=a(i,j)./b
+ l=l+mb
+ end
+ k=k+nb
+ end
+endfunction
diff --git a/modules/overloading/macros/%r_y_s.bin b/modules/overloading/macros/%r_y_s.bin
new file mode 100755
index 000000000..a1af6307a
--- /dev/null
+++ b/modules/overloading/macros/%r_y_s.bin
Binary files differ
diff --git a/modules/overloading/macros/%r_y_s.sci b/modules/overloading/macros/%r_y_s.sci
new file mode 100755
index 000000000..05f199547
--- /dev/null
+++ b/modules/overloading/macros/%r_y_s.sci
@@ -0,0 +1,24 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+function r=%r_y_s(a,b)
+ // a./.b
+
+ [ma,na]=size(a)
+ [mb,nb]=size(b)
+ r=zeros(ma*mb,na*nb)
+ k=0
+ for j=1:na
+ l=0
+ for i=1:ma
+ r(l+(1:mb),k+(1:nb))=a(i,j)./b
+ l=l+mb
+ end
+ k=k+nb
+ end
+endfunction
diff --git a/modules/overloading/macros/%r_z_p.bin b/modules/overloading/macros/%r_z_p.bin
new file mode 100755
index 000000000..2f6ddd731
--- /dev/null
+++ b/modules/overloading/macros/%r_z_p.bin
Binary files differ
diff --git a/modules/overloading/macros/%r_z_p.sci b/modules/overloading/macros/%r_z_p.sci
new file mode 100755
index 000000000..bfb66e899
--- /dev/null
+++ b/modules/overloading/macros/%r_z_p.sci
@@ -0,0 +1,24 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+function r=%r_z_p(a,b)
+ // a.\.b
+
+ [ma,na]=size(a)
+ [mb,nb]=size(b)
+ r=zeros(ma*mb,na*nb)
+ k=0
+ for j=1:na
+ l=0
+ for i=1:ma
+ r(l+(1:mb),k+(1:nb))=a(i,j).\b
+ l=l+mb
+ end
+ k=k+nb
+ end
+endfunction
diff --git a/modules/overloading/macros/%r_z_r.bin b/modules/overloading/macros/%r_z_r.bin
new file mode 100755
index 000000000..c61c93200
--- /dev/null
+++ b/modules/overloading/macros/%r_z_r.bin
Binary files differ
diff --git a/modules/overloading/macros/%r_z_r.sci b/modules/overloading/macros/%r_z_r.sci
new file mode 100755
index 000000000..03a0011d4
--- /dev/null
+++ b/modules/overloading/macros/%r_z_r.sci
@@ -0,0 +1,24 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+function r=%r_z_r(a,b)
+ // a.\.b
+
+ [ma,na]=size(a)
+ [mb,nb]=size(b)
+ r=zeros(ma*mb,na*nb)
+ k=0
+ for j=1:na
+ l=0
+ for i=1:ma
+ r(l+(1:mb),k+(1:nb))=a(i,j).\b
+ l=l+mb
+ end
+ k=k+nb
+ end
+endfunction
diff --git a/modules/overloading/macros/%r_z_s.bin b/modules/overloading/macros/%r_z_s.bin
new file mode 100755
index 000000000..355c5be1f
--- /dev/null
+++ b/modules/overloading/macros/%r_z_s.bin
Binary files differ
diff --git a/modules/overloading/macros/%r_z_s.sci b/modules/overloading/macros/%r_z_s.sci
new file mode 100755
index 000000000..322b0bdd6
--- /dev/null
+++ b/modules/overloading/macros/%r_z_s.sci
@@ -0,0 +1,24 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+function r=%r_z_s(a,b)
+ // a.\.b
+
+ [ma,na]=size(a)
+ [mb,nb]=size(b)
+ r=zeros(ma*mb,na*nb)
+ k=0
+ for j=1:na
+ l=0
+ for i=1:ma
+ r(l+(1:mb),k+(1:nb))=a(i,j).\b
+ l=l+mb
+ end
+ k=k+nb
+ end
+endfunction
diff --git a/modules/overloading/macros/%s_1_hm.bin b/modules/overloading/macros/%s_1_hm.bin
new file mode 100755
index 000000000..04418d5ad
--- /dev/null
+++ b/modules/overloading/macros/%s_1_hm.bin
Binary files differ
diff --git a/modules/overloading/macros/%s_1_hm.sci b/modules/overloading/macros/%s_1_hm.sci
new file mode 100755
index 000000000..e1f21fff8
--- /dev/null
+++ b/modules/overloading/macros/%s_1_hm.sci
@@ -0,0 +1,16 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+function M=%s_1_hm(s,M)
+
+ //s<M
+ if size(s,"*")<> 1 then
+ error(msprintf(_("%s: Wrong type for input argument #%d: A scalar expected.\n"),"%s_1_hm",1));
+ end
+ M("entries")=s<M("entries")
+endfunction
diff --git a/modules/overloading/macros/%s_2_hm.bin b/modules/overloading/macros/%s_2_hm.bin
new file mode 100755
index 000000000..1aeec384a
--- /dev/null
+++ b/modules/overloading/macros/%s_2_hm.bin
Binary files differ
diff --git a/modules/overloading/macros/%s_2_hm.sci b/modules/overloading/macros/%s_2_hm.sci
new file mode 100755
index 000000000..214ab6927
--- /dev/null
+++ b/modules/overloading/macros/%s_2_hm.sci
@@ -0,0 +1,16 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+function M=%s_2_hm(s,M)
+
+ //s>M
+ if size(s,"*")<> 1 then
+ error(msprintf(_("%s: Wrong type for input argument #%d: A scalar expected.\n"),"%s_2_hm",1));
+ end
+ M("entries")=s>M("entries")
+endfunction
diff --git a/modules/overloading/macros/%s_3_hm.bin b/modules/overloading/macros/%s_3_hm.bin
new file mode 100755
index 000000000..d119705e9
--- /dev/null
+++ b/modules/overloading/macros/%s_3_hm.bin
Binary files differ
diff --git a/modules/overloading/macros/%s_3_hm.sci b/modules/overloading/macros/%s_3_hm.sci
new file mode 100755
index 000000000..b633941b9
--- /dev/null
+++ b/modules/overloading/macros/%s_3_hm.sci
@@ -0,0 +1,16 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+function M=%s_3_hm(s,M)
+
+ //s<=M
+ if size(s,"*")<> 1 then
+ error(msprintf(_("%s: Wrong type for input argument #%d: A scalar expected.\n"),"%s_3_hm",1));
+ end
+ M("entries")=s<=M("entries")
+endfunction
diff --git a/modules/overloading/macros/%s_4_hm.bin b/modules/overloading/macros/%s_4_hm.bin
new file mode 100755
index 000000000..410665b03
--- /dev/null
+++ b/modules/overloading/macros/%s_4_hm.bin
Binary files differ
diff --git a/modules/overloading/macros/%s_4_hm.sci b/modules/overloading/macros/%s_4_hm.sci
new file mode 100755
index 000000000..e962cc43d
--- /dev/null
+++ b/modules/overloading/macros/%s_4_hm.sci
@@ -0,0 +1,16 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+function M=%s_4_hm(s,M)
+
+ //s>=M
+ if size(s,"*")<> 1 then
+ error(msprintf(_("%s: Wrong type for input argument #%d: A scalar expected.\n"),"%s_4_hm",1));
+ end
+ M("entries")=s>=M("entries")
+endfunction
diff --git a/modules/overloading/macros/%s_5.bin b/modules/overloading/macros/%s_5.bin
new file mode 100755
index 000000000..e2986cd44
--- /dev/null
+++ b/modules/overloading/macros/%s_5.bin
Binary files differ
diff --git a/modules/overloading/macros/%s_5.sci b/modules/overloading/macros/%s_5.sci
new file mode 100755
index 000000000..10ecb1340
--- /dev/null
+++ b/modules/overloading/macros/%s_5.sci
@@ -0,0 +1,13 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+function x=%s_5(a)
+ //implements ~a for a a matrix of numbers
+
+ x=(a==0)
+endfunction
diff --git a/modules/overloading/macros/%s_a_hm.bin b/modules/overloading/macros/%s_a_hm.bin
new file mode 100755
index 000000000..b5115877f
--- /dev/null
+++ b/modules/overloading/macros/%s_a_hm.bin
Binary files differ
diff --git a/modules/overloading/macros/%s_a_hm.sci b/modules/overloading/macros/%s_a_hm.sci
new file mode 100755
index 000000000..ebe5789d6
--- /dev/null
+++ b/modules/overloading/macros/%s_a_hm.sci
@@ -0,0 +1,24 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+function M2=%s_a_hm(M1,M2)
+
+ // hypermatrix + scalar
+ if and(size(M1)==[1 1]) then
+ M2.entries=M1+M2.entries
+ else
+ dims1=size(M1)';
+ dims2=matrix(M2.dims,-1,1)
+ dims1(3:size(dims2,"*"))=1
+ if and(dims1==dims2) then //should not occur
+ M2.entries=matrix(M1,-1,1)+M2.entries
+ else
+ error(8)
+ end
+ end
+endfunction
diff --git a/modules/overloading/macros/%s_a_ip.bin b/modules/overloading/macros/%s_a_ip.bin
new file mode 100755
index 000000000..469b7561a
--- /dev/null
+++ b/modules/overloading/macros/%s_a_ip.bin
Binary files differ
diff --git a/modules/overloading/macros/%s_a_ip.sci b/modules/overloading/macros/%s_a_ip.sci
new file mode 100755
index 000000000..773b56768
--- /dev/null
+++ b/modules/overloading/macros/%s_a_ip.sci
@@ -0,0 +1,13 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+function r=%s_a_ip(s,ip)
+ // s+ip
+ if size(s,"*")<>1 then error(10),end
+ r=(s+ip(1)):(s+ip(2)):(s+ip(3))
+endfunction
diff --git a/modules/overloading/macros/%s_a_lss.bin b/modules/overloading/macros/%s_a_lss.bin
new file mode 100755
index 000000000..9322d0295
--- /dev/null
+++ b/modules/overloading/macros/%s_a_lss.bin
Binary files differ
diff --git a/modules/overloading/macros/%s_a_lss.sci b/modules/overloading/macros/%s_a_lss.sci
new file mode 100755
index 000000000..324467d57
--- /dev/null
+++ b/modules/overloading/macros/%s_a_lss.sci
@@ -0,0 +1,13 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA - Serge Steer
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+function s2=%s_a_lss(d1,s2)
+ // s=d1+s2
+ //!
+ s2(5)=s2(5)+d1
+endfunction
diff --git a/modules/overloading/macros/%s_a_r.bin b/modules/overloading/macros/%s_a_r.bin
new file mode 100755
index 000000000..805aef3ae
--- /dev/null
+++ b/modules/overloading/macros/%s_a_r.bin
Binary files differ
diff --git a/modules/overloading/macros/%s_a_r.sci b/modules/overloading/macros/%s_a_r.sci
new file mode 100755
index 000000000..1f0ef1cf4
--- /dev/null
+++ b/modules/overloading/macros/%s_a_r.sci
@@ -0,0 +1,44 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+function f=%s_a_r(m,f)
+ //f= m+f
+ // author Serge Steer, INRIA
+ //!
+ [num,den]=f(["num","den"])
+ szf=size(den)
+ szm=size(m)
+
+ if and(szf>=0)&and(szm>=0) then
+ if prod(szf)==1&prod(szm)>1 then
+ den=den(ones(m))
+ szf=szm
+ end
+
+ if size(szf,"*")>2 then
+ num=num(:);den=den(:);m=m(:)
+ end
+ [num,den]=simp(num+m.*den,den)
+ num=matrix(num,szf)
+ den=matrix(den,szf)
+ else
+ //at leat one matrix is eye*x
+ if size(szf,"*")>2|size(szm,"*")>2 then
+ error(8)
+ end
+ if or(szf<0)&or(szm<0) then
+ [num,den]=simp(num+m.*den,den)
+ elseif or(szf<0) then
+ [num,den]=simp(num+m.*den,den*ones(m))
+ elseif or(szm<0) then
+ [num,den]=simp(num+(m+0)*eye(den).*den,den)
+ end
+ end
+ f=rlist(num,den,f.dt)
+endfunction
+
diff --git a/modules/overloading/macros/%s_a_sp.bin b/modules/overloading/macros/%s_a_sp.bin
new file mode 100755
index 000000000..5d5016826
--- /dev/null
+++ b/modules/overloading/macros/%s_a_sp.bin
Binary files differ
diff --git a/modules/overloading/macros/%s_a_sp.sci b/modules/overloading/macros/%s_a_sp.sci
new file mode 100755
index 000000000..4145a6271
--- /dev/null
+++ b/modules/overloading/macros/%s_a_sp.sci
@@ -0,0 +1,20 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+function s=%s_a_sp(a,b)
+ // %s_a_sp - adds a scalar a and a sparse matrix b
+ //!
+
+ if size(a)==[-1,-1] then
+ //eye+b
+ [m,n]=size(b)
+ s=(0+a)*speye(m,n)+b
+ else
+ s=a+full(b)
+ end
+endfunction
diff --git a/modules/overloading/macros/%s_and.bin b/modules/overloading/macros/%s_and.bin
new file mode 100755
index 000000000..ac1eac223
--- /dev/null
+++ b/modules/overloading/macros/%s_and.bin
Binary files differ
diff --git a/modules/overloading/macros/%s_and.sci b/modules/overloading/macros/%s_and.sci
new file mode 100755
index 000000000..9332ab151
--- /dev/null
+++ b/modules/overloading/macros/%s_and.sci
@@ -0,0 +1,21 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+function x=%s_and(a,flag)
+ // or(a) returns the logical OR
+ // for scalar matrices, an entry is TRUE if it is not zero.
+ //!
+
+ if argn(2)==1 then flag="*",end
+ if flag=="*" then
+ x=find(a==0,1)==[]
+ else
+ if a==[] then x=[],return,end
+ x=sum(bool2s(a),flag)==size(a,flag)
+ end
+endfunction
diff --git a/modules/overloading/macros/%s_b_i.bin b/modules/overloading/macros/%s_b_i.bin
new file mode 100755
index 000000000..40c8ebfc3
--- /dev/null
+++ b/modules/overloading/macros/%s_b_i.bin
Binary files differ
diff --git a/modules/overloading/macros/%s_b_i.sci b/modules/overloading/macros/%s_b_i.sci
new file mode 100755
index 000000000..338fcffc5
--- /dev/null
+++ b/modules/overloading/macros/%s_b_i.sci
@@ -0,0 +1,24 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+function r=%s_b_i(varargin)
+ //a:b where a is double and b int
+ //a:b:c where a is double, b int and c every type
+ if round(varargin(1))<>varargin(1) then
+ error(msprintf(_("%s: Wrong type for input argument #%d: integer values expected.\n"),"%s_b_i",1));
+ end
+ if size(varargin)==2 then //a:b
+ it=inttype(varargin(2))
+ r=iconvert(varargin(1),it):varargin(2)
+ else
+ it=inttype(varargin(2))
+ r=iconvert(varargin(1),it):varargin(2):iconvert(varargin(3),it)
+ end
+endfunction
+
+
diff --git a/modules/overloading/macros/%s_b_s.bin b/modules/overloading/macros/%s_b_s.bin
new file mode 100755
index 000000000..53363cd0b
--- /dev/null
+++ b/modules/overloading/macros/%s_b_s.bin
Binary files differ
diff --git a/modules/overloading/macros/%s_b_s.sci b/modules/overloading/macros/%s_b_s.sci
new file mode 100755
index 000000000..9fc4226c9
--- /dev/null
+++ b/modules/overloading/macros/%s_b_s.sci
@@ -0,0 +1,23 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+function r=%s_b_s(varargin)
+ //a:b:c where a and b are double
+ if round(varargin(1))<>varargin(1)|round(varargin(2))<>varargin(2) then
+ error(msprintf(_("%s: Wrong type for input arguments #%d and #%d: Integer values expected.\n"),"%s_b_s",1,2));
+ end
+ select type(varargin(3))
+ case 8 then
+ it=inttype(varargin(3))
+ r=iconvert(varargin(1),it):iconvert(varargin(2),it):varargin(3)
+ else
+ error(msprintf(_("%s: Not yet implemented.\n"),"%s_b_s"));
+ end
+endfunction
+
+
diff --git a/modules/overloading/macros/%s_c_cblock.bin b/modules/overloading/macros/%s_c_cblock.bin
new file mode 100755
index 000000000..7c61347b6
--- /dev/null
+++ b/modules/overloading/macros/%s_c_cblock.bin
Binary files differ
diff --git a/modules/overloading/macros/%s_c_cblock.sci b/modules/overloading/macros/%s_c_cblock.sci
new file mode 100755
index 000000000..a3f8c4268
--- /dev/null
+++ b/modules/overloading/macros/%s_c_cblock.sci
@@ -0,0 +1,21 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function b=%s_c_cblock(a,b)
+ if a==[] then return,end
+ v2=getfield(2,b)
+
+ if size(a,1)<>size(v2,1) then error(5),end
+ if type(a)==type(v2) then
+ setfield(2,[a v2],b)
+ else
+ setfield(0,"cblock",b)
+ setfield(2,a,b);
+ end
+endfunction
diff --git a/modules/overloading/macros/%s_c_lss.bin b/modules/overloading/macros/%s_c_lss.bin
new file mode 100755
index 000000000..59a010db2
--- /dev/null
+++ b/modules/overloading/macros/%s_c_lss.bin
Binary files differ
diff --git a/modules/overloading/macros/%s_c_lss.sci b/modules/overloading/macros/%s_c_lss.sci
new file mode 100755
index 000000000..6c5cd50e5
--- /dev/null
+++ b/modules/overloading/macros/%s_c_lss.sci
@@ -0,0 +1,20 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA - Serge Steer
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function s=%s_c_lss(d1,s2)
+ // s=[d1,s2] d1 gain, s2 state-space
+ //!
+ // origin s. steer inria 1987
+ //
+ // Copyright INRIA
+ [a2,b2,c2,d2,x2,dom2]=s2(2:7)
+ [n2,m2]=size(b2);[p1,m1]=size(d1)
+ s=tlist(["lss","A","B","C","D","X0","dt"],a2,[0*ones(n2,m1),b2],c2,..
+ [d1,d2],x2,dom2)
+endfunction
diff --git a/modules/overloading/macros/%s_c_r.bin b/modules/overloading/macros/%s_c_r.bin
new file mode 100755
index 000000000..ef390d586
--- /dev/null
+++ b/modules/overloading/macros/%s_c_r.bin
Binary files differ
diff --git a/modules/overloading/macros/%s_c_r.sci b/modules/overloading/macros/%s_c_r.sci
new file mode 100755
index 000000000..3d9798641
--- /dev/null
+++ b/modules/overloading/macros/%s_c_r.sci
@@ -0,0 +1,15 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function f=%s_c_r(m,f)
+ // %s_c_r(M,r)=[M,r]
+ //!
+
+ f=rlist([m,f("num")],[ones(m),f("den")],f("dt"))
+endfunction
diff --git a/modules/overloading/macros/%s_c_sp.bin b/modules/overloading/macros/%s_c_sp.bin
new file mode 100755
index 000000000..9089a865a
--- /dev/null
+++ b/modules/overloading/macros/%s_c_sp.bin
Binary files differ
diff --git a/modules/overloading/macros/%s_c_sp.sci b/modules/overloading/macros/%s_c_sp.sci
new file mode 100755
index 000000000..732097a16
--- /dev/null
+++ b/modules/overloading/macros/%s_c_sp.sci
@@ -0,0 +1,13 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function a=%s_c_sp(a,b)
+ // [a b] a sparse b full
+ a=[sparse(a),b]
+endfunction
diff --git a/modules/overloading/macros/%s_d_p.bin b/modules/overloading/macros/%s_d_p.bin
new file mode 100755
index 000000000..a72df7437
--- /dev/null
+++ b/modules/overloading/macros/%s_d_p.bin
Binary files differ
diff --git a/modules/overloading/macros/%s_d_p.sci b/modules/overloading/macros/%s_d_p.sci
new file mode 100755
index 000000000..07c318d9e
--- /dev/null
+++ b/modules/overloading/macros/%s_d_p.sci
@@ -0,0 +1,20 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function f=%s_d_p(p1,p2)
+ // %s_d_p(M,p)=M.*p
+ //!
+
+ if size(p1,"*")==1 then
+ p1=p1*ones(p2)
+ elseif size(p2,"*")==1 then
+ p2=p2*ones(p1)
+ end
+ f=rlist(p1*poly(1,varn(p2),"c"),p2,[])
+endfunction
diff --git a/modules/overloading/macros/%s_d_r.bin b/modules/overloading/macros/%s_d_r.bin
new file mode 100755
index 000000000..b5a5a0cbb
--- /dev/null
+++ b/modules/overloading/macros/%s_d_r.bin
Binary files differ
diff --git a/modules/overloading/macros/%s_d_r.sci b/modules/overloading/macros/%s_d_r.sci
new file mode 100755
index 000000000..3c65cca8d
--- /dev/null
+++ b/modules/overloading/macros/%s_d_r.sci
@@ -0,0 +1,16 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function f=%s_d_r(n1,f2)
+ // n1./f2
+ //!
+
+ if size(n1,"*")==0 then f=[],return,end
+ f=rlist(n1.*f2("den"),ones(n1).*f2("num"),f2("dt"))
+endfunction
diff --git a/modules/overloading/macros/%s_d_sp.bin b/modules/overloading/macros/%s_d_sp.bin
new file mode 100755
index 000000000..2dd6b3d28
--- /dev/null
+++ b/modules/overloading/macros/%s_d_sp.bin
Binary files differ
diff --git a/modules/overloading/macros/%s_d_sp.sci b/modules/overloading/macros/%s_d_sp.sci
new file mode 100755
index 000000000..b3a512db7
--- /dev/null
+++ b/modules/overloading/macros/%s_d_sp.sci
@@ -0,0 +1,19 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function r=%s_d_sp(a,b)
+ //r=a./b
+
+ [ij,v,mn]=spget(b)
+ if size(v,"*")<>mn(1)*mn(2) then
+ error(27)
+ else
+ r=a./full(b)
+ end
+endfunction
diff --git a/modules/overloading/macros/%s_e.bin b/modules/overloading/macros/%s_e.bin
new file mode 100755
index 000000000..cb4528ba2
--- /dev/null
+++ b/modules/overloading/macros/%s_e.bin
Binary files differ
diff --git a/modules/overloading/macros/%s_e.sci b/modules/overloading/macros/%s_e.sci
new file mode 100755
index 000000000..4b09fffd5
--- /dev/null
+++ b/modules/overloading/macros/%s_e.sci
@@ -0,0 +1,33 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function f=%s_e(varargin)
+ //A(i,j,k,..)
+
+ rhs=size(varargin)
+ M=varargin(rhs)
+
+ nind=rhs-1
+ dims=[]
+ for k=3:nind
+ ind=varargin(k)
+ if type(ind)==2|type(ind)==129 then ind=horner(ind,1),end
+ if type(ind)==4 then ind=find(ind),end
+ if or(ind<>1) then error(21),end
+ n=size(ind,"*")
+ dims=[dims,n]
+ end
+ f=M(varargin(1:min(2,rhs-1)))
+ k=find(dims>1)
+ if k<>[] then
+ dims(k($)+1:$)=[]
+ N=prod(dims)
+ f=mlist(["hm","dims","entries"],int32([size(f) dims]),ones(N,1).*.f(:))
+ end
+endfunction
diff --git a/modules/overloading/macros/%s_f_cblock.bin b/modules/overloading/macros/%s_f_cblock.bin
new file mode 100755
index 000000000..c9cee879e
--- /dev/null
+++ b/modules/overloading/macros/%s_f_cblock.bin
Binary files differ
diff --git a/modules/overloading/macros/%s_f_cblock.sci b/modules/overloading/macros/%s_f_cblock.sci
new file mode 100755
index 000000000..199870034
--- /dev/null
+++ b/modules/overloading/macros/%s_f_cblock.sci
@@ -0,0 +1,12 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function b=%s_f_cblock(a,b)
+ if a<>[] then error(44,1),end
+endfunction
diff --git a/modules/overloading/macros/%s_f_lss.bin b/modules/overloading/macros/%s_f_lss.bin
new file mode 100755
index 000000000..2c521b0d6
--- /dev/null
+++ b/modules/overloading/macros/%s_f_lss.bin
Binary files differ
diff --git a/modules/overloading/macros/%s_f_lss.sci b/modules/overloading/macros/%s_f_lss.sci
new file mode 100755
index 000000000..a80f12d00
--- /dev/null
+++ b/modules/overloading/macros/%s_f_lss.sci
@@ -0,0 +1,17 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA - Serge Steer
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function s=%s_f_lss(d1,s2)
+ //s=%s_f_lss(d1,s2) <=> s=[d1,s2]
+ //!
+ [a2,b2,c2,d2,x2,dom2]=s2(2:7)
+ [n2,m2]=size(c2);[p1,m1]=size(d1)
+ s=tlist(["lss","A","B","C","D","X0","dt"],a2,b2,[0*ones(p1,m2);c2],..
+ [d1;d2],x2,dom2)
+endfunction
diff --git a/modules/overloading/macros/%s_f_r.bin b/modules/overloading/macros/%s_f_r.bin
new file mode 100755
index 000000000..f4a70a394
--- /dev/null
+++ b/modules/overloading/macros/%s_f_r.bin
Binary files differ
diff --git a/modules/overloading/macros/%s_f_r.sci b/modules/overloading/macros/%s_f_r.sci
new file mode 100755
index 000000000..23c2f9599
--- /dev/null
+++ b/modules/overloading/macros/%s_f_r.sci
@@ -0,0 +1,15 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function f=%s_f_r(m,f)
+ // [m;f]
+ //!
+
+ f=rlist([m;f("num")],[ones(m);f("den")],f("dt"))
+endfunction
diff --git a/modules/overloading/macros/%s_f_sp.bin b/modules/overloading/macros/%s_f_sp.bin
new file mode 100755
index 000000000..75b99de0d
--- /dev/null
+++ b/modules/overloading/macros/%s_f_sp.bin
Binary files differ
diff --git a/modules/overloading/macros/%s_f_sp.sci b/modules/overloading/macros/%s_f_sp.sci
new file mode 100755
index 000000000..d25acfdce
--- /dev/null
+++ b/modules/overloading/macros/%s_f_sp.sci
@@ -0,0 +1,14 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function a=%s_f_sp(a,b)
+ // [a;b] a sparse b full
+
+ a=[sparse(a);b]
+endfunction
diff --git a/modules/overloading/macros/%s_g_b.bin b/modules/overloading/macros/%s_g_b.bin
new file mode 100755
index 000000000..c1120fc5d
--- /dev/null
+++ b/modules/overloading/macros/%s_g_b.bin
Binary files differ
diff --git a/modules/overloading/macros/%s_g_b.sci b/modules/overloading/macros/%s_g_b.sci
new file mode 100755
index 000000000..b9fc13630
--- /dev/null
+++ b/modules/overloading/macros/%s_g_b.sci
@@ -0,0 +1,14 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function r=%s_g_b(a,b)
+ // r=a|b
+
+ r=(a<>0)|b
+endfunction
diff --git a/modules/overloading/macros/%s_g_s.bin b/modules/overloading/macros/%s_g_s.bin
new file mode 100755
index 000000000..8b20f1b76
--- /dev/null
+++ b/modules/overloading/macros/%s_g_s.bin
Binary files differ
diff --git a/modules/overloading/macros/%s_g_s.sci b/modules/overloading/macros/%s_g_s.sci
new file mode 100755
index 000000000..40193568f
--- /dev/null
+++ b/modules/overloading/macros/%s_g_s.sci
@@ -0,0 +1,18 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function r=%s_g_s(a,b)
+ //computes a|b for a and b matrices of scalar
+
+ if a==[]|b==[] then
+ r=[]
+ else
+ r=(a<>0)|(b<>0)
+ end
+endfunction
diff --git a/modules/overloading/macros/%s_h_b.bin b/modules/overloading/macros/%s_h_b.bin
new file mode 100755
index 000000000..2ae2613f2
--- /dev/null
+++ b/modules/overloading/macros/%s_h_b.bin
Binary files differ
diff --git a/modules/overloading/macros/%s_h_b.sci b/modules/overloading/macros/%s_h_b.sci
new file mode 100755
index 000000000..f78644401
--- /dev/null
+++ b/modules/overloading/macros/%s_h_b.sci
@@ -0,0 +1,13 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function r=%s_h_b(a,b)
+ // r=a&b
+ r=(a<>0)&b
+endfunction
diff --git a/modules/overloading/macros/%s_h_s.bin b/modules/overloading/macros/%s_h_s.bin
new file mode 100755
index 000000000..80abcb374
--- /dev/null
+++ b/modules/overloading/macros/%s_h_s.bin
Binary files differ
diff --git a/modules/overloading/macros/%s_h_s.sci b/modules/overloading/macros/%s_h_s.sci
new file mode 100755
index 000000000..cf21115f6
--- /dev/null
+++ b/modules/overloading/macros/%s_h_s.sci
@@ -0,0 +1,17 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function r=%s_h_s(a,b)
+ //computes a&b for a and b matrices of scalar
+ if a==[]|b==[] then
+ r=[]
+ else
+ r=(a<>0)&(b<>0)
+ end
+endfunction
diff --git a/modules/overloading/macros/%s_i_b.bin b/modules/overloading/macros/%s_i_b.bin
new file mode 100755
index 000000000..92afecb76
--- /dev/null
+++ b/modules/overloading/macros/%s_i_b.bin
Binary files differ
diff --git a/modules/overloading/macros/%s_i_b.sci b/modules/overloading/macros/%s_i_b.sci
new file mode 100755
index 000000000..71c7f8f90
--- /dev/null
+++ b/modules/overloading/macros/%s_i_b.sci
@@ -0,0 +1,23 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function M=%s_i_b(varargin)
+
+ rhs=argn(2)
+ M=varargin($)
+ if rhs<=4 then //type conversion
+ M=bool2s(M)
+ M(varargin(1:$-2))=varargin($-1)
+ else //hypermatrix syntax
+ if varargin($-1)<>[] then M=bool2s(M),end
+ M=mlist(["hm","dims","entries"],int32(size(M)),M(:))
+ varargin($)=M;
+ M=generic_i_hm(0,varargin(:))
+ end
+endfunction
diff --git a/modules/overloading/macros/%s_i_c.bin b/modules/overloading/macros/%s_i_c.bin
new file mode 100755
index 000000000..3ac503685
--- /dev/null
+++ b/modules/overloading/macros/%s_i_c.bin
Binary files differ
diff --git a/modules/overloading/macros/%s_i_c.sci b/modules/overloading/macros/%s_i_c.sci
new file mode 100755
index 000000000..839c2497d
--- /dev/null
+++ b/modules/overloading/macros/%s_i_c.sci
@@ -0,0 +1,25 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA - Serge Steer
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function M=%s_i_c(varargin)
+ //insertion of a matrix of numbers in a matrix of of string
+
+
+ rhs=argn(2)
+ M=varargin($)
+ if rhs<=4 then //type conversion
+ error(43)
+ else //hypermatrix syntax
+ if varargin($-1)<>[] then error(43),end
+ M=mlist(["hm","dims","entries"],int32(size(M)),M(:))
+ varargin($)=M;
+ M=generic_i_hm("",varargin(:))
+ end
+endfunction
+
diff --git a/modules/overloading/macros/%s_i_ce.bin b/modules/overloading/macros/%s_i_ce.bin
new file mode 100755
index 000000000..c7693c5dd
--- /dev/null
+++ b/modules/overloading/macros/%s_i_ce.bin
Binary files differ
diff --git a/modules/overloading/macros/%s_i_ce.sci b/modules/overloading/macros/%s_i_ce.sci
new file mode 100755
index 000000000..93002ee68
--- /dev/null
+++ b/modules/overloading/macros/%s_i_ce.sci
@@ -0,0 +1,16 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA - Vincent Couvert
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function M=%s_i_ce(varargin)
+ // Insertion of a double matrix in a cell
+ M=generic_i_ce(varargin(:))
+endfunction
+
+
+
diff --git a/modules/overloading/macros/%s_i_h.bin b/modules/overloading/macros/%s_i_h.bin
new file mode 100755
index 000000000..0c23b02b0
--- /dev/null
+++ b/modules/overloading/macros/%s_i_h.bin
Binary files differ
diff --git a/modules/overloading/macros/%s_i_h.sci b/modules/overloading/macros/%s_i_h.sci
new file mode 100755
index 000000000..35706fe71
--- /dev/null
+++ b/modules/overloading/macros/%s_i_h.sci
@@ -0,0 +1,14 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function h=%s_i_h(i,v,h)
+ h=generic_i_h(i,v,h)
+endfunction
+
+
diff --git a/modules/overloading/macros/%s_i_hm.bin b/modules/overloading/macros/%s_i_hm.bin
new file mode 100755
index 000000000..c7a5e4f9c
--- /dev/null
+++ b/modules/overloading/macros/%s_i_hm.bin
Binary files differ
diff --git a/modules/overloading/macros/%s_i_hm.sci b/modules/overloading/macros/%s_i_hm.sci
new file mode 100755
index 000000000..0a3646543
--- /dev/null
+++ b/modules/overloading/macros/%s_i_hm.sci
@@ -0,0 +1,32 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function M=%s_i_hm(varargin)
+
+ //insertion of a matrix of float in an hypermatrix
+ M=varargin($)
+ select type(M.entries)
+ case 1 then //destination is an hypermat of double
+ M=generic_i_hm(0,varargin(:))
+ case 2 then //destination is an hypermat of polynomials
+ M=generic_i_hm(0,varargin(:))
+ case 4 then //destination is an hypermat of boolean
+ N=varargin($-1)
+ if N<>[] then N=N<>0,end
+ M=generic_i_hm(%f,varargin(1:$-2),N,M)
+ case 8 then //destination is an hypermat of integer
+ it=inttype(M.entries)
+ z=iconvert(0,it)
+ N=varargin($-1)
+ if N<>[] then N=iconvert(N,it),end
+ M=generic_i_hm(z,varargin(1:$-2),N,M)
+ else
+ M=generic_i_hm(0,varargin(:))
+ end
+endfunction
diff --git a/modules/overloading/macros/%s_i_lss.bin b/modules/overloading/macros/%s_i_lss.bin
new file mode 100755
index 000000000..203f5fe8a
--- /dev/null
+++ b/modules/overloading/macros/%s_i_lss.bin
Binary files differ
diff --git a/modules/overloading/macros/%s_i_lss.sci b/modules/overloading/macros/%s_i_lss.sci
new file mode 100755
index 000000000..1d5c5811f
--- /dev/null
+++ b/modules/overloading/macros/%s_i_lss.sci
@@ -0,0 +1,61 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA - Serge Steer
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function s2=%s_i_lss(i,j,s1,s2)
+ // s2(i,j)=s1
+ //!
+ if type(i)==10 then // sl('A'),sl('B'),sl('C'),sl('D'),sl('X'),sl('dt')
+ [lhs,rhs]=argn(0)
+ if rhs<>3 then error(21),end
+ nams=["A","B","C","D","X","dt"]
+ kf=find(convstr(i,"u")==nams)
+ if kf==[] then error(21),end
+ s2=s1;kf=kf+1
+ if size(s2(kf))<>size(j) then
+ if kf<>7|prod(size(j))>1 then
+ warning("inserted element "+i+" has inconsistent dimension")
+ end
+ end
+ s2(kf)=j
+ return
+ end
+ if s1==[] then // insertion d'une matrice vide
+ row=%f
+ col=%f
+ [m,n]=size(s2)
+ if and(size(i)==[-1 -1]) then
+ row=%t
+ else
+ if and(i(:)==(1:m)') then row=%t,end
+ end
+ if and(size(j)==[-1 -1]) then
+ col=%t
+ else
+ if and(j(:)==(1:n)') then col=%t,end
+ end
+ if ~row&~col then error("inserting [] in submatrix --> forbidden!"),end
+ if row&col then s2=[],return,end
+ if row then
+ j1=[]
+ for jj=1:n
+ if ~or(jj==j) then j1=[j1 jj] ,end
+ end
+ s2=s2(:,j1)
+ else
+ i1=[]
+ for ii=1:m
+ if ~or(ii==i) then i1=[i1 ii] ,end
+ end
+ s2=s2(i1,:)
+ end
+ else
+ s1=tlist(["lss","A","B","C","D","X0","dt"],[],[],[],s1,[],[])
+ s2(i,j)=s1
+ end
+endfunction
diff --git a/modules/overloading/macros/%s_i_p.bin b/modules/overloading/macros/%s_i_p.bin
new file mode 100755
index 000000000..f5e989656
--- /dev/null
+++ b/modules/overloading/macros/%s_i_p.bin
Binary files differ
diff --git a/modules/overloading/macros/%s_i_p.sci b/modules/overloading/macros/%s_i_p.sci
new file mode 100755
index 000000000..0904c56f7
--- /dev/null
+++ b/modules/overloading/macros/%s_i_p.sci
@@ -0,0 +1,16 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA - Serge Steer
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function M=%s_i_p(varargin)
+ //insertion of an polynomial matrix in an matrix of numbers for more than 2 indices
+ M=varargin($)
+ M=mlist(["hm","dims","entries"],int32(size(M)),M(:))
+ varargin($)=M;
+ M=generic_i_hm(0,varargin(:))
+endfunction
diff --git a/modules/overloading/macros/%s_i_r.bin b/modules/overloading/macros/%s_i_r.bin
new file mode 100755
index 000000000..0d9d58f99
--- /dev/null
+++ b/modules/overloading/macros/%s_i_r.bin
Binary files differ
diff --git a/modules/overloading/macros/%s_i_r.sci b/modules/overloading/macros/%s_i_r.sci
new file mode 100755
index 000000000..4d7510624
--- /dev/null
+++ b/modules/overloading/macros/%s_i_r.sci
@@ -0,0 +1,29 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function s2=%s_i_r(varargin)
+ //author Serge Steer INRIA
+ s1=varargin($-1)
+ s2=varargin($)
+ //s2(i,j)=s1 s1 matrix of scalar
+ if s1==[] then
+ num=s2.num;den=s2.den;
+ num(varargin(1:$-2))=[];
+ den(varargin(1:$-2))=[];
+ s2=rlist(num,den,s2.dt)
+ else
+ num=s2.num;
+ ind=list(); for i=size(num),ind($+1)=1:i;end
+ num(varargin(1:$-2))=s1
+ den=ones(num)
+ den(ind(:))=s2.den;
+ den(varargin(1:$-2))=1
+ s2=rlist(num,den,s2.dt)
+ end
+endfunction
diff --git a/modules/overloading/macros/%s_i_s.bin b/modules/overloading/macros/%s_i_s.bin
new file mode 100755
index 000000000..6665972b7
--- /dev/null
+++ b/modules/overloading/macros/%s_i_s.bin
Binary files differ
diff --git a/modules/overloading/macros/%s_i_s.sci b/modules/overloading/macros/%s_i_s.sci
new file mode 100755
index 000000000..f6e27248d
--- /dev/null
+++ b/modules/overloading/macros/%s_i_s.sci
@@ -0,0 +1,164 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function M=%s_i_s(varargin)
+
+ //insertion of a matrix in an hypermatrix
+ [lhs,rhs]=argn(0)
+ M=varargin(rhs)
+ N=varargin(rhs-1)//inserted matrix
+
+ index=varargin(1) //
+ if rhs==3 then
+ //result will be a cell a struct
+ if type(index)==10 then //M.x=N or M.entries=N
+ M=struct()
+ M(index)=N
+ if index=="entries" then //M.entries=N
+
+ // change struct to cell
+ f=getfield(1,M);f(1)="ce"
+ setfield(1,f,M)
+ end
+ return
+ elseif type(index)==15 then
+ //M(i).x=N or M(i,j,..).x=N or M.x(i,j,..)or M(i,j..)
+ //check for a name in the index list
+ isstr=%f; for ii=index,if type(ii)==10 then isstr=%t,break,end,end
+ if isstr then
+ M=createstruct(index,N)
+ if type(index(1))<>10 & index(2)=="entries" then
+ // change struct to cell
+ f=getfield(1,M);f(1)="ce"
+ setfield(1,f,M)
+ end
+ else
+ M(index(:))=N
+ end
+ return
+ end
+ end
+
+ //X(i,j,k)=n hypermatrix
+ dims=matrix(size(M),-1,1)
+ v=M(:)
+
+ Ndims=rhs-2
+ nd=size(dims,"*")
+ if Ndims>nd then dims(nd+1:Ndims)=0;end
+ del=N==[];count=[]
+ dims1=[]
+ I=0;I1=0
+ iimp=0
+ for k=Ndims:-1:1
+ ik=varargin(k)//the kth subscript
+ if type(ik)==2 |type(ik)==129 then // size implicit subscript $...
+ ik=round(horner(ik,dims(k))) // explicit subscript
+ dims1(k,1)=max(max(ik),dims(k))
+ elseif type(ik)==4 then // boolean subscript
+ ik=find(ik)
+ dims1(k,1)=max(max(ik),dims(k))
+ elseif min(size(ik))<0 then // :
+ if dims(k)<>0 then
+ ik=1:dims(k)
+ else
+ iimp=iimp+1
+
+ if iimp<=size(size(N),"*") then
+
+ if iimp==1 then
+ single=%t
+ for kk=1:k-1
+ if size(varargin(kk),1)==-1|size(varargin(kk),"*")>1 then
+ single=%f
+ break
+ end
+ end
+ if single then
+ ik=1:size(N,"*"),
+ else
+ ik=1:size(N,size(size(N),"*")+1-iimp)
+ end
+ else
+ ik=1:size(N,size(size(N),"*")+1-iimp)
+ end
+ else
+ ik=1
+ end
+ end
+ dims1(k,1)=max(max(ik),dims(k))
+ if k==Ndims then
+ if k<nd then
+ ik=1:prod(dims(k:$))
+ dims1(k:nd,1)=dims(k:nd)
+ end
+ end
+ else //floating point subscript
+ ik=round(ik)
+ dims1(k,1)=max(max(ik),dims(k))
+ end
+
+
+ if size(ik,"*")>1 then
+ ik=ik(:)
+ if size(I,"*")>1 then
+ I=(dims1(k)*I).*.ones(ik)+ones(I).*.(ik-1)
+ else
+ I=dims1(k)*I+ik-1
+ end
+ else
+ I=dims1(k)*I+ik-1
+ end
+ if del then
+ if or(ik<>(1:dims1(k))') then
+ count=[count k]
+ nk=size(ik,"*")
+ end
+ end
+ end //end of the loop on subscripts
+
+ if ~del&or(dims1>dims) then
+ I1=0
+ for k=size(dims1,"*"):-1:1
+ ik1=(1:dims(k))'
+ if ik1<>[] then
+ if dims1(k)>1 then
+ if size(I1,"*")>1 then
+ I1=(dims1(k)*I1).*.ones(ik1)+ones(I1).*.(ik1-1)
+ else
+ I1=dims1(k)*I1+ik1-1
+ end
+ else
+ I1=dims1(k)*I1+ik1-1
+ end
+ end
+ end
+ v1=zeros(prod(dims1),1)
+ v1(I1+1)=v;v=v1
+ end
+ v(I+1)=matrix(N,-1,1)
+ if del then
+ if size(count,"*")>1 then
+ error(msprintf(_("%s: A null assignment can have only one non-colon index.\n"),"%s_i_s"));
+ end
+ dims1(count)=dims1(count)-nk
+ end
+
+ while dims1($)==1 then dims1($)=[],end
+ select size(dims1,"*")
+ case 0
+ M=v
+ case 1
+ M=v
+ case 2
+ M=matrix(v,dims1(1),dims1(2))
+ else
+ M=mlist(["hm","dims","entries"],int32(matrix(dims1,1,-1)),v)
+ end
+endfunction
diff --git a/modules/overloading/macros/%s_i_sp.bin b/modules/overloading/macros/%s_i_sp.bin
new file mode 100755
index 000000000..8edeb1ff5
--- /dev/null
+++ b/modules/overloading/macros/%s_i_sp.bin
Binary files differ
diff --git a/modules/overloading/macros/%s_i_sp.sci b/modules/overloading/macros/%s_i_sp.sci
new file mode 100755
index 000000000..f38e3e909
--- /dev/null
+++ b/modules/overloading/macros/%s_i_sp.sci
@@ -0,0 +1,21 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function a=%s_i_sp(i,j,b,a)
+
+ [lhs,rhs]=argn(0)
+ if rhs==3 then
+ a=b;
+ b=j;
+ [m,n]=size(a)
+ a=a(:)
+ a(i)=b(:)
+ a=matrix(a,m,n)
+ end
+endfunction
diff --git a/modules/overloading/macros/%s_i_spb.bin b/modules/overloading/macros/%s_i_spb.bin
new file mode 100755
index 000000000..e1a447a3d
--- /dev/null
+++ b/modules/overloading/macros/%s_i_spb.bin
Binary files differ
diff --git a/modules/overloading/macros/%s_i_spb.sci b/modules/overloading/macros/%s_i_spb.sci
new file mode 100755
index 000000000..be9db324a
--- /dev/null
+++ b/modules/overloading/macros/%s_i_spb.sci
@@ -0,0 +1,24 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function M=%s_i_spb(varargin)
+
+ [lhs,rhs]=argn(0)
+ M=bool2s(varargin(rhs))
+ N=varargin(rhs-1)//inserted matrix
+ if rhs<=4 then
+ if rhs==3 then
+ M(varargin(1))=N
+ else
+ M(varargin(1),varargin(2))=N
+ end
+ return
+ end
+
+endfunction
diff --git a/modules/overloading/macros/%s_i_st.bin b/modules/overloading/macros/%s_i_st.bin
new file mode 100755
index 000000000..82901c75e
--- /dev/null
+++ b/modules/overloading/macros/%s_i_st.bin
Binary files differ
diff --git a/modules/overloading/macros/%s_i_st.sci b/modules/overloading/macros/%s_i_st.sci
new file mode 100755
index 000000000..ce9bd7f2a
--- /dev/null
+++ b/modules/overloading/macros/%s_i_st.sci
@@ -0,0 +1,95 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2010 - INRIA - Serge Steer <serge.steer@inria.fr>
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function out=%s_i_st(varargin)
+
+ // - Modified by Vincent COUVERT (16/08/2004) so that insertion of an empty matrix
+ // is understood as an element deletion
+ // Only one non-colon index can be used
+ // - Modified by Serge Steer INRIA (04/05/2010) to fix problems in element
+ // deletion part
+
+ if size(varargin)>=3 & isempty(varargin($-1)) & ..
+ and(type(varargin(1))<>[10 15]) then
+ // st(i,:)=[] or st(:,j)=[] or st(i)=[] or st(:,j,:,:)=[]
+ //remove the substruct
+ out=varargin($);
+ dims=double(out.dims);
+
+ // Make the dimensions and the indices fit
+ Ndims=size(dims,"*")
+ nindex=size(varargin)-2
+ if nindex>Ndims then
+ //index in excess must be equal to 1 or to :
+ for k=Ndims+1:nindex
+ i=varargin(k)
+ if size(i,"*")>1|(i<>1&i<>eye()) then
+ error(msprintf(_("%s: A null assignment can have only one non-colon index.\n"),"%s_i_st"));
+ end
+ end
+ nindex=Ndims
+ elseif nindex<Ndims then
+ //collapse dimensions in excess
+ dims=[dims(1:nindex-1) prod(dims(nindex:$))]
+ Ndims=nindex;
+ if size(dims,"*")==1 then dims=[dims 1],end
+ end
+
+ // Check the compatibility of the index (at most one index cannot span
+ // all the elements ot the associated struct dimension)
+ cj=[];
+ for k=1:nindex
+ ind=varargin(k)
+ if or(size(ind)<>[-1 -1]) then
+ if or(type(ind)==[2,129]) then // size implicit index ($ based)
+ ind=horner(ind,dims(k));
+ end
+ ind=floor(ind);
+ //check if index is valid
+ if ~isreal(ind)|or(ind<=0) then
+ error(21)
+ end
+ //remove indices that exceed the associated struct dimension
+ ind(ind>dims(k))=[];
+ //compute the complement with respect to the associated dimension of st
+ ind=setdiff(1:dims(k),ind)
+ if ind<>[]&cj==[] then
+ cj=ind
+ loc=k,
+ else
+ error(msprintf(_("%s: A null assignment can have only one non-colon index.\n"),"%s_i_st"));
+ end
+ end
+ end
+
+ // Generate the result
+ if cj==[] then //st(:,:)=[] --> empty struct
+ Fout=getfield(1,out)
+ Fout=Fout(3:$)
+ for f=Fout
+ out(f)=list()
+ end
+ out.dims=int32([0 0])
+ else
+ //replace st(:,j,:,:)=[] by st=st(:,cj,:,:) where cj is the
+ //complement of j with respect to the associated dimension of st
+ out.dims=int32(dims)
+ varargin(loc)=cj
+ out=out(varargin(1:Ndims))
+ end
+
+ elseif lstsize(varargin)==3 & type(varargin(1))==10 then // out.i=in
+ i=varargin(1);
+ in=varargin(2);
+ out=varargin(3);
+ out=generic_i_st(i,in,out)
+ else
+ error(msprintf(_("%s: Not yet implemented.\n"),"%s_i_st"));
+ end
+endfunction
diff --git a/modules/overloading/macros/%s_k_hm.bin b/modules/overloading/macros/%s_k_hm.bin
new file mode 100755
index 000000000..1c5887d99
--- /dev/null
+++ b/modules/overloading/macros/%s_k_hm.bin
Binary files differ
diff --git a/modules/overloading/macros/%s_k_hm.sci b/modules/overloading/macros/%s_k_hm.sci
new file mode 100755
index 000000000..16c02fb62
--- /dev/null
+++ b/modules/overloading/macros/%s_k_hm.sci
@@ -0,0 +1,12 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2014 - Samuel GOUGEON
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function r = %s_k_hm(a, b)
+ r = %hmS_k_hmS_generic(a, b)
+endfunction
diff --git a/modules/overloading/macros/%s_k_p.bin b/modules/overloading/macros/%s_k_p.bin
new file mode 100755
index 000000000..066ad7442
--- /dev/null
+++ b/modules/overloading/macros/%s_k_p.bin
Binary files differ
diff --git a/modules/overloading/macros/%s_k_p.sci b/modules/overloading/macros/%s_k_p.sci
new file mode 100755
index 000000000..0b70ed68f
--- /dev/null
+++ b/modules/overloading/macros/%s_k_p.sci
@@ -0,0 +1,24 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function r=%s_k_p(a,b)
+ // a.*.b
+ [ma,na]=size(a)
+ [mb,nb]=size(b)
+ r=zeros(ma*mb,na*nb)
+ k=0
+ for j=1:na
+ l=0
+ for i=1:ma
+ r(l+(1:mb),k+(1:nb))=a(i,j)*b
+ l=l+mb
+ end
+ k=k+nb
+ end
+endfunction
diff --git a/modules/overloading/macros/%s_k_r.bin b/modules/overloading/macros/%s_k_r.bin
new file mode 100755
index 000000000..de08e16c4
--- /dev/null
+++ b/modules/overloading/macros/%s_k_r.bin
Binary files differ
diff --git a/modules/overloading/macros/%s_k_r.sci b/modules/overloading/macros/%s_k_r.sci
new file mode 100755
index 000000000..c2d99ae2b
--- /dev/null
+++ b/modules/overloading/macros/%s_k_r.sci
@@ -0,0 +1,25 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function r=%s_k_r(a,b)
+ // a.*.b
+
+ [ma,na]=size(a)
+ [mb,nb]=size(b)
+ r=zeros(ma*mb,na*nb)
+ k=0
+ for j=1:na
+ l=0
+ for i=1:ma
+ r(l+(1:mb),k+(1:nb))=a(i,j)*b
+ l=l+mb
+ end
+ k=k+nb
+ end
+endfunction
diff --git a/modules/overloading/macros/%s_k_sp.bin b/modules/overloading/macros/%s_k_sp.bin
new file mode 100755
index 000000000..275b5b595
--- /dev/null
+++ b/modules/overloading/macros/%s_k_sp.bin
Binary files differ
diff --git a/modules/overloading/macros/%s_k_sp.sci b/modules/overloading/macros/%s_k_sp.sci
new file mode 100755
index 000000000..dd846e499
--- /dev/null
+++ b/modules/overloading/macros/%s_k_sp.sci
@@ -0,0 +1,15 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function r=%s_k_sp(a,b)
+ // a.*.b with a full b sparse
+
+ if a==[] then r=[],return,end
+ r=sparse(a).*.b
+endfunction
diff --git a/modules/overloading/macros/%s_l_hm.bin b/modules/overloading/macros/%s_l_hm.bin
new file mode 100755
index 000000000..0a514ae70
--- /dev/null
+++ b/modules/overloading/macros/%s_l_hm.bin
Binary files differ
diff --git a/modules/overloading/macros/%s_l_hm.sci b/modules/overloading/macros/%s_l_hm.sci
new file mode 100755
index 000000000..815109c0a
--- /dev/null
+++ b/modules/overloading/macros/%s_l_hm.sci
@@ -0,0 +1,17 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function M2=%s_l_hm(M1,M2)
+
+ if size(M1,"*")<>1 then
+ M2=hypermat(size(M1),M1)\M2
+ else
+ M2.entries=M1\M2.entries
+ end
+endfunction
diff --git a/modules/overloading/macros/%s_l_lss.bin b/modules/overloading/macros/%s_l_lss.bin
new file mode 100755
index 000000000..3dd43335c
--- /dev/null
+++ b/modules/overloading/macros/%s_l_lss.bin
Binary files differ
diff --git a/modules/overloading/macros/%s_l_lss.sci b/modules/overloading/macros/%s_l_lss.sci
new file mode 100755
index 000000000..3727b044e
--- /dev/null
+++ b/modules/overloading/macros/%s_l_lss.sci
@@ -0,0 +1,15 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function s=%s_l_lss(s1,s2)
+ //
+ //!
+
+ s=inv(s1)*s2
+endfunction
diff --git a/modules/overloading/macros/%s_l_p.bin b/modules/overloading/macros/%s_l_p.bin
new file mode 100755
index 000000000..232352f30
--- /dev/null
+++ b/modules/overloading/macros/%s_l_p.bin
Binary files differ
diff --git a/modules/overloading/macros/%s_l_p.sci b/modules/overloading/macros/%s_l_p.sci
new file mode 100755
index 000000000..ec94bcc84
--- /dev/null
+++ b/modules/overloading/macros/%s_l_p.sci
@@ -0,0 +1,25 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function f=%s_l_p(m,p)
+ // m\p with p matrix of polynomials m matrix of scalar
+ //!
+
+ [l,c]=size(m)
+ [mp,np]=size(p);
+ if l==c then
+ f=inv(m)*p
+ else
+ s=poly(0,varn(p))
+ f=m\coeff(p,0)
+ for k=1:max(degree(p))
+ f=f+(m\coeff(p,k))*(s^k)
+ end
+ end
+endfunction
diff --git a/modules/overloading/macros/%s_l_r.bin b/modules/overloading/macros/%s_l_r.bin
new file mode 100755
index 000000000..d7b0465ba
--- /dev/null
+++ b/modules/overloading/macros/%s_l_r.bin
Binary files differ
diff --git a/modules/overloading/macros/%s_l_r.sci b/modules/overloading/macros/%s_l_r.sci
new file mode 100755
index 000000000..c1b00a0a6
--- /dev/null
+++ b/modules/overloading/macros/%s_l_r.sci
@@ -0,0 +1,33 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function b=%s_l_r(a,b)
+ // a\b a scalar matrix, b rational matrix
+ //!
+ if size(a,"*")==0 then b=[],return,end
+ if size(a,1)==-1 then a=a+0,end
+
+ [ma,na]=size(a);
+ if ma==1&na==1 then
+ b.num=a\b.num,
+ elseif size(b.num,1)==1 then
+ b=rlist(a\b.num,ones(na,ma)*b.den,b.dt)
+ else
+ [num,den]=b(["num","den"]);
+
+ dd=[];nn=[]
+ for j=1:size(num,2)
+ [y,fact]=lcm(den(:,j)),
+ nn=[nn,a\(num(:,j).*fact)];
+ dd=[dd y]
+ end
+ [num,den]=simp(nn,ones(na,1)*dd)
+ b=rlist(num,den,b.dt)
+ end
+endfunction
diff --git a/modules/overloading/macros/%s_l_s.bin b/modules/overloading/macros/%s_l_s.bin
new file mode 100755
index 000000000..9708e6cd4
--- /dev/null
+++ b/modules/overloading/macros/%s_l_s.bin
Binary files differ
diff --git a/modules/overloading/macros/%s_l_s.sci b/modules/overloading/macros/%s_l_s.sci
new file mode 100755
index 000000000..7e51179e9
--- /dev/null
+++ b/modules/overloading/macros/%s_l_s.sci
@@ -0,0 +1,14 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function R=%s_l_s(A,B)
+ // used to give a sense to operation like A\1 where A is a matrix
+ n=size(A,1)
+ R=A\(eye(n,n)*B)
+endfunction
diff --git a/modules/overloading/macros/%s_l_sp.bin b/modules/overloading/macros/%s_l_sp.bin
new file mode 100755
index 000000000..5e5e880e6
--- /dev/null
+++ b/modules/overloading/macros/%s_l_sp.bin
Binary files differ
diff --git a/modules/overloading/macros/%s_l_sp.sci b/modules/overloading/macros/%s_l_sp.sci
new file mode 100755
index 000000000..b89debb2a
--- /dev/null
+++ b/modules/overloading/macros/%s_l_sp.sci
@@ -0,0 +1,13 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function x=%s_l_sp(a,x)
+ // a^-1*x a full,x sparse
+ x=a\full(x)
+endfunction
diff --git a/modules/overloading/macros/%s_m_hm.bin b/modules/overloading/macros/%s_m_hm.bin
new file mode 100755
index 000000000..d119850f8
--- /dev/null
+++ b/modules/overloading/macros/%s_m_hm.bin
Binary files differ
diff --git a/modules/overloading/macros/%s_m_hm.sci b/modules/overloading/macros/%s_m_hm.sci
new file mode 100755
index 000000000..4c014cb43
--- /dev/null
+++ b/modules/overloading/macros/%s_m_hm.sci
@@ -0,0 +1,28 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function M2=%s_m_hm(M1,M2)
+
+ siz1 = size(M1);
+ siz2 = size(M2);
+
+ if size(M1,"*")<>1 then
+ if length(siz2)<>3 then
+ error(msprintf(_("%s: Wrong size for input argument #%d: 3D maximum expected.\n"),"%s_m_hm",2));
+ end
+ if siz1(2)<>siz2(1) then
+ error(msprintf(_("%s: Wrong size for argument: Incompatible dimensions.\n"),"s_m_hm"));
+ end
+ M2 = hypermat([siz2(1) siz2(2)*siz2(3)], M2);
+ M2 = hypermat([siz1(1) siz2(2) siz2(3)], M1*M2);
+ else
+ M2.entries = M1*M2.entries
+ end
+
+endfunction
diff --git a/modules/overloading/macros/%s_m_ip.bin b/modules/overloading/macros/%s_m_ip.bin
new file mode 100755
index 000000000..e617b1378
--- /dev/null
+++ b/modules/overloading/macros/%s_m_ip.bin
Binary files differ
diff --git a/modules/overloading/macros/%s_m_ip.sci b/modules/overloading/macros/%s_m_ip.sci
new file mode 100755
index 000000000..b7e3bb4be
--- /dev/null
+++ b/modules/overloading/macros/%s_m_ip.sci
@@ -0,0 +1,14 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function r=%s_m_ip(s,ip)
+ // s*ip
+ if size(s,"*")<>1 then error(10),end
+ r=(s*ip(1)):(s*ip(2)):(s*ip(3))
+endfunction
diff --git a/modules/overloading/macros/%s_m_lss.bin b/modules/overloading/macros/%s_m_lss.bin
new file mode 100755
index 000000000..d3f79b692
--- /dev/null
+++ b/modules/overloading/macros/%s_m_lss.bin
Binary files differ
diff --git a/modules/overloading/macros/%s_m_lss.sci b/modules/overloading/macros/%s_m_lss.sci
new file mode 100755
index 000000000..9a1010a64
--- /dev/null
+++ b/modules/overloading/macros/%s_m_lss.sci
@@ -0,0 +1,20 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA - Serge Steer
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function s=%s_m_lss(d1,s2)
+ // s=d1*s2
+ //!
+ [a2,b2,c2,d2,x2,dom2]=s2(2:7);
+ if prod(size(s2))==1 then
+ s=%lss_m_s(s2,d1);return; //transpose
+ end
+ d=d1*d2;
+ [a2;d1*c2];
+ s=tlist(["lss","A","B","C","D","X0","dt"],a2,b2,d1*c2,d,x2,dom2)
+endfunction
diff --git a/modules/overloading/macros/%s_m_r.bin b/modules/overloading/macros/%s_m_r.bin
new file mode 100755
index 000000000..f05a9b379
--- /dev/null
+++ b/modules/overloading/macros/%s_m_r.bin
Binary files differ
diff --git a/modules/overloading/macros/%s_m_r.sci b/modules/overloading/macros/%s_m_r.sci
new file mode 100755
index 000000000..6365ee37f
--- /dev/null
+++ b/modules/overloading/macros/%s_m_r.sci
@@ -0,0 +1,57 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function f2=%s_m_r(n1,f2)
+ // %s_m_r(n1,f2)
+ //operation f2=n1*f2
+ //author Serge Steer INRIA
+ //!
+ [n2,d2]=f2(["num","den"]);
+ sz1=size(n1);sz2=size(n2);
+ if prod(sz1)==0|prod(sz2)==0 then f2=[],return,end
+
+
+ indef=%f
+ if or(sz1==-1) then
+ n1=n1+0;sz1=[1 1];
+ if prod(sz2)==1 then indef=%t,else error(14),end
+ end
+ if or(sz2==-1) then
+ n2=n2+0;d2=d2+0;sz2=[1 1];
+ if prod(sz1)==1 then indef=%t,else error(14),end
+ end
+
+ //
+ if prod(sz1)==1 then
+ num=n1*n2,
+ den=d2
+ elseif prod(sz2)==1 then
+ num=n1*n2,
+ den=d2(ones(n1))
+ else,
+ if size(sz1,"*")>2|size(sz2,"*")>2 then error(10),end
+ if sz1(2)<>sz2(1) then error(10),end,
+ l1=sz1(1);m1=sz1(2);m2=sz2(2);
+ for j=1:m2,
+ [y,fact]=lcm(d2(:,j)),
+ n2(:,j)=n2(:,j).*fact,
+ den(1:l1,j)=ones(l1,1)*y,
+ for i=1:l1,
+ num(i,j)=n1(i,:)*n2(:,j),
+ end,
+ end,
+ [num,den]=simp(num,den),
+ end,
+
+ if indef then
+ num=num*eye()
+ den=den*eye()
+ end
+ f2=rlist(num,den,f2.dt)
+endfunction
diff --git a/modules/overloading/macros/%s_matrix.bin b/modules/overloading/macros/%s_matrix.bin
new file mode 100755
index 000000000..3b27026b1
--- /dev/null
+++ b/modules/overloading/macros/%s_matrix.bin
Binary files differ
diff --git a/modules/overloading/macros/%s_matrix.sci b/modules/overloading/macros/%s_matrix.sci
new file mode 100755
index 000000000..e57fb121a
--- /dev/null
+++ b/modules/overloading/macros/%s_matrix.sci
@@ -0,0 +1,12 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function y=%s_matrix(a,varargin)
+ y=%hm_matrix(a,varargin(:))
+endfunction
diff --git a/modules/overloading/macros/%s_n_hm.bin b/modules/overloading/macros/%s_n_hm.bin
new file mode 100755
index 000000000..e71351b30
--- /dev/null
+++ b/modules/overloading/macros/%s_n_hm.bin
Binary files differ
diff --git a/modules/overloading/macros/%s_n_hm.sci b/modules/overloading/macros/%s_n_hm.sci
new file mode 100755
index 000000000..8c02ec847
--- /dev/null
+++ b/modules/overloading/macros/%s_n_hm.sci
@@ -0,0 +1,16 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function M=%s_n_hm(s,M)
+ //s<>M
+ if size(s,"*")<> 1 then
+ M=%t;return
+ end
+ M("entries")=s<>M("entries")
+endfunction
diff --git a/modules/overloading/macros/%s_n_l.bin b/modules/overloading/macros/%s_n_l.bin
new file mode 100755
index 000000000..06c5757ee
--- /dev/null
+++ b/modules/overloading/macros/%s_n_l.bin
Binary files differ
diff --git a/modules/overloading/macros/%s_n_l.sci b/modules/overloading/macros/%s_n_l.sci
new file mode 100755
index 000000000..9729a50f0
--- /dev/null
+++ b/modules/overloading/macros/%s_n_l.sci
@@ -0,0 +1,14 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function [r]=%s_n_l(l1,l2)
+ //r=(l1==l2) constant == list
+ //!
+ r=%t
+endfunction
diff --git a/modules/overloading/macros/%s_n_lss.bin b/modules/overloading/macros/%s_n_lss.bin
new file mode 100755
index 000000000..8692c6f7f
--- /dev/null
+++ b/modules/overloading/macros/%s_n_lss.bin
Binary files differ
diff --git a/modules/overloading/macros/%s_n_lss.sci b/modules/overloading/macros/%s_n_lss.sci
new file mode 100755
index 000000000..acf1c93b1
--- /dev/null
+++ b/modules/overloading/macros/%s_n_lss.sci
@@ -0,0 +1,14 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function [r]=%s_n_lss(s1,s2)
+ //%s_n_lss(s1,s2) <=> s1<>s2 gain<>state-space
+ //!
+ r=s2(2)<>[]|s2(5)<>s1
+endfunction
diff --git a/modules/overloading/macros/%s_n_r.bin b/modules/overloading/macros/%s_n_r.bin
new file mode 100755
index 000000000..b3f1e6901
--- /dev/null
+++ b/modules/overloading/macros/%s_n_r.bin
Binary files differ
diff --git a/modules/overloading/macros/%s_n_r.sci b/modules/overloading/macros/%s_n_r.sci
new file mode 100755
index 000000000..1aadcf282
--- /dev/null
+++ b/modules/overloading/macros/%s_n_r.sci
@@ -0,0 +1,18 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function [r]=%s_n_r(l1,l2)
+ //%s_n_r(l1,l2) <=> l1<>l2 l1 constant l2 rational
+ // et l2 une fraction rationnelle
+ //!
+
+ r=degree(l2("num"))==0&degree(l2("den"))==0
+ if r then r=coeff(l2("num"))./coeff(l2("den"))==l1,end
+ r=~r
+endfunction
diff --git a/modules/overloading/macros/%s_n_st.bin b/modules/overloading/macros/%s_n_st.bin
new file mode 100755
index 000000000..2aa196398
--- /dev/null
+++ b/modules/overloading/macros/%s_n_st.bin
Binary files differ
diff --git a/modules/overloading/macros/%s_n_st.sci b/modules/overloading/macros/%s_n_st.sci
new file mode 100755
index 000000000..debd42894
--- /dev/null
+++ b/modules/overloading/macros/%s_n_st.sci
@@ -0,0 +1,14 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA, Serge Steer
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function r=%s_n_st(a,b)
+ // implements r=a~=b
+ // for a a matrix of floating point numbers and b= struct
+ r=%t
+endfunction
diff --git a/modules/overloading/macros/%s_o_hm.bin b/modules/overloading/macros/%s_o_hm.bin
new file mode 100755
index 000000000..678b5f0fd
--- /dev/null
+++ b/modules/overloading/macros/%s_o_hm.bin
Binary files differ
diff --git a/modules/overloading/macros/%s_o_hm.sci b/modules/overloading/macros/%s_o_hm.sci
new file mode 100755
index 000000000..8f8b63908
--- /dev/null
+++ b/modules/overloading/macros/%s_o_hm.sci
@@ -0,0 +1,17 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function M=%s_o_hm(s,M)
+
+ //s==M
+ if size(s,"*")<> 1 then
+ M=%f;return
+ end
+ M("entries")=s==M("entries")
+endfunction
diff --git a/modules/overloading/macros/%s_o_l.bin b/modules/overloading/macros/%s_o_l.bin
new file mode 100755
index 000000000..25ba8defa
--- /dev/null
+++ b/modules/overloading/macros/%s_o_l.bin
Binary files differ
diff --git a/modules/overloading/macros/%s_o_l.sci b/modules/overloading/macros/%s_o_l.sci
new file mode 100755
index 000000000..f09a76f74
--- /dev/null
+++ b/modules/overloading/macros/%s_o_l.sci
@@ -0,0 +1,14 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function [r]=%s_o_l(l1,l2)
+ //%s_o_l(l1,l2) constant==list
+ //!
+ r=%f
+endfunction
diff --git a/modules/overloading/macros/%s_o_lss.bin b/modules/overloading/macros/%s_o_lss.bin
new file mode 100755
index 000000000..44ebebfcc
--- /dev/null
+++ b/modules/overloading/macros/%s_o_lss.bin
Binary files differ
diff --git a/modules/overloading/macros/%s_o_lss.sci b/modules/overloading/macros/%s_o_lss.sci
new file mode 100755
index 000000000..0928484ee
--- /dev/null
+++ b/modules/overloading/macros/%s_o_lss.sci
@@ -0,0 +1,15 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function [r]=%s_o_lss(s1,s2)
+ //%s_o_lss(s1,s2) constant==state-space
+ //!
+
+ r=s2(2)==[]&s2(5)==s1
+endfunction
diff --git a/modules/overloading/macros/%s_o_r.bin b/modules/overloading/macros/%s_o_r.bin
new file mode 100755
index 000000000..609e1ea8f
--- /dev/null
+++ b/modules/overloading/macros/%s_o_r.bin
Binary files differ
diff --git a/modules/overloading/macros/%s_o_r.sci b/modules/overloading/macros/%s_o_r.sci
new file mode 100755
index 000000000..8f76e1cb7
--- /dev/null
+++ b/modules/overloading/macros/%s_o_r.sci
@@ -0,0 +1,15 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function [r]=%s_o_r(l1,l2)
+ //%s_o_r(l1,l2) constant==rational
+ //!
+ r=degree(l2("num"))==0&degree(l2("den"))==0
+ if r then r=coeff(l2("num"))./coeff(l2("den"))==l1,end
+endfunction
diff --git a/modules/overloading/macros/%s_o_st.bin b/modules/overloading/macros/%s_o_st.bin
new file mode 100755
index 000000000..8a0aea6f9
--- /dev/null
+++ b/modules/overloading/macros/%s_o_st.bin
Binary files differ
diff --git a/modules/overloading/macros/%s_o_st.sci b/modules/overloading/macros/%s_o_st.sci
new file mode 100755
index 000000000..316e7c3ac
--- /dev/null
+++ b/modules/overloading/macros/%s_o_st.sci
@@ -0,0 +1,14 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA, Serge Steer
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function r=%s_o_st(a,b)
+ // implements r=a==b
+ // for a a matrix of floating point numbers and b= struct
+ r=%f
+endfunction
diff --git a/modules/overloading/macros/%s_or.bin b/modules/overloading/macros/%s_or.bin
new file mode 100755
index 000000000..66e4985ac
--- /dev/null
+++ b/modules/overloading/macros/%s_or.bin
Binary files differ
diff --git a/modules/overloading/macros/%s_or.sci b/modules/overloading/macros/%s_or.sci
new file mode 100755
index 000000000..b5376acf4
--- /dev/null
+++ b/modules/overloading/macros/%s_or.sci
@@ -0,0 +1,21 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function x=%s_or(a,flag)
+ // or(a) returns the logical OR
+ // for scalar matrices, an entry is TRUE if it is not zero.
+ //!
+ if argn(2)==1 then flag="*",end
+ if flag=="*" then
+ x=find(abs(a)>0,1)<>[]
+ else
+ if a==[] then x=[],return,end
+ x=sum(bool2s(a),flag)>=1
+ end
+endfunction
diff --git a/modules/overloading/macros/%s_pow.bin b/modules/overloading/macros/%s_pow.bin
new file mode 100755
index 000000000..9b75e7040
--- /dev/null
+++ b/modules/overloading/macros/%s_pow.bin
Binary files differ
diff --git a/modules/overloading/macros/%s_pow.sci b/modules/overloading/macros/%s_pow.sci
new file mode 100755
index 000000000..122d21277
--- /dev/null
+++ b/modules/overloading/macros/%s_pow.sci
@@ -0,0 +1,72 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function x=%s_pow(a,p)
+ // g_pow - A^p special cases
+ //%CALLING SEQUENCE
+ // X=g_pow(A,p)
+ //%PARAMETERS
+ // A : constant or square hermitian or diagonalizable matrix
+ // X : square matrix
+ // p : square matrix or scalar
+ //%DESCRIPTION
+ //This function is called by the operation ^ to compute A^p in special cases
+ // - A scalar and p square matrix
+ // - A square matrix p is not an integer
+ //!
+ [m,n]=size(a)
+ [mp,np]=size(p)
+ if m*n==1&mp==np then //a^P
+ flag=or(p<>p')
+ r=and(imag(p)==0)&imag(a)==0
+ if ~flag then
+ //Hermitian matrix
+ [u,s]=schur(p);
+ w=a.^diag(s);
+ x=u*diag(a.^diag(s))*u';
+ if r then
+ x=real(x)
+ end
+ else
+ [s,u,bs]=bdiag(p+0*%i);
+ if max(bs)>1 then
+ error(msprintf(_("%s: Unable to diagonalize.\n"),"%s_pow"));
+ end
+ w=diag(s);
+ x=u*diag(a.^diag(s))*inv(u);
+ end
+ if r then x=real(x), end
+ elseif m==n&mp*np==1 then //A^p p non integer
+ flag=or(a<>a')
+ if ~flag then
+ //Hermitian matrix
+ r=and(imag(a)==0)
+ [u,s]=schur(a);
+ x=u*diag(diag(s).^p)*u';
+ if r then
+ if s>=0&imag(p)==0 then
+ x=real(x)
+ end
+ end
+ else
+ //General matrix
+ r=and(imag(a)==0)
+ [s,u,bs]=bdiag(a+0*%i);
+ if max(bs)>1 then
+ error(msprintf(_("%s: Unable to diagonalize.\n"),"%s_pow"));
+ end
+ x=u*diag(diag(s).^p)*inv(u);
+ end
+ if int(p)==p & real(p)==p & r then
+ x=real(x);
+ end
+ else
+ error(43)
+ end
+endfunction
diff --git a/modules/overloading/macros/%s_q_hm.bin b/modules/overloading/macros/%s_q_hm.bin
new file mode 100755
index 000000000..1f2212e04
--- /dev/null
+++ b/modules/overloading/macros/%s_q_hm.bin
Binary files differ
diff --git a/modules/overloading/macros/%s_q_hm.sci b/modules/overloading/macros/%s_q_hm.sci
new file mode 100755
index 000000000..48230302a
--- /dev/null
+++ b/modules/overloading/macros/%s_q_hm.sci
@@ -0,0 +1,17 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function M2=%s_q_hm(M1,M2)
+
+ if size(M1,"*")<>1 then
+ error(msprintf(_("%s: Wrong size for input argument #%d.\n"),"%s_q_hm",1));
+ else
+ M2("entries")=M1.\M2("entries")
+ end
+endfunction
diff --git a/modules/overloading/macros/%s_q_p.bin b/modules/overloading/macros/%s_q_p.bin
new file mode 100755
index 000000000..b65fe2397
--- /dev/null
+++ b/modules/overloading/macros/%s_q_p.bin
Binary files differ
diff --git a/modules/overloading/macros/%s_q_p.sci b/modules/overloading/macros/%s_q_p.sci
new file mode 100755
index 000000000..1269ad511
--- /dev/null
+++ b/modules/overloading/macros/%s_q_p.sci
@@ -0,0 +1,20 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function [z]=%s_q_p(x,y)
+ //z = x .\ y special cases
+ // and other matrix polynomial
+
+ [m,n]=size(x)
+ if m*n==1 then
+ z=x*ones(y).\y
+ else
+ z=x.\y*ones(x)
+ end
+endfunction
diff --git a/modules/overloading/macros/%s_q_r.bin b/modules/overloading/macros/%s_q_r.bin
new file mode 100755
index 000000000..989ae5fd4
--- /dev/null
+++ b/modules/overloading/macros/%s_q_r.bin
Binary files differ
diff --git a/modules/overloading/macros/%s_q_r.sci b/modules/overloading/macros/%s_q_r.sci
new file mode 100755
index 000000000..5fabed54c
--- /dev/null
+++ b/modules/overloading/macros/%s_q_r.sci
@@ -0,0 +1,16 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function f=%s_q_r(s,f)
+ // %s_q_r(s,f) f= s./f
+ //!
+
+ if size(s,"*")==0 then f=[],return,end
+ f=rlist(f("num")./s,f("den").*ones(s),f("dt")),
+endfunction
diff --git a/modules/overloading/macros/%s_q_sp.bin b/modules/overloading/macros/%s_q_sp.bin
new file mode 100755
index 000000000..4dec02ff0
--- /dev/null
+++ b/modules/overloading/macros/%s_q_sp.bin
Binary files differ
diff --git a/modules/overloading/macros/%s_q_sp.sci b/modules/overloading/macros/%s_q_sp.sci
new file mode 100755
index 000000000..19c493aac
--- /dev/null
+++ b/modules/overloading/macros/%s_q_sp.sci
@@ -0,0 +1,14 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function r=%s_q_sp(a,b)
+ //r=a.\b
+
+ r=a.\full(b)
+endfunction
diff --git a/modules/overloading/macros/%s_r_lss.bin b/modules/overloading/macros/%s_r_lss.bin
new file mode 100755
index 000000000..e5132019f
--- /dev/null
+++ b/modules/overloading/macros/%s_r_lss.bin
Binary files differ
diff --git a/modules/overloading/macros/%s_r_lss.sci b/modules/overloading/macros/%s_r_lss.sci
new file mode 100755
index 000000000..81ac5ef61
--- /dev/null
+++ b/modules/overloading/macros/%s_r_lss.sci
@@ -0,0 +1,16 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA - Serge Steer
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function [sr]=%s_r_lss(p,s)
+ // sr=%s_r_lss(p,s) ou sr=p/s
+ // s : syslin list
+ // p : constant matrix
+ //!
+ sr=tlist(["lss","A","B","C","D","X0","dt"],[],[],[],p,[],[])/s
+endfunction
diff --git a/modules/overloading/macros/%s_r_p.bin b/modules/overloading/macros/%s_r_p.bin
new file mode 100755
index 000000000..a57b9e292
--- /dev/null
+++ b/modules/overloading/macros/%s_r_p.bin
Binary files differ
diff --git a/modules/overloading/macros/%s_r_p.sci b/modules/overloading/macros/%s_r_p.sci
new file mode 100755
index 000000000..2f822e687
--- /dev/null
+++ b/modules/overloading/macros/%s_r_p.sci
@@ -0,0 +1,27 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function f=%s_r_p(m,p)
+ //f=M/p M:scalar matrix p=polynomial
+ //!
+
+
+ [mp,np]=size(p)
+ if mp*np<>1 then
+ f=m*invr(p),
+ else
+ [l,c]=size(m)
+ if m<>[] then m=m+poly(0,varn(p),"c"),end
+ if mp==-1&l*c==1|l==-1 then
+ f=rlist(m,p*eye(),[])
+ else
+ f=simp(rlist(m,p*ones(l,c),[]))
+ end
+ end
+endfunction
diff --git a/modules/overloading/macros/%s_r_r.bin b/modules/overloading/macros/%s_r_r.bin
new file mode 100755
index 000000000..8e382be2d
--- /dev/null
+++ b/modules/overloading/macros/%s_r_r.bin
Binary files differ
diff --git a/modules/overloading/macros/%s_r_r.sci b/modules/overloading/macros/%s_r_r.sci
new file mode 100755
index 000000000..857f2d4b1
--- /dev/null
+++ b/modules/overloading/macros/%s_r_r.sci
@@ -0,0 +1,16 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function f=%s_r_r(m,f)
+ // %s_r_r(m,r) <=> m/f constant/rational
+ //!
+
+ if prod(size(f("num")))<>1 then f=m*invr(f),return,end
+ f=simp(rlist(m*f("den"),ones(m)*f("num"),f("dt")))
+endfunction
diff --git a/modules/overloading/macros/%s_r_s.bin b/modules/overloading/macros/%s_r_s.bin
new file mode 100755
index 000000000..ff9cd826e
--- /dev/null
+++ b/modules/overloading/macros/%s_r_s.bin
Binary files differ
diff --git a/modules/overloading/macros/%s_r_s.sci b/modules/overloading/macros/%s_r_s.sci
new file mode 100755
index 000000000..92583617b
--- /dev/null
+++ b/modules/overloading/macros/%s_r_s.sci
@@ -0,0 +1,14 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function R=%s_r_s(B,A)
+ // used to give a sense to operation like 1/A where A is a matrix
+ n=size(A,2)
+ R=(B*eye(n,n))/A
+endfunction
diff --git a/modules/overloading/macros/%s_r_sp.bin b/modules/overloading/macros/%s_r_sp.bin
new file mode 100755
index 000000000..70a2ce678
--- /dev/null
+++ b/modules/overloading/macros/%s_r_sp.bin
Binary files differ
diff --git a/modules/overloading/macros/%s_r_sp.sci b/modules/overloading/macros/%s_r_sp.sci
new file mode 100755
index 000000000..735c9d15b
--- /dev/null
+++ b/modules/overloading/macros/%s_r_sp.sci
@@ -0,0 +1,40 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function x=%s_r_sp(a,b)
+ // a/b , a full b sparse
+
+ [ma,na]=size(a)
+ [mb,nb]=size(b)
+ if ma*na==1 then x=(a*speye(nb,nb))/b,return;end
+ //if mb*nb==1 then x=a/full(b),return,end //hard coded case
+ if na<>nb then error(11),end
+
+ if mb<>nb then a=a*b';b=b*b';end
+
+ if isreal(a)&isreal(b) then
+ [h,rk]=lufact(b')
+ if rk<min(mb,nb) then warning("deficient rank: rank = "+string(rk)),end
+ x=[]
+ for k=1:ma
+ x=[x;lusolve(h,a(k,:)')']
+ end
+ ludel(h)
+ else
+ b=b';a=a'
+ [h,rk]=lufact([real(b) -imag(b);imag(b) real(b)])
+ if rk<2*min(mb,nb) then warning("deficient rank: rank = "+string(rk/2)),end
+ x=[]
+ for k=1:ma
+ x=[x lusolve(h,[real(a(:,k));imag(a(:,k))])]
+ end
+ x=(x(1:$/2,:)+%i*x($/2+1:$,:))'
+ ludel(h)
+ end
+endfunction
diff --git a/modules/overloading/macros/%s_s_hm.bin b/modules/overloading/macros/%s_s_hm.bin
new file mode 100755
index 000000000..e5ee2064d
--- /dev/null
+++ b/modules/overloading/macros/%s_s_hm.bin
Binary files differ
diff --git a/modules/overloading/macros/%s_s_hm.sci b/modules/overloading/macros/%s_s_hm.sci
new file mode 100755
index 000000000..d211d02a5
--- /dev/null
+++ b/modules/overloading/macros/%s_s_hm.sci
@@ -0,0 +1,25 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA/ENPC
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function M2=%s_s_hm(M1,M2)
+
+ // scalar -hypermatrix
+ if and(size(M1)==[1 1]) then
+ M2.entries=M1-M2.entries
+ else
+ dims1=size(M1)';
+ dims2=matrix(M2.dims,-1,1)
+ dims1(3:size(dims2,"*"))=1
+ if and(dims1==dims2) then //should not occur
+ M2.entries=matrix(M1,-1,1)-M2.entries
+ else
+ error(9)
+ end
+ end
+endfunction
diff --git a/modules/overloading/macros/%s_s_ip.bin b/modules/overloading/macros/%s_s_ip.bin
new file mode 100755
index 000000000..49b60369d
--- /dev/null
+++ b/modules/overloading/macros/%s_s_ip.bin
Binary files differ
diff --git a/modules/overloading/macros/%s_s_ip.sci b/modules/overloading/macros/%s_s_ip.sci
new file mode 100755
index 000000000..bd839a25b
--- /dev/null
+++ b/modules/overloading/macros/%s_s_ip.sci
@@ -0,0 +1,14 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function r=%s_s_ip(s,ip)
+ // s-ip
+ if size(s,"*")<>1 then error(10),end
+ r=(s-ip(1)):(s-ip(2)):(s-ip(3))
+endfunction
diff --git a/modules/overloading/macros/%s_s_lss.bin b/modules/overloading/macros/%s_s_lss.bin
new file mode 100755
index 000000000..1bb8cba0a
--- /dev/null
+++ b/modules/overloading/macros/%s_s_lss.bin
Binary files differ
diff --git a/modules/overloading/macros/%s_s_lss.sci b/modules/overloading/macros/%s_s_lss.sci
new file mode 100755
index 000000000..d8cd5bf9f
--- /dev/null
+++ b/modules/overloading/macros/%s_s_lss.sci
@@ -0,0 +1,14 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function s=%s_s_lss(d1,s2)
+ //s=d1-s2
+ [a2,b2,c2,d2,x2,dom2]=s2(2:7),
+ s=tlist(["lss","A","B","C","D","X0","dt"],a2,-b2,c2,d1-d2,x2,dom2),
+endfunction
diff --git a/modules/overloading/macros/%s_s_r.bin b/modules/overloading/macros/%s_s_r.bin
new file mode 100755
index 000000000..94d5e61de
--- /dev/null
+++ b/modules/overloading/macros/%s_s_r.bin
Binary files differ
diff --git a/modules/overloading/macros/%s_s_r.sci b/modules/overloading/macros/%s_s_r.sci
new file mode 100755
index 000000000..4c910c5e0
--- /dev/null
+++ b/modules/overloading/macros/%s_s_r.sci
@@ -0,0 +1,44 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+function f=%s_s_r(m,f)
+ //f= m-f
+ //author Serge Steer INRIA
+ //!
+ [num,den]=f(["num","den"])
+ szf=size(den)
+ szm=size(m)
+
+ if and(szf>=0)&and(szm>=0) then
+ if prod(szf)==1&prod(szm)>1 then
+ den=den(ones(m))
+ szf=szm
+ end
+
+ if size(szf,"*")>2 then
+ num=num(:);den=den(:);m=m(:)
+ end
+ [num,den]=simp(-num+m.*den,den)
+ num=matrix(num,szf)
+ den=matrix(den,szf)
+ else
+ //at leat one matrix is eye*x
+ if size(szf,"*")>2|size(szm,"*")>2 then
+ error(9)
+ end
+ if or(szf<0)&or(szm<0) then
+ [num,den]=simp(-num+m.*den,den)
+ elseif or(szf<0) then
+ [num,den]=simp(-num+m.*den,den*ones(m))
+ elseif or(szm<0) then
+ [num,den]=simp(-num+(m+0)*eye(den).*den,den)
+ end
+ end
+ f=rlist(num,den,f.dt)
+endfunction
+
diff --git a/modules/overloading/macros/%s_s_sp.bin b/modules/overloading/macros/%s_s_sp.bin
new file mode 100755
index 000000000..942cb8868
--- /dev/null
+++ b/modules/overloading/macros/%s_s_sp.bin
Binary files differ
diff --git a/modules/overloading/macros/%s_s_sp.sci b/modules/overloading/macros/%s_s_sp.sci
new file mode 100755
index 000000000..02c5e16fa
--- /dev/null
+++ b/modules/overloading/macros/%s_s_sp.sci
@@ -0,0 +1,21 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function s=%s_s_sp(a,b)
+ // %s_s_sp - subtract a sparse matrix b to a scalar matrix a
+ //!
+
+ if size(a)==[-1,-1] then
+ //eye+b
+ [m,n]=size(b)
+ s=(0+a)*speye(m,n)-b
+ else
+ s=a-full(b)
+ end
+endfunction
diff --git a/modules/overloading/macros/%s_simp.bin b/modules/overloading/macros/%s_simp.bin
new file mode 100755
index 000000000..3b4778640
--- /dev/null
+++ b/modules/overloading/macros/%s_simp.bin
Binary files differ
diff --git a/modules/overloading/macros/%s_simp.sci b/modules/overloading/macros/%s_simp.sci
new file mode 100755
index 000000000..36bb9a456
--- /dev/null
+++ b/modules/overloading/macros/%s_simp.sci
@@ -0,0 +1,13 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function [num,den]=%s_simp(num,den)
+ // implement complex case
+
+endfunction
diff --git a/modules/overloading/macros/%s_v_lss.bin b/modules/overloading/macros/%s_v_lss.bin
new file mode 100755
index 000000000..9bfd4c453
--- /dev/null
+++ b/modules/overloading/macros/%s_v_lss.bin
Binary files differ
diff --git a/modules/overloading/macros/%s_v_lss.sci b/modules/overloading/macros/%s_v_lss.sci
new file mode 100755
index 000000000..ff00b4e14
--- /dev/null
+++ b/modules/overloading/macros/%s_v_lss.sci
@@ -0,0 +1,17 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA - Serge Steer
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function s=%s_v_lss(d1,s2)
+ //s=%s_v_lss(d1,s2) <=> s=d1/.s2
+ [a2,b2,c2,d2,x2,dom2]=s2(2:7)
+ e12=1/(eye()+d2*d1)
+ e21=eye()-d1*e12*d2;b21=b2*e21
+ s=tlist(["lss","A","B","C","D","X0","dt"],a2-b21*d1*c2,b21*d1,...
+ -e21*d1*c2,e21*d1,x2,dom2)
+endfunction
diff --git a/modules/overloading/macros/%s_v_p.bin b/modules/overloading/macros/%s_v_p.bin
new file mode 100755
index 000000000..c63a73499
--- /dev/null
+++ b/modules/overloading/macros/%s_v_p.bin
Binary files differ
diff --git a/modules/overloading/macros/%s_v_p.sci b/modules/overloading/macros/%s_v_p.sci
new file mode 100755
index 000000000..8cfd08943
--- /dev/null
+++ b/modules/overloading/macros/%s_v_p.sci
@@ -0,0 +1,14 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function h=%s_v_p(s,p)
+ //!
+
+ h=s/(1+s*p)
+endfunction
diff --git a/modules/overloading/macros/%s_v_r.bin b/modules/overloading/macros/%s_v_r.bin
new file mode 100755
index 000000000..a68a6c20d
--- /dev/null
+++ b/modules/overloading/macros/%s_v_r.bin
Binary files differ
diff --git a/modules/overloading/macros/%s_v_r.sci b/modules/overloading/macros/%s_v_r.sci
new file mode 100755
index 000000000..acd03addb
--- /dev/null
+++ b/modules/overloading/macros/%s_v_r.sci
@@ -0,0 +1,22 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function h=%s_v_r(h1,h2)
+ // %s_v_r(h1,h2) = (I+h1*h2)\h1. h1 constant h2 rational
+ //!
+
+ [m1,n1]=size(h1)
+ [m2,n2]=size(h2("num"))
+ if abs(n1-m2)+abs(m1-n2)<>0 then error(msprintf(_("%s: Wrong size for input argument(s).\n"),"%s_v_r")),end
+ if m1*n1==1 then
+ h=h2;h("num")=h1*h2("den");h("den")=h1*h2("num")+h2("den");
+ else
+ h=(eye(m1,m1)+h1*h2)\h1
+ end
+endfunction
diff --git a/modules/overloading/macros/%s_v_s.bin b/modules/overloading/macros/%s_v_s.bin
new file mode 100755
index 000000000..c10a2d40f
--- /dev/null
+++ b/modules/overloading/macros/%s_v_s.bin
Binary files differ
diff --git a/modules/overloading/macros/%s_v_s.sci b/modules/overloading/macros/%s_v_s.sci
new file mode 100755
index 000000000..27154bca5
--- /dev/null
+++ b/modules/overloading/macros/%s_v_s.sci
@@ -0,0 +1,17 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function [h]=%s_v_s(h1,h2)
+ // %s_v_s(h1,h2) <=> h =(I+h1*h2)\h1 <=> h=h1/.h2
+
+ [m1,n1]=size(h1)
+ [m2,n2]=size(h2)
+ if abs(n1-m2)+abs(m1-n2)<>0 then error(msprintf(_("%s: Wrong size for input argument(s).\n"),"%s_v_s")),end
+ h=(eye(m1,m1)+h1*h2)\h1
+endfunction
diff --git a/modules/overloading/macros/%s_x_hm.bin b/modules/overloading/macros/%s_x_hm.bin
new file mode 100755
index 000000000..34b46df90
--- /dev/null
+++ b/modules/overloading/macros/%s_x_hm.bin
Binary files differ
diff --git a/modules/overloading/macros/%s_x_hm.sci b/modules/overloading/macros/%s_x_hm.sci
new file mode 100755
index 000000000..0b0c3e11f
--- /dev/null
+++ b/modules/overloading/macros/%s_x_hm.sci
@@ -0,0 +1,17 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function M2=%s_x_hm(M1,M2)
+
+ if size(M1,"*")<>1 then
+ error(msprintf(_("%s: Wrong size for input argument #%d.\n"),"%s_x_hm",1));
+ else
+ M2("entries")=M1.*M2("entries")
+ end
+endfunction
diff --git a/modules/overloading/macros/%s_x_r.bin b/modules/overloading/macros/%s_x_r.bin
new file mode 100755
index 000000000..0c4ba721f
--- /dev/null
+++ b/modules/overloading/macros/%s_x_r.bin
Binary files differ
diff --git a/modules/overloading/macros/%s_x_r.sci b/modules/overloading/macros/%s_x_r.sci
new file mode 100755
index 000000000..6957cf2c2
--- /dev/null
+++ b/modules/overloading/macros/%s_x_r.sci
@@ -0,0 +1,19 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function f2=%s_x_r(n1,f2)
+ // %s_x_r(M,r) = (M.*r) constant .* rational
+ //!
+
+ if size(n1,"*")==0 then
+ f2=[]
+ else
+ f2("num")=n1.*f2("num")
+ end
+endfunction
diff --git a/modules/overloading/macros/%s_y_p.bin b/modules/overloading/macros/%s_y_p.bin
new file mode 100755
index 000000000..d746fc4b9
--- /dev/null
+++ b/modules/overloading/macros/%s_y_p.bin
Binary files differ
diff --git a/modules/overloading/macros/%s_y_p.sci b/modules/overloading/macros/%s_y_p.sci
new file mode 100755
index 000000000..70dfef0ce
--- /dev/null
+++ b/modules/overloading/macros/%s_y_p.sci
@@ -0,0 +1,25 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function r=%s_y_p(a,b)
+ // a./.b
+
+ [ma,na]=size(a)
+ [mb,nb]=size(b)
+ r=zeros(ma*mb,na*nb)
+ k=0
+ for j=1:na
+ l=0
+ for i=1:ma
+ r(l+(1:mb),k+(1:nb))=a(i,j)./b
+ l=l+mb
+ end
+ k=k+nb
+ end
+endfunction
diff --git a/modules/overloading/macros/%s_y_r.bin b/modules/overloading/macros/%s_y_r.bin
new file mode 100755
index 000000000..5326e26a3
--- /dev/null
+++ b/modules/overloading/macros/%s_y_r.bin
Binary files differ
diff --git a/modules/overloading/macros/%s_y_r.sci b/modules/overloading/macros/%s_y_r.sci
new file mode 100755
index 000000000..367d8cc56
--- /dev/null
+++ b/modules/overloading/macros/%s_y_r.sci
@@ -0,0 +1,25 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function r=%s_y_r(a,b)
+ // a./.b
+
+ [ma,na]=size(a)
+ [mb,nb]=size(b)
+ r=zeros(ma*mb,na*nb)
+ k=0
+ for j=1:na
+ l=0
+ for i=1:ma
+ r(l+(1:mb),k+(1:nb))=a(i,j)./b
+ l=l+mb
+ end
+ k=k+nb
+ end
+endfunction
diff --git a/modules/overloading/macros/%s_y_sp.bin b/modules/overloading/macros/%s_y_sp.bin
new file mode 100755
index 000000000..02baa1ac6
--- /dev/null
+++ b/modules/overloading/macros/%s_y_sp.bin
Binary files differ
diff --git a/modules/overloading/macros/%s_y_sp.sci b/modules/overloading/macros/%s_y_sp.sci
new file mode 100755
index 000000000..b1bd3cbe5
--- /dev/null
+++ b/modules/overloading/macros/%s_y_sp.sci
@@ -0,0 +1,15 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function r=%s_y_sp(a,b)
+ // a./.b with a full b sparse
+
+ if a==[] then r=[],return,end
+ r=sparse(a)./.b
+endfunction
diff --git a/modules/overloading/macros/%s_z_p.bin b/modules/overloading/macros/%s_z_p.bin
new file mode 100755
index 000000000..656824614
--- /dev/null
+++ b/modules/overloading/macros/%s_z_p.bin
Binary files differ
diff --git a/modules/overloading/macros/%s_z_p.sci b/modules/overloading/macros/%s_z_p.sci
new file mode 100755
index 000000000..7bb318e0a
--- /dev/null
+++ b/modules/overloading/macros/%s_z_p.sci
@@ -0,0 +1,25 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function r=%s_z_p(a,b)
+ // a.\.b
+
+ [ma,na]=size(a)
+ [mb,nb]=size(b)
+ r=zeros(ma*mb,na*nb)
+ k=0
+ for j=1:na
+ l=0
+ for i=1:ma
+ r(l+(1:mb),k+(1:nb))=a(i,j).\b
+ l=l+mb
+ end
+ k=k+nb
+ end
+endfunction
diff --git a/modules/overloading/macros/%s_z_r.bin b/modules/overloading/macros/%s_z_r.bin
new file mode 100755
index 000000000..730d1d544
--- /dev/null
+++ b/modules/overloading/macros/%s_z_r.bin
Binary files differ
diff --git a/modules/overloading/macros/%s_z_r.sci b/modules/overloading/macros/%s_z_r.sci
new file mode 100755
index 000000000..008ce0e83
--- /dev/null
+++ b/modules/overloading/macros/%s_z_r.sci
@@ -0,0 +1,25 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function r=%s_z_r(a,b)
+ // a.\.b
+
+ [ma,na]=size(a)
+ [mb,nb]=size(b)
+ r=zeros(ma*mb,na*nb)
+ k=0
+ for j=1:na
+ l=0
+ for i=1:ma
+ r(l+(1:mb),k+(1:nb))=a(i,j).\b
+ l=l+mb
+ end
+ k=k+nb
+ end
+endfunction
diff --git a/modules/overloading/macros/%s_z_sp.bin b/modules/overloading/macros/%s_z_sp.bin
new file mode 100755
index 000000000..a61071d59
--- /dev/null
+++ b/modules/overloading/macros/%s_z_sp.bin
Binary files differ
diff --git a/modules/overloading/macros/%s_z_sp.sci b/modules/overloading/macros/%s_z_sp.sci
new file mode 100755
index 000000000..0e35f4932
--- /dev/null
+++ b/modules/overloading/macros/%s_z_sp.sci
@@ -0,0 +1,15 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function r=%s_z_sp(a,b)
+ // a.\.b with a full b sparse
+
+ if a==[] then r=[],return,end
+ r=sparse(a).\.b
+endfunction
diff --git a/modules/overloading/macros/%sp_a_s.bin b/modules/overloading/macros/%sp_a_s.bin
new file mode 100755
index 000000000..4aa192b16
--- /dev/null
+++ b/modules/overloading/macros/%sp_a_s.bin
Binary files differ
diff --git a/modules/overloading/macros/%sp_a_s.sci b/modules/overloading/macros/%sp_a_s.sci
new file mode 100755
index 000000000..1971109d6
--- /dev/null
+++ b/modules/overloading/macros/%sp_a_s.sci
@@ -0,0 +1,20 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function s=%sp_a_s(a,b)
+ // %sp_a_s - adds a sparse matrix and a scalar s
+ //!
+
+ if size(b)==[-1 -1] then
+ [m,n]=size(a)
+ s=a+(b+0)*speye(m,n)
+ else
+ s=full(a)+b
+ end
+endfunction
diff --git a/modules/overloading/macros/%sp_a_sp.bin b/modules/overloading/macros/%sp_a_sp.bin
new file mode 100755
index 000000000..c53519fc4
--- /dev/null
+++ b/modules/overloading/macros/%sp_a_sp.bin
Binary files differ
diff --git a/modules/overloading/macros/%sp_a_sp.sci b/modules/overloading/macros/%sp_a_sp.sci
new file mode 100755
index 000000000..e74970200
--- /dev/null
+++ b/modules/overloading/macros/%sp_a_sp.sci
@@ -0,0 +1,29 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function s=%sp_a_sp(a,b)
+ // %spas - adds 2 sparse matrices (special cases)
+ //!
+
+ if size(a)==[1 1] then
+ a=full(a)
+ if a==0 then
+ s=b,
+ else
+ s=full(b)+a
+ end
+ elseif size(b)==[1 1] then
+ b=full(b)
+ if b==0 then
+ s=a
+ else
+ s=b+full(a)
+ end
+ end
+endfunction
diff --git a/modules/overloading/macros/%sp_and.bin b/modules/overloading/macros/%sp_and.bin
new file mode 100755
index 000000000..6a0683111
--- /dev/null
+++ b/modules/overloading/macros/%sp_and.bin
Binary files differ
diff --git a/modules/overloading/macros/%sp_and.sci b/modules/overloading/macros/%sp_and.sci
new file mode 100755
index 000000000..535452ef1
--- /dev/null
+++ b/modules/overloading/macros/%sp_and.sci
@@ -0,0 +1,21 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function x=%sp_and(a,flag)
+ // or(a) returns the logical OR
+ // for scalar matrices, an entry is TRUE if it is not zero.
+ //!
+
+ if argn(2)==1 then flag="*",end
+ if flag=="*" then
+ x=size(find(a<>0,1),"*")==size(a,"*")
+ else
+ x=sum(bool2s(a),flag)==size(a,flag)
+ end
+endfunction
diff --git a/modules/overloading/macros/%sp_c_s.bin b/modules/overloading/macros/%sp_c_s.bin
new file mode 100755
index 000000000..ac4ce1692
--- /dev/null
+++ b/modules/overloading/macros/%sp_c_s.bin
Binary files differ
diff --git a/modules/overloading/macros/%sp_c_s.sci b/modules/overloading/macros/%sp_c_s.sci
new file mode 100755
index 000000000..2ac212a06
--- /dev/null
+++ b/modules/overloading/macros/%sp_c_s.sci
@@ -0,0 +1,14 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function a=%sp_c_s(a,b)
+ // [a b] a sparse b full
+
+ a=[a sparse(b)]
+endfunction
diff --git a/modules/overloading/macros/%sp_ceil.bin b/modules/overloading/macros/%sp_ceil.bin
new file mode 100755
index 000000000..fb605c295
--- /dev/null
+++ b/modules/overloading/macros/%sp_ceil.bin
Binary files differ
diff --git a/modules/overloading/macros/%sp_ceil.sci b/modules/overloading/macros/%sp_ceil.sci
new file mode 100755
index 000000000..a5f26bf64
--- /dev/null
+++ b/modules/overloading/macros/%sp_ceil.sci
@@ -0,0 +1,14 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function x=%sp_ceil(a)
+
+ [ij,v,mn]=spget(a)
+ x=sparse(ij,ceil(v),mn)
+endfunction
diff --git a/modules/overloading/macros/%sp_conj.bin b/modules/overloading/macros/%sp_conj.bin
new file mode 100755
index 000000000..bad873353
--- /dev/null
+++ b/modules/overloading/macros/%sp_conj.bin
Binary files differ
diff --git a/modules/overloading/macros/%sp_conj.sci b/modules/overloading/macros/%sp_conj.sci
new file mode 100755
index 000000000..19b7d090b
--- /dev/null
+++ b/modules/overloading/macros/%sp_conj.sci
@@ -0,0 +1,14 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2013 - Scilab Enterprises
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function res=%sp_conj(A)
+
+ res = real(A) - %i * imag(A);
+
+endfunction
diff --git a/modules/overloading/macros/%sp_cos.bin b/modules/overloading/macros/%sp_cos.bin
new file mode 100755
index 000000000..2a962817a
--- /dev/null
+++ b/modules/overloading/macros/%sp_cos.bin
Binary files differ
diff --git a/modules/overloading/macros/%sp_cos.sci b/modules/overloading/macros/%sp_cos.sci
new file mode 100755
index 000000000..74f53115d
--- /dev/null
+++ b/modules/overloading/macros/%sp_cos.sci
@@ -0,0 +1,13 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function sp=%sp_cos(a)
+
+ sp=cos(full(a))
+endfunction
diff --git a/modules/overloading/macros/%sp_cumprod.bin b/modules/overloading/macros/%sp_cumprod.bin
new file mode 100755
index 000000000..c02bc64fb
--- /dev/null
+++ b/modules/overloading/macros/%sp_cumprod.bin
Binary files differ
diff --git a/modules/overloading/macros/%sp_cumprod.sci b/modules/overloading/macros/%sp_cumprod.sci
new file mode 100755
index 000000000..162968a59
--- /dev/null
+++ b/modules/overloading/macros/%sp_cumprod.sci
@@ -0,0 +1,112 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2010 - INRIA - Serge Steer
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function r=%sp_cumprod(varargin)
+ a = varargin(1)
+ dims = size(a);
+
+ nargs = size(varargin);
+ select nargs
+ case 1
+ d = "*";
+ case 2
+ if or(varargin(2) == ["native", "double"]) then
+ d = "*";
+ else
+ d = varargin(2);
+ end
+ case 3
+ d = varargin(2);
+ else
+ error(msprintf(_("%s: Wrong number of input argument(s): %d to %d expected.\n"),"cumprod", 1, 3));
+ end
+
+ // Check second argument : d
+ select type(d)
+ case 1
+ if size(d,'*') <> 1 then
+ error(msprintf(_("%s: Wrong size for input argument #%d: A scalar expected.\n"),"cumprod", 2))
+ end
+ if int(d) <> d | d < 0 then
+ error(msprintf(_("%s: Wrong value for input argument #%d: Integer >= %d expected.\n"),"cumprod", 2, 1))
+ end
+ case 10
+ if size(d,'*') <> 1 then
+ error(msprintf(_("%s: Wrong size for input argument #%d: A string expected.\n"),"cumprod",2))
+ end
+ if and(d<>["r","c","*","m"]) then
+ error(msprintf(_("%s: Wrong value for input argument #%d: Must be in the set {%s}.\n"),..
+ "cumprod",2,"""*"",""r"",""c"",""m"""))
+ end
+
+ pos = [1,2,0,find(dims>1,1)];
+ d=pos(find(d==["r","c","*","m"]))
+ else
+ error(msprintf(_("%s: Wrong type for input argument #%d: A string or scalar expected.\n"),"cumprod",2))
+ end
+
+ r=sparse(dims,0,dims)
+ select d
+ case 0 then
+ [ij,v]=spget(a)
+ if or(ij(1,:)<>[1 1]) then return,end
+ if dims(1)==1 then
+ l=find(diff(ij(:,2))>1,1)
+ if l==[] then
+ r=sparse(ij,cumprod(v),dims)
+ else
+ r=sparse(ij(1:l,:),cumprod(v(1:l)),dims)
+ end
+ elseif dims(2)==1 then
+ l=find(diff(ij(:,1))>1,1)
+ if l==[] then
+ r=sparse(ij,cumprod(v),dims)
+ else
+ r=sparse(ij(1:l,:),cumprod(v(1:l)),dims)
+ end
+ else
+ r=matrix(cumprod(matrix(a,1,-1)),dims)
+ end
+ case 1 then
+ ij=[];v=[];
+ for k=1:dims(2)
+ [ijk,vk]=spget(a(:,k));
+ if and(ijk(1,:)==[1 1]) then
+ l=find(diff(ijk(:,1))>1,1);
+ if l==[] then
+ ij=[ij;[ijk(:,1) k*ones(vk)]];
+ v=[v;cumprod(vk)];
+ else
+ ij=[ij;[ijk(1:l,1) k*ones(l,1)]];
+ v=[v;cumprod(vk(1:l,:))];
+ end
+ end
+ end
+ r=sparse(ij,v,dims)
+ case 2 then
+ ij=[];v=[]
+ for k=1:dims(1)
+ [ijk,vk]=spget(a(k,:))
+ if and(ijk(1,:)==[1 1]) then
+ l=find(diff(ijk(:,2))>1,1)
+ if l==[] then
+ ij=[ij;[k*ones(vk) ijk(:,2)]];
+ v=[v;cumprod(vk)]
+ else
+ ij=[ij;[k*ones(l,1),ijk(1:l,2)]];
+ v=[v;cumprod(vk(1:l,:))]
+ end
+ end
+ end
+ r=sparse(ij,v,dims)
+ else
+ r=a
+ end
+
+endfunction
diff --git a/modules/overloading/macros/%sp_cumsum.bin b/modules/overloading/macros/%sp_cumsum.bin
new file mode 100755
index 000000000..a8d931290
--- /dev/null
+++ b/modules/overloading/macros/%sp_cumsum.bin
Binary files differ
diff --git a/modules/overloading/macros/%sp_cumsum.sci b/modules/overloading/macros/%sp_cumsum.sci
new file mode 100755
index 000000000..d3ec2b8ca
--- /dev/null
+++ b/modules/overloading/macros/%sp_cumsum.sci
@@ -0,0 +1,76 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2010 - INRIA - Serge Steer
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function r=%sp_cumsum(varargin)
+ a = varargin(1)
+ dims = size(a);
+
+ nargs = size(varargin);
+ select nargs
+ case 1
+ d = "*";
+ case 2
+ if or(varargin(2) == ["native", "double"]) then
+ d = "*";
+ else
+ d = varargin(2);
+ end
+ case 3
+ d = varargin(2);
+ else
+ error(msprintf(_("%s: Wrong number of input argument(s): %d to %d expected.\n"),"cumsum", 1, 3));
+ end
+
+ // Check second argument : d
+ select type(d)
+ case 1
+ if size(d,'*') <> 1 then
+ error(msprintf(_("%s: Wrong size for input argument #%d: A scalar expected.\n"),"cumsum", 2))
+ end
+ if int(d) <> d | d < 0 then
+ error(msprintf(_("%s: Wrong value for input argument #%d: Integer >= %d expected.\n"),"cumsum", 2, 1))
+ end
+ case 10
+ if size(d,'*') <> 1 then
+ error(msprintf(_("%s: Wrong size for input argument #%d: A string expected.\n"),"cumsum",2))
+ end
+ if and(d<>["r","c","*","m"]) then
+ error(msprintf(_("%s: Wrong value for input argument #%d: Must be in the set {%s}.\n"),..
+ "cumsum",2,"""*"",""r"",""c"",""m"""))
+ end
+
+ pos = [1,2,0,find(dims>1,1)];
+ d=pos(find(d==["r","c","*","m"]))
+
+ else
+ error(msprintf(_("%s: Wrong type for input argument #%d: A string or scalar expected.\n"),"cumsum",2))
+ end
+
+ select d
+ case 0 then
+ ij=spget(a)
+ if size(ij,1)==0 then r=a,return,end
+ mnj=min(ij(:,2));
+ r=sparse([],[],dims);
+ r(1:dims(1),mnj:dims(2))=sparse(cumsum(full(a(:,mnj:$))))
+ case 1 then
+ r=sparse([],[],dims);
+ for k=1:dims(2)
+ r(:,k)=cumsum(a(:,k))
+ end
+ case 2 then
+ r=sparse([],[],dims);
+ for k=1:dims(1)
+ r(k,:)=cumsum(a(k,:))
+ end
+ else
+ r=a
+ end
+
+endfunction
diff --git a/modules/overloading/macros/%sp_d_s.bin b/modules/overloading/macros/%sp_d_s.bin
new file mode 100755
index 000000000..12fe073bb
--- /dev/null
+++ b/modules/overloading/macros/%sp_d_s.bin
Binary files differ
diff --git a/modules/overloading/macros/%sp_d_s.sci b/modules/overloading/macros/%sp_d_s.sci
new file mode 100755
index 000000000..64176ea0b
--- /dev/null
+++ b/modules/overloading/macros/%sp_d_s.sci
@@ -0,0 +1,14 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function r=%sp_d_s(a,b)
+ //r=a./b
+
+ r=full(a)./b
+endfunction
diff --git a/modules/overloading/macros/%sp_d_sp.bin b/modules/overloading/macros/%sp_d_sp.bin
new file mode 100755
index 000000000..9809789d1
--- /dev/null
+++ b/modules/overloading/macros/%sp_d_sp.bin
Binary files differ
diff --git a/modules/overloading/macros/%sp_d_sp.sci b/modules/overloading/macros/%sp_d_sp.sci
new file mode 100755
index 000000000..e1cba67c6
--- /dev/null
+++ b/modules/overloading/macros/%sp_d_sp.sci
@@ -0,0 +1,14 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function r=%sp_d_sp(a,b)
+ //r=a./b
+
+ r=full(a)./full(b)
+endfunction
diff --git a/modules/overloading/macros/%sp_det.bin b/modules/overloading/macros/%sp_det.bin
new file mode 100755
index 000000000..739b8d551
--- /dev/null
+++ b/modules/overloading/macros/%sp_det.bin
Binary files differ
diff --git a/modules/overloading/macros/%sp_det.sci b/modules/overloading/macros/%sp_det.sci
new file mode 100755
index 000000000..78fd7e790
--- /dev/null
+++ b/modules/overloading/macros/%sp_det.sci
@@ -0,0 +1,27 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2013 - Scilab Enterprises - Charlotte HECQUET
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function [res1, res2]=%sp_det(A)
+ [lhs, rhs]=argn(0);
+ hand = umf_lufact(A); //umfpack is used for complex sparse matrix
+ [L,U,P,Q,r] = umf_luget(hand);
+ res1=prod(r)*prod(diag(U));
+ res2=res1;
+ if (lhs == 2) then
+ res1=0;
+ while abs(res2) >= 10
+ if abs(res2) < 1 then
+ break;
+ end
+ res2 = res2 / 10;
+ res1 = res1 + 1;
+ end
+ end
+ umf_ludel(hand);
+endfunction
diff --git a/modules/overloading/macros/%sp_diag.bin b/modules/overloading/macros/%sp_diag.bin
new file mode 100755
index 000000000..1af48a662
--- /dev/null
+++ b/modules/overloading/macros/%sp_diag.bin
Binary files differ
diff --git a/modules/overloading/macros/%sp_diag.sci b/modules/overloading/macros/%sp_diag.sci
new file mode 100755
index 000000000..45e9ea684
--- /dev/null
+++ b/modules/overloading/macros/%sp_diag.sci
@@ -0,0 +1,43 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function d=%sp_diag(a,k)
+ // %sp_diag - implement diag function for sparse matrix, rational matrix ,..
+
+ [lhs,rhs]=argn(0)
+ if rhs==1 then k=0,end
+
+ [ij,v,sz]=spget(a)
+ m=sz(1);n=sz(2)
+ if m>1&n>1 then
+ l=find(ij(:,1)==(ij(:,2)-k))
+ if k<=0 then
+ mn=min(m+k,n)
+ i0=-k
+ else
+ mn=min(m,n-k)
+ i0=0
+ end
+ kk=abs(k)
+ if l==[] then d=sparse([],[],[mn,1]);return;end
+ d=sparse([ij(l,1)-i0,ones(ij(l,1))],v(l),[mn,1])
+ else
+ if m>1 then ij=ij(:,1);else ij=ij(:,2);end
+ nn = max(m,n)+abs(k)
+ if ij==[] then
+ d=sparse([],[],[nn,nn])
+ else
+ if k>0 then
+ d=sparse([ij,ij+k],v,[nn,nn])
+ else
+ d=sparse([ij-k,ij],v,[nn,nn])
+ end
+ end
+ end
+endfunction
diff --git a/modules/overloading/macros/%sp_e.bin b/modules/overloading/macros/%sp_e.bin
new file mode 100755
index 000000000..5e71d2356
--- /dev/null
+++ b/modules/overloading/macros/%sp_e.bin
Binary files differ
diff --git a/modules/overloading/macros/%sp_e.sci b/modules/overloading/macros/%sp_e.sci
new file mode 100755
index 000000000..8d008267a
--- /dev/null
+++ b/modules/overloading/macros/%sp_e.sci
@@ -0,0 +1,20 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function r=%sp_e(i,j,a)
+ // r=a(i,j) for f sparse in some special cases
+ //!
+
+ [lhs,rhs]=argn(0)
+ if rhs==2 then
+ a=j;
+ a=a(:)
+ r=a(i)
+ end
+endfunction
diff --git a/modules/overloading/macros/%sp_exp.bin b/modules/overloading/macros/%sp_exp.bin
new file mode 100755
index 000000000..125008053
--- /dev/null
+++ b/modules/overloading/macros/%sp_exp.bin
Binary files differ
diff --git a/modules/overloading/macros/%sp_exp.sci b/modules/overloading/macros/%sp_exp.sci
new file mode 100755
index 000000000..493864b13
--- /dev/null
+++ b/modules/overloading/macros/%sp_exp.sci
@@ -0,0 +1,13 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function sp=%sp_exp(a)
+
+ sp=exp(full(a))
+endfunction
diff --git a/modules/overloading/macros/%sp_f_s.bin b/modules/overloading/macros/%sp_f_s.bin
new file mode 100755
index 000000000..59edc9de6
--- /dev/null
+++ b/modules/overloading/macros/%sp_f_s.bin
Binary files differ
diff --git a/modules/overloading/macros/%sp_f_s.sci b/modules/overloading/macros/%sp_f_s.sci
new file mode 100755
index 000000000..92540e963
--- /dev/null
+++ b/modules/overloading/macros/%sp_f_s.sci
@@ -0,0 +1,14 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function a=%sp_f_s(a,b)
+ // [a;b] a sparse b full
+
+ a=[a;sparse(b)]
+endfunction
diff --git a/modules/overloading/macros/%sp_floor.bin b/modules/overloading/macros/%sp_floor.bin
new file mode 100755
index 000000000..f22da2e30
--- /dev/null
+++ b/modules/overloading/macros/%sp_floor.bin
Binary files differ
diff --git a/modules/overloading/macros/%sp_floor.sci b/modules/overloading/macros/%sp_floor.sci
new file mode 100755
index 000000000..9d518d03f
--- /dev/null
+++ b/modules/overloading/macros/%sp_floor.sci
@@ -0,0 +1,16 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function x=%sp_floor(a)
+ // only to be called by function floor
+ //!
+
+ [ij,v,mn]=spget(a)
+ x=sparse(ij,floor(v),mn)
+endfunction
diff --git a/modules/overloading/macros/%sp_i_ce.bin b/modules/overloading/macros/%sp_i_ce.bin
new file mode 100755
index 000000000..0ede05f4c
--- /dev/null
+++ b/modules/overloading/macros/%sp_i_ce.bin
Binary files differ
diff --git a/modules/overloading/macros/%sp_i_ce.sci b/modules/overloading/macros/%sp_i_ce.sci
new file mode 100755
index 000000000..c54ab507b
--- /dev/null
+++ b/modules/overloading/macros/%sp_i_ce.sci
@@ -0,0 +1,13 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA - Vincent Couvert
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function M=%sp_i_ce(varargin)
+ // Insertion of a sparse matrix in a cell
+ M=generic_i_ce(varargin(:))
+endfunction
diff --git a/modules/overloading/macros/%sp_i_h.bin b/modules/overloading/macros/%sp_i_h.bin
new file mode 100755
index 000000000..303e45f00
--- /dev/null
+++ b/modules/overloading/macros/%sp_i_h.bin
Binary files differ
diff --git a/modules/overloading/macros/%sp_i_h.sci b/modules/overloading/macros/%sp_i_h.sci
new file mode 100755
index 000000000..74cf25b11
--- /dev/null
+++ b/modules/overloading/macros/%sp_i_h.sci
@@ -0,0 +1,16 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function h=%sp_i_h(i,v,h)
+ h=generic_i_h(i,v,h)
+endfunction
+
+
+
+
diff --git a/modules/overloading/macros/%sp_i_s.bin b/modules/overloading/macros/%sp_i_s.bin
new file mode 100755
index 000000000..664b96c3e
--- /dev/null
+++ b/modules/overloading/macros/%sp_i_s.bin
Binary files differ
diff --git a/modules/overloading/macros/%sp_i_s.sci b/modules/overloading/macros/%sp_i_s.sci
new file mode 100755
index 000000000..67cef4f08
--- /dev/null
+++ b/modules/overloading/macros/%sp_i_s.sci
@@ -0,0 +1,44 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function M=%sp_i_s(varargin)
+ // %sp_i_s(i,j,b,a) insert sparse matrix b into full matrix a
+ // M(i,j)=b
+ //!
+
+ [lhs,rhs]=argn(0)
+
+ M=varargin(rhs)
+ N=varargin(rhs-1)//inserted matrix
+ index=varargin(1) //
+
+ if rhs==3&(type(index)==10|type(index)==15) then
+ M=createstruct(index,N)
+ if type(index(1))<>10 & index(2)=="entries" then
+ // change struct to cell
+ f=getfield(1,M);f(1)="ce"
+ setfield(1,f,M)
+ end
+ elseif rhs>4 then //more than 2 indices:
+
+ //insertion of a sparse matrix in a matrix of numbers
+ error(msprintf(_("%s: Insertion of a sparse matrix in a matrix of numbers is not defined.\n"),"sp_i_s"));
+ else
+ i=varargin(1);
+ j=varargin(2);
+ M=varargin(4);
+ b=varargin(3);
+ if rhs==4 then
+ M(i,j)=full(b)
+ else
+ M=b;//b=j
+ M(i)=full(j)
+ end
+ end
+endfunction
diff --git a/modules/overloading/macros/%sp_i_sp.bin b/modules/overloading/macros/%sp_i_sp.bin
new file mode 100755
index 000000000..0e080a86c
--- /dev/null
+++ b/modules/overloading/macros/%sp_i_sp.bin
Binary files differ
diff --git a/modules/overloading/macros/%sp_i_sp.sci b/modules/overloading/macros/%sp_i_sp.sci
new file mode 100755
index 000000000..0f50f6b79
--- /dev/null
+++ b/modules/overloading/macros/%sp_i_sp.sci
@@ -0,0 +1,36 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function a=%sp_i_sp(i,j,b,a)
+
+ [lhs,rhs]=argn(0)
+ if rhs==3 then
+ a=b;
+ b=j;
+ [m,n]=size(a)
+ a=a(:)
+ a(i)=b(:)
+ a=matrix(a,m,n)
+ elseif rhs == 4 then
+ // bruno (feb 20 2006) add the following cases not taken
+ // into account by the interface spops :
+ if size(b,1) == 1 & size(b,2) == 1 then
+ // A(i,j) = B with B a 1x1 sparse matrix
+ a(i,j) = full(b)
+ elseif i == : & j == : then
+ // A(:,:) = B with mA x nA = mB x nB but mA ~= mB
+ // B is reshaped with the sizes of A
+ [m,n] = size(a)
+ a = matrix(b,m,n)
+ else
+ // print an error
+ error(msprintf(_("%s: Sparse insertion case is not implemented.\n"),"%sp_i_sp"));
+ end
+ end
+endfunction
diff --git a/modules/overloading/macros/%sp_i_st.bin b/modules/overloading/macros/%sp_i_st.bin
new file mode 100755
index 000000000..eb2110c75
--- /dev/null
+++ b/modules/overloading/macros/%sp_i_st.bin
Binary files differ
diff --git a/modules/overloading/macros/%sp_i_st.sci b/modules/overloading/macros/%sp_i_st.sci
new file mode 100755
index 000000000..aeb486274
--- /dev/null
+++ b/modules/overloading/macros/%sp_i_st.sci
@@ -0,0 +1,12 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function out=%sp_i_st(i,in,out)
+ out=generic_i_st(i,in,out)
+endfunction
diff --git a/modules/overloading/macros/%sp_int.bin b/modules/overloading/macros/%sp_int.bin
new file mode 100755
index 000000000..8495d3c79
--- /dev/null
+++ b/modules/overloading/macros/%sp_int.bin
Binary files differ
diff --git a/modules/overloading/macros/%sp_int.sci b/modules/overloading/macros/%sp_int.sci
new file mode 100755
index 000000000..41deab6c9
--- /dev/null
+++ b/modules/overloading/macros/%sp_int.sci
@@ -0,0 +1,16 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function x=%sp_int(a)
+ // only to be called by function int
+ //!
+
+ [ij,v,mn]=spget(a)
+ x=sparse(ij,int(v),mn)
+endfunction
diff --git a/modules/overloading/macros/%sp_inv.bin b/modules/overloading/macros/%sp_inv.bin
new file mode 100755
index 000000000..ded77b536
--- /dev/null
+++ b/modules/overloading/macros/%sp_inv.bin
Binary files differ
diff --git a/modules/overloading/macros/%sp_inv.sci b/modules/overloading/macros/%sp_inv.sci
new file mode 100755
index 000000000..6436df0e3
--- /dev/null
+++ b/modules/overloading/macros/%sp_inv.sci
@@ -0,0 +1,23 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+// Copyright (C) 2013 - Scilab Enterprises - Adeline CARNIS
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function x = %sp_inv(a)
+
+ [ma, na] = size(a)
+ if ma<>na then
+ error(20,1)
+ end
+ warning("off")
+ Lup = umf_lufact(a);
+ warning("on")
+ x = sparse(umf_lusolve(Lup, eye(ma, na)));
+ umf_ludel(Lup)
+
+endfunction
diff --git a/modules/overloading/macros/%sp_k_s.bin b/modules/overloading/macros/%sp_k_s.bin
new file mode 100755
index 000000000..906bf7e77
--- /dev/null
+++ b/modules/overloading/macros/%sp_k_s.bin
Binary files differ
diff --git a/modules/overloading/macros/%sp_k_s.sci b/modules/overloading/macros/%sp_k_s.sci
new file mode 100755
index 000000000..1555eae54
--- /dev/null
+++ b/modules/overloading/macros/%sp_k_s.sci
@@ -0,0 +1,15 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function r=%sp_k_s(a,b)
+ // a.*.b with a sparse b full
+
+ if b==[] then r=[],return,end
+ r=a.*.sparse(b)
+endfunction
diff --git a/modules/overloading/macros/%sp_k_sp.bin b/modules/overloading/macros/%sp_k_sp.bin
new file mode 100755
index 000000000..0c21ff203
--- /dev/null
+++ b/modules/overloading/macros/%sp_k_sp.bin
Binary files differ
diff --git a/modules/overloading/macros/%sp_k_sp.sci b/modules/overloading/macros/%sp_k_sp.sci
new file mode 100755
index 000000000..d471ea852
--- /dev/null
+++ b/modules/overloading/macros/%sp_k_sp.sci
@@ -0,0 +1,21 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function r=%sp_k_sp(a,b)
+ // a.*.b with a and b sparse
+
+ [ija,va,mna]=spget(a)
+ [ijb,vb,mnb]=spget(b)
+ ia=ija(:,1);ja=ija(:,2)
+ ib=ijb(:,1);jb=ijb(:,2)
+
+ ij=[((ia-ones(ia))*mnb(1)).*.ones(ib)+ones(ia).*.ib,..
+ ((ja-ones(ja))*mnb(2)).*.ones(jb)+ones(ia).*.jb]
+ r=sparse(ij,va.*.vb,mna.*mnb)
+endfunction
diff --git a/modules/overloading/macros/%sp_l_s.bin b/modules/overloading/macros/%sp_l_s.bin
new file mode 100755
index 000000000..20833f727
--- /dev/null
+++ b/modules/overloading/macros/%sp_l_s.bin
Binary files differ
diff --git a/modules/overloading/macros/%sp_l_s.sci b/modules/overloading/macros/%sp_l_s.sci
new file mode 100755
index 000000000..0d0a6351c
--- /dev/null
+++ b/modules/overloading/macros/%sp_l_s.sci
@@ -0,0 +1,40 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function x=%sp_l_s(a,b)
+ // a\b , a sparse b full
+
+
+ [ma,na]=size(a)
+ [mb,nb]=size(b)
+ if mb*nb==1 then x=a\(b*speye(na,na)),return;end
+
+ if ma<>mb then error(12),end
+
+ if ma<>na then b=a'*b;a=a'*a;end
+
+ if isreal(a)&isreal(b) then
+ [h,rk]=lufact(a)
+ if rk<min(ma,na) then warning("deficient rank: rank = "+string(rk)),end
+ x=[]
+ for k=1:nb
+ x=[x,lusolve(h,b(:,k))]
+ end
+ ludel(h)
+ else
+ [h,rk]=lufact([real(a) -imag(a);imag(a) real(a)])
+ if rk<2*min(ma,na) then warning("deficient rank: rank = "+string(rk/2)),end
+ x=[]
+ for k=1:nb
+ x=[x,lusolve(h,[real(b(:,k));imag(b(:,k))])]
+ end
+ x=x(1:$/2,:)+%i*x($/2+1:$,:)
+ ludel(h)
+ end
+endfunction
diff --git a/modules/overloading/macros/%sp_l_sp.bin b/modules/overloading/macros/%sp_l_sp.bin
new file mode 100755
index 000000000..1346d16d3
--- /dev/null
+++ b/modules/overloading/macros/%sp_l_sp.bin
Binary files differ
diff --git a/modules/overloading/macros/%sp_l_sp.sci b/modules/overloading/macros/%sp_l_sp.sci
new file mode 100755
index 000000000..39f55a57a
--- /dev/null
+++ b/modules/overloading/macros/%sp_l_sp.sci
@@ -0,0 +1,27 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function x=%sp_l_sp(a,b)
+ // a\b , a sparse b sparse
+
+ [ma,na]=size(a)
+ [mb,nb]=size(b)
+ if ma<>mb then error(12),end
+ if ma<>na then
+ b=a'*b;a=a'*a
+ end
+
+ [h,rk]=lufact(a)
+ if rk<min(ma,na) then warning("deficient rank: rank = "+string(rk)),end
+ x=[]
+ for k=1:nb
+ x=[x,sparse(lusolve(h,full(b(:,k))))]
+ end
+ ludel(h)
+endfunction
diff --git a/modules/overloading/macros/%sp_length.bin b/modules/overloading/macros/%sp_length.bin
new file mode 100755
index 000000000..89cf4cc95
--- /dev/null
+++ b/modules/overloading/macros/%sp_length.bin
Binary files differ
diff --git a/modules/overloading/macros/%sp_length.sci b/modules/overloading/macros/%sp_length.sci
new file mode 100755
index 000000000..10b2c62da
--- /dev/null
+++ b/modules/overloading/macros/%sp_length.sci
@@ -0,0 +1,13 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function l=%sp_length(x)
+ l=max(size(x))
+endfunction
+
diff --git a/modules/overloading/macros/%sp_norm.bin b/modules/overloading/macros/%sp_norm.bin
new file mode 100755
index 000000000..5e1c542d0
--- /dev/null
+++ b/modules/overloading/macros/%sp_norm.bin
Binary files differ
diff --git a/modules/overloading/macros/%sp_norm.sci b/modules/overloading/macros/%sp_norm.sci
new file mode 100755
index 000000000..2b8731416
--- /dev/null
+++ b/modules/overloading/macros/%sp_norm.sci
@@ -0,0 +1,68 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+// Copyright (C) Scilab Enterprises - Adeline CARNIS
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function res=%sp_norm(S,flag)
+
+ [lhs,rhs]=argn(0)
+ if rhs==1 then flag=2;end //norm(S)=norm(S,2)
+ [m,n]=size(S)
+
+ if m==1|n==1 then //vector norm
+ [ij,v]=spget(S);
+ res=norm(v,flag);
+ return
+ end
+
+ select flag
+ case 1 then
+ res=max(ones(1,m)*abs(S))
+ case 2 then
+ if m<n then
+ S1=S*S'
+ elseif m>n then
+ S1=S'*S
+ else
+ S1 = S;
+ end
+
+ tol=2*%eps;
+ x = sum(abs(S1),1)';
+ res = norm(x);
+ if res==0 then return,end
+ x = x/res;res0 = 0;
+ while abs(res-res0) > tol*res
+ res0 = res; Sx = S1*x;
+
+ // Bug #10178: norm failed for some sparse matrix
+ // If Sx = 0, we had "division by zero" with x/norm(x)
+ // So, use to sum(abs(S).^2).^(1/2)
+ if Sx == 0 then
+ res = sum(abs(S).^2).^(1/2);
+ return
+ end
+ // End Bug #10178
+
+ res = norm(Sx);
+ x = S1'*Sx;
+ x = x/norm(x);
+ end
+ if m<>n then res=sqrt(res),end
+ case %inf then
+ res=max(abs(S)*ones(n,1))
+ case "inf" then
+ res=max(abs(S)*ones(n,1))
+ case "fro" then
+ [ij,v]=spget(S);
+ res=sqrt(sum(abs(v.*v)))
+ else
+ [ij,v]=spget(S);
+ res=norm(v,flag);
+ end
+endfunction
diff --git a/modules/overloading/macros/%sp_or.bin b/modules/overloading/macros/%sp_or.bin
new file mode 100755
index 000000000..6db850c7b
--- /dev/null
+++ b/modules/overloading/macros/%sp_or.bin
Binary files differ
diff --git a/modules/overloading/macros/%sp_or.sci b/modules/overloading/macros/%sp_or.sci
new file mode 100755
index 000000000..99d57a4c3
--- /dev/null
+++ b/modules/overloading/macros/%sp_or.sci
@@ -0,0 +1,18 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function x=%sp_or(a,flag)
+
+ if argn(2)==1 then flag="*",end
+ if flag=="*" then
+ x=find(a<>0,1)<>[]
+ else
+ x=sum(bool2s(a),flag)>=1
+ end
+endfunction
diff --git a/modules/overloading/macros/%sp_p_s.bin b/modules/overloading/macros/%sp_p_s.bin
new file mode 100755
index 000000000..452dbd418
--- /dev/null
+++ b/modules/overloading/macros/%sp_p_s.bin
Binary files differ
diff --git a/modules/overloading/macros/%sp_p_s.sci b/modules/overloading/macros/%sp_p_s.sci
new file mode 100755
index 000000000..190088f3f
--- /dev/null
+++ b/modules/overloading/macros/%sp_p_s.sci
@@ -0,0 +1,47 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) BRUNO PINCON
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function B=%sp_p_s(A,p)
+ // handle A^p for scalar integer p only
+
+ if length(p) ~= 1 then
+ error(msprintf(_("%s: Wrong type for input argument #%d: A scalar expected.\n"),"%sp_p_s",2));
+ end
+ if floor(p) ~= p then
+ error(msprintf(_("%s: Wrong type for input argument #%d: An integer expected.\n"),"%sp_p_s",2));
+ end
+ if p == 0 then
+ B = speye(A)
+ return
+ elseif p < 0 then
+ A = inv(A)
+ p = -p
+ end
+
+ select p
+ case 1
+ B = A
+ case 2
+ B = A*A
+ case 3
+ B = A*(A*A)
+ case 4
+ B = A*A
+ B = B*B
+ else
+ B = A
+ for i=2:p // slow method (we could use the power algorithm)
+ B = A*B
+ end
+ end
+
+endfunction
+
+
+
diff --git a/modules/overloading/macros/%sp_prod.bin b/modules/overloading/macros/%sp_prod.bin
new file mode 100755
index 000000000..9a84042d9
--- /dev/null
+++ b/modules/overloading/macros/%sp_prod.bin
Binary files differ
diff --git a/modules/overloading/macros/%sp_prod.sci b/modules/overloading/macros/%sp_prod.sci
new file mode 100755
index 000000000..66bfc1566
--- /dev/null
+++ b/modules/overloading/macros/%sp_prod.sci
@@ -0,0 +1,71 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2010 - INRIA - Serge Steer
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function r=%sp_prod(varargin)
+ a = varargin(1)
+ dims = size(a);
+
+ nargs = size(varargin);
+ select nargs
+ case 1
+ d = "*";
+ case 2
+ if or(varargin(2) == ["native", "double"]) then
+ d = "*";
+ else
+ d = varargin(2);
+ end
+ case 3
+ d = varargin(2);
+ else
+ error(msprintf(_("%s: Wrong number of input argument(s): %d to %d expected.\n"),"prod", 1, 3));
+ end
+
+ // Check second argument : d
+ select type(d)
+ case 1
+ if size(d,'*') <> 1 then
+ error(msprintf(_("%s: Wrong size for input argument #%d: A scalar expected.\n"),"prod", 2))
+ end
+ if int(d) <> d | d < 0 then
+ error(msprintf(_("%s: Wrong value for input argument #%d: Integer >= %d expected.\n"),"prod", 2, 1))
+ end
+ case 10
+ if size(d,'*') <> 1 then
+ error(msprintf(_("%s: Wrong size for input argument #%d: A string expected.\n"),"prod",2))
+ end
+ if and(d<>["r","c","*","m"]) then
+ error(msprintf(_("%s: Wrong value for input argument #%d: Must be in the set {%s}.\n"),..
+ "prod",2,"""*"",""r"",""c"",""m"""))
+ end
+
+ pos = [1,2,0,find(dims>1,1)];
+ d=pos(find(d==["r","c","*","m"]))
+ else
+ error(msprintf(_("%s: Wrong type for input argument #%d: A string or scalar expected.\n"),"prod",2))
+ end
+
+ select d
+ case 0 then
+ r=prod(a)
+ case 1 then
+ for k=1:dims(2)
+ r(1,k)=prod(a(:,k))
+ end
+ r=sparse(r)
+ case 2 then
+ for k=1:dims(1)
+ r(k,1)=prod(a(k,:))
+ end
+ r=sparse(r)
+ else
+ r=a
+ end
+
+endfunction
diff --git a/modules/overloading/macros/%sp_q_s.bin b/modules/overloading/macros/%sp_q_s.bin
new file mode 100755
index 000000000..baa67bff8
--- /dev/null
+++ b/modules/overloading/macros/%sp_q_s.bin
Binary files differ
diff --git a/modules/overloading/macros/%sp_q_s.sci b/modules/overloading/macros/%sp_q_s.sci
new file mode 100755
index 000000000..4cdafef68
--- /dev/null
+++ b/modules/overloading/macros/%sp_q_s.sci
@@ -0,0 +1,19 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function r=%sp_q_s(a,b)
+ //r=a.\b
+
+ [ij,v,mn]=spget(a)
+ if size(v,"*")<>mn(1)*mn(2) then
+ error(27)
+ else
+ r=full(a).\b
+ end
+endfunction
diff --git a/modules/overloading/macros/%sp_q_sp.bin b/modules/overloading/macros/%sp_q_sp.bin
new file mode 100755
index 000000000..cdaa3fe42
--- /dev/null
+++ b/modules/overloading/macros/%sp_q_sp.bin
Binary files differ
diff --git a/modules/overloading/macros/%sp_q_sp.sci b/modules/overloading/macros/%sp_q_sp.sci
new file mode 100755
index 000000000..77cd69e28
--- /dev/null
+++ b/modules/overloading/macros/%sp_q_sp.sci
@@ -0,0 +1,14 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function r=%sp_q_sp(a,b)
+ //r=a.\b
+
+ r=full(a).\full(b)
+endfunction
diff --git a/modules/overloading/macros/%sp_r_s.bin b/modules/overloading/macros/%sp_r_s.bin
new file mode 100755
index 000000000..14dd790ef
--- /dev/null
+++ b/modules/overloading/macros/%sp_r_s.bin
Binary files differ
diff --git a/modules/overloading/macros/%sp_r_s.sci b/modules/overloading/macros/%sp_r_s.sci
new file mode 100755
index 000000000..9aba2ac3a
--- /dev/null
+++ b/modules/overloading/macros/%sp_r_s.sci
@@ -0,0 +1,14 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function x=%sp_r_s(a,b)
+ // a*b^-1 a sparse, b full
+
+ x=full(a)/b
+endfunction
diff --git a/modules/overloading/macros/%sp_r_sp.bin b/modules/overloading/macros/%sp_r_sp.bin
new file mode 100755
index 000000000..9e2f7cb97
--- /dev/null
+++ b/modules/overloading/macros/%sp_r_sp.bin
Binary files differ
diff --git a/modules/overloading/macros/%sp_r_sp.sci b/modules/overloading/macros/%sp_r_sp.sci
new file mode 100755
index 000000000..0c7e53dcf
--- /dev/null
+++ b/modules/overloading/macros/%sp_r_sp.sci
@@ -0,0 +1,27 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function x=%sp_r_sp(a,b)
+ // a/b , a sparse b sparse
+
+ [ma,na]=size(a)
+ [mb,nb]=size(b)
+ if na<>nb then error(12),end
+ if mb<>nb then
+ a=a*b';b=b*b'
+ end
+
+ [h,rk]=lufact(b')
+ if rk<min(mb,nb) then warning("deficient rank: rank = "+string(rk)),end
+ x=[]
+ for k=1:ma
+ x=[x;sparse(lusolve(h,full(a(k,:))')')]
+ end
+ ludel(h)
+endfunction
diff --git a/modules/overloading/macros/%sp_round.bin b/modules/overloading/macros/%sp_round.bin
new file mode 100755
index 000000000..d18b475fa
--- /dev/null
+++ b/modules/overloading/macros/%sp_round.bin
Binary files differ
diff --git a/modules/overloading/macros/%sp_round.sci b/modules/overloading/macros/%sp_round.sci
new file mode 100755
index 000000000..f8c3346e7
--- /dev/null
+++ b/modules/overloading/macros/%sp_round.sci
@@ -0,0 +1,14 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function sp=%sp_round(a)
+
+ [ij,v,mn]=spget(a)
+ sp=sparse(ij,round(v),mn)
+endfunction
diff --git a/modules/overloading/macros/%sp_s_s.bin b/modules/overloading/macros/%sp_s_s.bin
new file mode 100755
index 000000000..9fd95fa7a
--- /dev/null
+++ b/modules/overloading/macros/%sp_s_s.bin
Binary files differ
diff --git a/modules/overloading/macros/%sp_s_s.sci b/modules/overloading/macros/%sp_s_s.sci
new file mode 100755
index 000000000..53ac8ec9d
--- /dev/null
+++ b/modules/overloading/macros/%sp_s_s.sci
@@ -0,0 +1,20 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function s=%sp_s_s(a,b)
+ // %sp_s_s - subtract a scalar b to a sparse matrix a
+ //!
+
+ if size(b)==[-1 -1] then
+ [m,n]=size(a)
+ s=a-(b+0)*speye(m,n)
+ else
+ s=full(a)-b
+ end
+endfunction
diff --git a/modules/overloading/macros/%sp_s_sp.bin b/modules/overloading/macros/%sp_s_sp.bin
new file mode 100755
index 000000000..bf7a429b8
--- /dev/null
+++ b/modules/overloading/macros/%sp_s_sp.bin
Binary files differ
diff --git a/modules/overloading/macros/%sp_s_sp.sci b/modules/overloading/macros/%sp_s_sp.sci
new file mode 100755
index 000000000..56dc65c95
--- /dev/null
+++ b/modules/overloading/macros/%sp_s_sp.sci
@@ -0,0 +1,29 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function s=%sp_s_sp(a,b)
+ // %spas - adds 2 sparse matrices (special cases)
+ //!
+
+ if size(a)==[1 1] then
+ a=full(a)
+ if a==0 then
+ s=b,
+ else
+ s=a-full(b)
+ end
+ elseif size(b)==[1 1] then
+ b=full(b)
+ if b==0 then
+ s=a
+ else
+ s=full(a)-b
+ end
+ end
+endfunction
diff --git a/modules/overloading/macros/%sp_sin.bin b/modules/overloading/macros/%sp_sin.bin
new file mode 100755
index 000000000..dc650e38d
--- /dev/null
+++ b/modules/overloading/macros/%sp_sin.bin
Binary files differ
diff --git a/modules/overloading/macros/%sp_sin.sci b/modules/overloading/macros/%sp_sin.sci
new file mode 100755
index 000000000..7861c644f
--- /dev/null
+++ b/modules/overloading/macros/%sp_sin.sci
@@ -0,0 +1,14 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function sp=%sp_sin(a)
+
+ [ij,v,mn]=spget(a)
+ sp=sparse(ij,sin(v),mn)
+endfunction
diff --git a/modules/overloading/macros/%sp_sqrt.bin b/modules/overloading/macros/%sp_sqrt.bin
new file mode 100755
index 000000000..bb96ab21c
--- /dev/null
+++ b/modules/overloading/macros/%sp_sqrt.bin
Binary files differ
diff --git a/modules/overloading/macros/%sp_sqrt.sci b/modules/overloading/macros/%sp_sqrt.sci
new file mode 100755
index 000000000..bb2e6d5e1
--- /dev/null
+++ b/modules/overloading/macros/%sp_sqrt.sci
@@ -0,0 +1,14 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function sp=%sp_sqrt(a)
+
+ [ij,v,mn]=spget(a)
+ sp=sparse(ij,sqrt(v),mn)
+endfunction
diff --git a/modules/overloading/macros/%sp_string.bin b/modules/overloading/macros/%sp_string.bin
new file mode 100755
index 000000000..4aaf86007
--- /dev/null
+++ b/modules/overloading/macros/%sp_string.bin
Binary files differ
diff --git a/modules/overloading/macros/%sp_string.sci b/modules/overloading/macros/%sp_string.sci
new file mode 100755
index 000000000..790d5e970
--- /dev/null
+++ b/modules/overloading/macros/%sp_string.sci
@@ -0,0 +1,14 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2011 - DIGITEO - Michael Baudin
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+function s=%sp_string(A)
+ [ij,v,mn]=spget(A);
+ s = msprintf("(%d,%d) sparse matrix",mn(1),mn(2))
+ s = [s; "("+string(ij(:,1)) + "," + string(ij(:,2))+") " + string(v)]
+endfunction
+
diff --git a/modules/overloading/macros/%sp_sum.bin b/modules/overloading/macros/%sp_sum.bin
new file mode 100755
index 000000000..78c2199cf
--- /dev/null
+++ b/modules/overloading/macros/%sp_sum.bin
Binary files differ
diff --git a/modules/overloading/macros/%sp_sum.sci b/modules/overloading/macros/%sp_sum.sci
new file mode 100755
index 000000000..da35c5a7d
--- /dev/null
+++ b/modules/overloading/macros/%sp_sum.sci
@@ -0,0 +1,65 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2010 - INRIA - Serge Steer
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function a=%sp_sum(varargin)
+ a = varargin(1)
+ dims = size(a);
+
+ nargs = size(varargin);
+ select nargs
+ case 1
+ d = "*";
+ case 2
+ if or(varargin(2) == ["native", "double"]) then
+ d = "*";
+ else
+ d = varargin(2);
+ end
+ case 3
+ d = varargin(2);
+ else
+ error(msprintf(_("%s: Wrong number of input argument(s): %d to %d expected.\n"),"sum", 1, 3));
+ end
+
+ // Check second argument : d
+ select type(d)
+ case 1
+ if size(d,'*') <> 1 then
+ error(msprintf(_("%s: Wrong size for input argument #%d: A scalar expected.\n"),"sum", 2))
+ end
+ if int(d) <> d | d < 0 then
+ error(msprintf(_("%s: Wrong value for input argument #%d: Integer >= %d expected.\n"),"sum", 2, 1))
+ end
+ case 10
+ if size(d,'*') <> 1 then
+ error(msprintf(_("%s: Wrong size for input argument #%d: A string expected.\n"),"sum",2))
+ end
+ if and(d<>["r","c","*","m"]) then
+ error(msprintf(_("%s: Wrong value for input argument #%d: Must be in the set {%s}.\n"),..
+ "sum",2,"""*"",""r"",""c"",""m"""))
+ end
+
+ pos = [1,2,0,find(dims>1,1)];
+ d=pos(find(d==["r","c","*","m"]))
+ else
+ error(msprintf(_("%s: Wrong type for input argument #%d: A string or scalar expected.\n"),"sum",2))
+ end
+
+ select d
+ case 0 then
+ //sum of all elements
+ a=sum(a)
+ case 1 then
+ a=sparse(ones(1,dims(1))*a);
+ case 2 then
+ a=sparse(a*ones(dims(2),1))
+ else
+ a=a
+ end
+endfunction
diff --git a/modules/overloading/macros/%sp_tril.bin b/modules/overloading/macros/%sp_tril.bin
new file mode 100755
index 000000000..54b94490a
--- /dev/null
+++ b/modules/overloading/macros/%sp_tril.bin
Binary files differ
diff --git a/modules/overloading/macros/%sp_tril.sci b/modules/overloading/macros/%sp_tril.sci
new file mode 100755
index 000000000..96c6a3555
--- /dev/null
+++ b/modules/overloading/macros/%sp_tril.sci
@@ -0,0 +1,19 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function d=%sp_tril(a,k)
+
+ [lhs,rhs]=argn(0)
+ if rhs==1 then k=0,end
+
+ [ij,v,sz]=spget(a)
+ m=sz(1);n=sz(2)
+ l=find(ij(:,1)>=(ij(:,2)-k))
+ d=sparse(ij(l,:),v(l),[m,n])
+endfunction
diff --git a/modules/overloading/macros/%sp_triu.bin b/modules/overloading/macros/%sp_triu.bin
new file mode 100755
index 000000000..6ef71adf5
--- /dev/null
+++ b/modules/overloading/macros/%sp_triu.bin
Binary files differ
diff --git a/modules/overloading/macros/%sp_triu.sci b/modules/overloading/macros/%sp_triu.sci
new file mode 100755
index 000000000..535b2e14c
--- /dev/null
+++ b/modules/overloading/macros/%sp_triu.sci
@@ -0,0 +1,19 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function d=%sp_triu(a,k)
+
+ [lhs,rhs]=argn(0)
+ if rhs==1 then k=0,end
+
+ [ij,v,sz]=spget(a)
+ m=sz(1);n=sz(2)
+ l=find(ij(:,1)<=(ij(:,2)-k))
+ d=sparse(ij(l,:),v(l),[m,n])
+endfunction
diff --git a/modules/overloading/macros/%sp_y_s.bin b/modules/overloading/macros/%sp_y_s.bin
new file mode 100755
index 000000000..baba1dc42
--- /dev/null
+++ b/modules/overloading/macros/%sp_y_s.bin
Binary files differ
diff --git a/modules/overloading/macros/%sp_y_s.sci b/modules/overloading/macros/%sp_y_s.sci
new file mode 100755
index 000000000..4bd7de82e
--- /dev/null
+++ b/modules/overloading/macros/%sp_y_s.sci
@@ -0,0 +1,15 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function r=%sp_y_s(a,b)
+ // a./.b with a sparse b full
+
+ if b==[] then r=[],return,end
+ r=a./.sparse(b)
+endfunction
diff --git a/modules/overloading/macros/%sp_y_sp.bin b/modules/overloading/macros/%sp_y_sp.bin
new file mode 100755
index 000000000..25c2da526
--- /dev/null
+++ b/modules/overloading/macros/%sp_y_sp.bin
Binary files differ
diff --git a/modules/overloading/macros/%sp_y_sp.sci b/modules/overloading/macros/%sp_y_sp.sci
new file mode 100755
index 000000000..9d09fc6e2
--- /dev/null
+++ b/modules/overloading/macros/%sp_y_sp.sci
@@ -0,0 +1,22 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function r=%sp_y_sp(a,b)
+ // a./.b with a and b sparse
+
+ [ija,va,mna]=spget(a)
+ [ijb,vb,mnb]=spget(b)
+ if size(ijb,1)<>prod(mnb)|or(vb==0) then error(27),end
+ ia=ija(:,1);ja=ija(:,2)
+ ib=ijb(:,1);jb=ijb(:,2)
+
+ ij=[((ia-ones(ia))*mnb(1)).*.ones(ib)+ones(ia).*.ib,..
+ ((ja-ones(ja))*mnb(2)).*.ones(jb)+ones(ia).*.jb]
+ r=sparse(ij,va./.vb,mna.*mnb)
+endfunction
diff --git a/modules/overloading/macros/%sp_z_s.bin b/modules/overloading/macros/%sp_z_s.bin
new file mode 100755
index 000000000..e0700b8d2
--- /dev/null
+++ b/modules/overloading/macros/%sp_z_s.bin
Binary files differ
diff --git a/modules/overloading/macros/%sp_z_s.sci b/modules/overloading/macros/%sp_z_s.sci
new file mode 100755
index 000000000..1e2276036
--- /dev/null
+++ b/modules/overloading/macros/%sp_z_s.sci
@@ -0,0 +1,15 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function r=%sp_z_s(a,b)
+ // a.\.b with a sparse b full
+
+ if b==[] then r=[],return,end
+ r=a.\.sparse(b)
+endfunction
diff --git a/modules/overloading/macros/%sp_z_sp.bin b/modules/overloading/macros/%sp_z_sp.bin
new file mode 100755
index 000000000..56ef6e2be
--- /dev/null
+++ b/modules/overloading/macros/%sp_z_sp.bin
Binary files differ
diff --git a/modules/overloading/macros/%sp_z_sp.sci b/modules/overloading/macros/%sp_z_sp.sci
new file mode 100755
index 000000000..3b8cba7ef
--- /dev/null
+++ b/modules/overloading/macros/%sp_z_sp.sci
@@ -0,0 +1,22 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function r=%sp_z_sp(a,b)
+ // a.\.b with a and b sparse
+
+ [ija,va,mna]=spget(a)
+ [ijb,vb,mnb]=spget(b)
+ if size(ija,1)<>prod(mna)|or(va==0) then error(27),end
+ ia=ija(:,1);ja=ija(:,2)
+ ib=ijb(:,1);jb=ijb(:,2)
+
+ ij=[((ia-ones(ia))*mnb(1)).*.ones(ib)+ones(ia).*.ib,..
+ ((ja-ones(ja))*mnb(2)).*.ones(jb)+ones(ia).*.jb]
+ r=sparse(ij,va.\.vb,mna.*mnb)
+endfunction
diff --git a/modules/overloading/macros/%spb_and.bin b/modules/overloading/macros/%spb_and.bin
new file mode 100755
index 000000000..8f881ad95
--- /dev/null
+++ b/modules/overloading/macros/%spb_and.bin
Binary files differ
diff --git a/modules/overloading/macros/%spb_and.sci b/modules/overloading/macros/%spb_and.sci
new file mode 100755
index 000000000..3a3dec120
--- /dev/null
+++ b/modules/overloading/macros/%spb_and.sci
@@ -0,0 +1,21 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function x=%spb_and(a,flag)
+ // or(a) returns the logical OR
+ // for scalar matrices, an entry is TRUE if it is not zero.
+ //!
+
+ if argn(2)==1 then flag="*",end
+ if flag=="*" then
+ x=find(~a,1)==[]
+ else
+ x=sum(bool2s(a),flag)==size(a,flag)
+ end
+endfunction
diff --git a/modules/overloading/macros/%spb_c_b.bin b/modules/overloading/macros/%spb_c_b.bin
new file mode 100755
index 000000000..155ede4c9
--- /dev/null
+++ b/modules/overloading/macros/%spb_c_b.bin
Binary files differ
diff --git a/modules/overloading/macros/%spb_c_b.sci b/modules/overloading/macros/%spb_c_b.sci
new file mode 100755
index 000000000..c0a87283c
--- /dev/null
+++ b/modules/overloading/macros/%spb_c_b.sci
@@ -0,0 +1,15 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function r=%spb_c_b(a,b)
+ // perform [a b] where a is a boolean sparse matrix
+ // and b a boolean matrix
+
+ r=[a sparse(b)]
+endfunction
diff --git a/modules/overloading/macros/%spb_cumprod.bin b/modules/overloading/macros/%spb_cumprod.bin
new file mode 100755
index 000000000..910e24a57
--- /dev/null
+++ b/modules/overloading/macros/%spb_cumprod.bin
Binary files differ
diff --git a/modules/overloading/macros/%spb_cumprod.sci b/modules/overloading/macros/%spb_cumprod.sci
new file mode 100755
index 000000000..4044038ce
--- /dev/null
+++ b/modules/overloading/macros/%spb_cumprod.sci
@@ -0,0 +1,131 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2010 - INRIA - Serge Steer
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function r = %spb_cumprod(varargin)
+ a = varargin(1)
+ dims = size(a);
+
+ nargs = size(varargin);
+ select nargs
+ case 1
+ d = "*";
+ typ = "double";
+ case 2
+ if or(varargin(2) == ["native", "double"]) then
+ d = "*";
+ typ = varargin(2);
+ else
+ d = varargin(2);
+ typ = "double";
+ end
+ case 3
+ d = varargin(2);
+ typ = varargin(3);
+ else
+ error(msprintf(_("%s: Wrong number of input argument(s): %d to %d expected.\n"),"cumprod", 1, 3));
+ end
+
+ // Check second argument : d
+ select type(d)
+ case 1
+ if size(d,'*') <> 1 then
+ error(msprintf(_("%s: Wrong size for input argument #%d: A scalar expected.\n"),"cumprod", 2))
+ end
+ if int(d) <> d | d < 0 then
+ error(msprintf(_("%s: Wrong value for input argument #%d: Integer >= %d expected.\n"),"cumprod", 2, 1))
+ end
+ case 10
+ if size(d,'*') <> 1 then
+ error(msprintf(_("%s: Wrong size for input argument #%d: A string expected.\n"),"cumprod",2))
+ end
+ if and(d<>["r","c","*","m"]) then
+ error(msprintf(_("%s: Wrong value for input argument #%d: Must be in the set {%s}.\n"),..
+ "cumprod",2,"""*"",""r"",""c"",""m"""))
+ end
+ pos = [1,2,0,find(dims>1,1)];
+ d=pos(find(d==["r","c","*","m"]))
+ else
+ error(msprintf(_("%s: Wrong type for input argument #%d: A string or scalar expected.\n"),"cumprod",2))
+ end
+
+ // Check third argument
+ if type(typ)<>10 then
+ error(msprintf(_("%s: Wrong type for input argument #%d: A string expected.\n"),"cumprod",3))
+ end
+
+ if size(typ,"*")<>1 then
+ error(msprintf(_("%s: Wrong size for input argument #%d: A string expected.\n"),"cumprod",3))
+ end
+
+ if and(typ <> ["native" "double"]) then
+ error(msprintf(_("%s: Wrong value for input argument #%d: ""%s"" or ""%s"" expected.\n"),"cumprod", 3, "native", "double"));
+ end
+
+ r=sparse(dims,0,dims)
+ select d
+ case 0 then
+ [ij,v]=spget(a)
+ if dims(1)==1 then
+ l=find(diff(ij(:,2))>1,1)
+ if l==[] then
+ r=sparse(ij,cumprod(v,typ),dims)
+ else
+ r=sparse(ij(1:l,:),cumprod(v(1:l),typ),dims)
+ end
+ elseif dims(2)==1 then
+ l=find(diff(ij(:,1))>1,1)
+ if l==[] then
+ r=sparse(ij,cumprod(v,typ),dims)
+ else
+ r=sparse(ij(1:l,:),cumprod(v(1:l),typ),dims)
+ end
+ else
+ r=matrix(cumprod(matrix(a,1,-1),typ),dims)
+ end
+ case 1 then
+ ij=[];v=[];
+ for k=1:dims(2)
+ [ijk,vk]=spget(a(:,k));
+ if and(ijk(1,:)==[1 1]) then
+ l=find(diff(ijk(:,1))>1,1);
+ if l==[] then
+ ij=[ij;[ijk(:,1) k*ones(vk)]];
+ v=[v;cumprod(vk,typ)];
+ else
+ ij=[ij;[ijk(1:l,1) k*ones(l,1)]];
+ v=[v;cumprod(vk(1:l,:),typ)];
+ end
+ end
+ end
+ r=sparse(ij,v,dims)
+ case 2 then
+ ij=[];v=[]
+ for k=1:dims(1)
+ [ijk,vk]=spget(a(k,:))
+ if and(ijk(1,:)==[1 1]) then
+ l=find(diff(ijk(:,2))>1,1)
+ if l==[] then
+ ij=[ij;[k*ones(vk) ijk(:,2)]];
+ v=[v;cumprod(vk,typ)]
+ else
+ ij=[ij;[k*ones(l,1),ijk(1:l,2)]];
+ v=[v;cumprod(vk(1:l,:),typ)]
+ end
+ end
+ end
+ r=sparse(ij,v,dims)
+ else
+ if typ=="native"
+ r=a
+ else
+ r=bool2s(a)
+ end
+ end
+
+endfunction
diff --git a/modules/overloading/macros/%spb_cumsum.bin b/modules/overloading/macros/%spb_cumsum.bin
new file mode 100755
index 000000000..03622b44a
--- /dev/null
+++ b/modules/overloading/macros/%spb_cumsum.bin
Binary files differ
diff --git a/modules/overloading/macros/%spb_cumsum.sci b/modules/overloading/macros/%spb_cumsum.sci
new file mode 100755
index 000000000..1745ccfd5
--- /dev/null
+++ b/modules/overloading/macros/%spb_cumsum.sci
@@ -0,0 +1,182 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2010 - INRIA - Serge Steer
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function r = %spb_cumsum(varargin)
+ a = varargin(1)
+ dims = size(a);
+
+ nargs = size(varargin);
+ select nargs
+ case 1
+ d = "*";
+ typ = "double";
+ case 2
+ if or(varargin(2) == ["native", "double"]) then
+ d = "*";
+ typ = varargin(2);
+ else
+ d = varargin(2);
+ typ = "double";
+ end
+ case 3
+ d = varargin(2);
+ typ = varargin(3);
+ else
+ error(msprintf(_("%s: Wrong number of input argument(s): %d to %d expected.\n"),"cumsum", 1, 3));
+ end
+
+ // Check second argument : d
+ select type(d)
+ case 1
+ if size(d,'*') <> 1 then
+ error(msprintf(_("%s: Wrong size for input argument #%d: A scalar expected.\n"),"cumsum", 2))
+ end
+ if int(d) <> d | d < 0 then
+ error(msprintf(_("%s: Wrong value for input argument #%d: Integer >= %d expected.\n"),"cumsum", 2, 1))
+ end
+ case 10
+ if size(d,'*') <> 1 then
+ error(msprintf(_("%s: Wrong size for input argument #%d: A string expected.\n"),"cumsum",2))
+ end
+ if and(d<>["r","c","*","m"]) then
+ error(msprintf(_("%s: Wrong value for input argument #%d: Must be in the set {%s}.\n"),..
+ "cumsum",2,"""*"",""r"",""c"",""m"""))
+ end
+ pos = [1,2,0,find(dims>1,1)];
+ d=pos(find(d==["r","c","*","m"]))
+ else
+ error(msprintf(_("%s: Wrong type for input argument #%d: A string or scalar expected.\n"),"cumsum",2))
+ end
+
+ // Check third argument
+ if type(typ)<>10 then
+ error(msprintf(_("%s: Wrong type for input argument #%d: A string expected.\n"),"cumsum",3))
+ end
+
+ if size(typ,"*")<>1 then
+ error(msprintf(_("%s: Wrong size for input argument #%d: A string expected.\n"),"cumsum",3))
+ end
+
+ if and(typ <> ["native" "double"]) then
+ error(msprintf(_("%s: Wrong value for input argument #%d: ""%s"" or ""%s"" expected.\n"),"cumsum", 3, "native", "double"));
+ end
+
+// rhs=argn(2);
+// dims=size(a)
+// if rhs==1 then
+// typ=list()
+// d=0 //"*"
+// else
+// // call cumsum(a, d) or cumsum(a, d, typ)
+// // d must be a string or scalar -> check type and size
+// if and(type(d)<> [1, 10]) then
+// error(msprintf(_("%s: Wrong type for input argument #%d: A string or scalar expected.\n"),"cumsum",2))
+// end
+//
+// if size(d,"*")<>1 then
+// if type(d)==10 then
+// error(msprintf(_("%s: Wrong size for input argument #%d: A string expected.\n"),"cumsum",2))
+// else
+// error(msprintf(_("%s: Wrong size for input argument #%d: A scalar expected.\n"),"cumsum",2))
+// end
+// end
+//
+// // call cumsum(a, d) with d = "native" or "double"
+// if rhs == 2 & or(d==["native","double"]) then
+// typ=list(d)
+// d=0 //"*"
+// else
+// // call cumsum(a, d) with d is a string or scalar
+// // or cumsum(a, d, typ)
+// // If d is a string, d = "m", "c", "r" or "*"
+// // Else d is an integer > 0
+// if type(d)==10 then
+// d=find(d==["m","*","r","c"])
+// if d==[] then
+// error(msprintf(_("%s: Wrong value for input argument #%d: Must be in the set {%s}.\n"),..
+// "cumsum",2,"""*"",""r"",""c"",""m"",1:"+string(ndims(a))))
+// end
+// d=d-2
+// else
+// if d<0 then
+// error(msprintf(_("%s: Wrong value for input argument #%d: Must be in the set {%s}.\n"),..
+// "cumsum",2,"""*"",""r"",""c"",""m"",1:"+string(ndims(a))))
+// end
+// end
+//
+// if d==-1 then
+// //cumsum(x,'m'), determine the summation direction
+// d=find(dims>1,1)
+// if d==[] then d=0,end
+// end
+//
+// if rhs == 3 then
+// if type(typ)<>10 then
+// error(msprintf(_("%s: Wrong type for input argument #%d: A string expected.\n"),"cumsum",3))
+// end
+//
+// if size(typ,"*")<>1 then
+// error(msprintf(_("%s: Wrong size for input argument #%d: A string expected.\n"),"cumsum",3))
+// end
+//
+// if and(typ <> ["native", "double"]) then
+// error(msprintf(_("%s: Wrong value for input argument #%d: ""%s"" or ""%s"" expected.\n"),"cumsum", 3, "native", "double"));
+// end
+// typ=list(typ)
+// else
+// typ=list()
+// end
+// end
+// end
+
+ if typ<>"native" then
+ r=sparse(dims,0,dims);
+ else
+ r=sparse(dims,%f,dims);
+ end
+
+ select d
+ case 0 then
+ ij=spget(a)
+ if size(ij,1)==0 then return,end
+ if dims(1)==1 then
+ mnj=min(ij(:,2))
+ r(1,mnj:$)=sparse(cumsum(full(a(1,mnj:$)),typ))
+ elseif dims(2)==1 then
+ mni=min(ij(:,1))
+ r(mni:$,1)=sparse(cumsum(full(a(mni:$,1)),typ))
+ else
+ mnj=min(ij(:,2))
+ r(:,mnj:dims(2))=sparse(cumsum(full(a(:,mnj:$)),typ))
+ end
+ case 1 then
+ for k=1:dims(2)
+ ij=spget(a(:,k))
+ if size(ij,1)<>0 then
+ mni=min(ij(:,1))
+ r(mni:$,k)=sparse(cumsum(full(a(mni:$,k)),typ))
+ end
+ end
+ case 2 then
+ for k=1:dims(1)
+ ij=spget(a(k,:))
+ if size(ij,1)<>0 then
+ mnj=min(ij(:,2))
+ r(k,mnj:$)=sparse(cumsum(full(a(k,mnj:$)),typ))
+ end
+ end
+ else
+ if typ=="native" then
+ r=a
+ else
+ r=bool2s(a)
+ end
+ end
+
+endfunction
diff --git a/modules/overloading/macros/%spb_diag.bin b/modules/overloading/macros/%spb_diag.bin
new file mode 100755
index 000000000..244b9cbcd
--- /dev/null
+++ b/modules/overloading/macros/%spb_diag.bin
Binary files differ
diff --git a/modules/overloading/macros/%spb_diag.sci b/modules/overloading/macros/%spb_diag.sci
new file mode 100755
index 000000000..011dca2b0
--- /dev/null
+++ b/modules/overloading/macros/%spb_diag.sci
@@ -0,0 +1,34 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function d=%spb_diag(a,k)
+ // g_diag - implement diag function for sparse matrix, rational matrix ,..
+
+ [lhs,rhs]=argn(0)
+ if rhs==1 then k=0,end
+ [ij,v,sz]=spget(a)
+ m=sz(1);n=sz(2)
+ if m>1&n>1 then
+ l=find(ij(:,1)==(ij(:,2)-k))
+ if k<=0 then
+ mn=min(m,n-k)
+ else
+ mn=min(m+k,n)
+ end
+ kk=abs(k)
+ d=sparse([ij(l,1),ones(ij(l,1))],v(l),[mn,1])
+ else
+ nn = max(m,n)+abs(k)
+ if ij==[] then
+ d=sparse([],[],[nn,nn])
+ else
+ d=sparse([ij(:,1),ij(:,1)+k],v,[nn,nn])
+ end
+ end
+endfunction
diff --git a/modules/overloading/macros/%spb_e.bin b/modules/overloading/macros/%spb_e.bin
new file mode 100755
index 000000000..7bc42d572
--- /dev/null
+++ b/modules/overloading/macros/%spb_e.bin
Binary files differ
diff --git a/modules/overloading/macros/%spb_e.sci b/modules/overloading/macros/%spb_e.sci
new file mode 100755
index 000000000..ae56d8aac
--- /dev/null
+++ b/modules/overloading/macros/%spb_e.sci
@@ -0,0 +1,20 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function r=%spb_e(i,j,a)
+ // r=a(i,j) for f sparse in some special cases
+ //!
+
+ [lhs,rhs]=argn(0)
+ if rhs==2 then
+ a=j;
+ a=a(:)
+ r=a(i)
+ end
+endfunction
diff --git a/modules/overloading/macros/%spb_f_b.bin b/modules/overloading/macros/%spb_f_b.bin
new file mode 100755
index 000000000..4b6121f39
--- /dev/null
+++ b/modules/overloading/macros/%spb_f_b.bin
Binary files differ
diff --git a/modules/overloading/macros/%spb_f_b.sci b/modules/overloading/macros/%spb_f_b.sci
new file mode 100755
index 000000000..8b772ce96
--- /dev/null
+++ b/modules/overloading/macros/%spb_f_b.sci
@@ -0,0 +1,15 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function r=%spb_f_b(a,b)
+ // perform [a;b] where a is a boolean sparse matrix
+ // and b a boolean matrix
+
+ r=[a;sparse(b)]
+endfunction
diff --git a/modules/overloading/macros/%spb_g_b.bin b/modules/overloading/macros/%spb_g_b.bin
new file mode 100755
index 000000000..312473698
--- /dev/null
+++ b/modules/overloading/macros/%spb_g_b.bin
Binary files differ
diff --git a/modules/overloading/macros/%spb_g_b.sci b/modules/overloading/macros/%spb_g_b.sci
new file mode 100755
index 000000000..5941039f1
--- /dev/null
+++ b/modules/overloading/macros/%spb_g_b.sci
@@ -0,0 +1,15 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function r=%spb_g_b(a,b)
+ // perform a|b where a is a boolean sparse matrix
+ // and b a boolean matrix
+
+ r=a|sparse(b)
+endfunction
diff --git a/modules/overloading/macros/%spb_g_spb.bin b/modules/overloading/macros/%spb_g_spb.bin
new file mode 100755
index 000000000..85a256be9
--- /dev/null
+++ b/modules/overloading/macros/%spb_g_spb.bin
Binary files differ
diff --git a/modules/overloading/macros/%spb_g_spb.sci b/modules/overloading/macros/%spb_g_spb.sci
new file mode 100755
index 000000000..98623008e
--- /dev/null
+++ b/modules/overloading/macros/%spb_g_spb.sci
@@ -0,0 +1,31 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function r=%spb_g_spb(a,b)
+ // perform logical elementwise or a|b where a and b are boolean sparse
+ // matrices
+
+ if prod(size(a))==1 then
+ if full(a) then
+ [mb,nb]==size(b)
+ r=(ones(mb,nb)==1)
+ else
+ r=b
+ end
+ elseif prod(size(b))==1 then
+ if full(b) then
+ [ma,na]==size(a)
+ r=(ones(ma,na)==1)
+ else
+ r=a
+ end
+ else
+ r=a|b
+ end
+endfunction
diff --git a/modules/overloading/macros/%spb_h_b.bin b/modules/overloading/macros/%spb_h_b.bin
new file mode 100755
index 000000000..b951d324d
--- /dev/null
+++ b/modules/overloading/macros/%spb_h_b.bin
Binary files differ
diff --git a/modules/overloading/macros/%spb_h_b.sci b/modules/overloading/macros/%spb_h_b.sci
new file mode 100755
index 000000000..badab511c
--- /dev/null
+++ b/modules/overloading/macros/%spb_h_b.sci
@@ -0,0 +1,15 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function r=%spb_h_b(a,b)
+ // perform logical elementwise and a&b where a is a boolean sparse matrix
+ // and b a boolean matrix
+
+ r=a&sparse(b)
+endfunction
diff --git a/modules/overloading/macros/%spb_h_spb.bin b/modules/overloading/macros/%spb_h_spb.bin
new file mode 100755
index 000000000..49477d712
--- /dev/null
+++ b/modules/overloading/macros/%spb_h_spb.bin
Binary files differ
diff --git a/modules/overloading/macros/%spb_h_spb.sci b/modules/overloading/macros/%spb_h_spb.sci
new file mode 100755
index 000000000..ca25c2ade
--- /dev/null
+++ b/modules/overloading/macros/%spb_h_spb.sci
@@ -0,0 +1,29 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function r=%spb_h_spb(a,b)
+ // perform logical elementwise and a&b where a and b are boolean sparse
+ // matrices
+
+ if prod(size(a))==1 then
+ if full(a) then
+ r=b
+ else
+ r=sparse([],[],size(b))<>0
+ end
+ elseif prod(size(b))==1 then
+ if full(b) then
+ r=a
+ else
+ r=sparse([],[],size(a))<>0
+ end
+ else
+ r=a&b
+ end
+endfunction
diff --git a/modules/overloading/macros/%spb_i_b.bin b/modules/overloading/macros/%spb_i_b.bin
new file mode 100755
index 000000000..cefaa4bd7
--- /dev/null
+++ b/modules/overloading/macros/%spb_i_b.bin
Binary files differ
diff --git a/modules/overloading/macros/%spb_i_b.sci b/modules/overloading/macros/%spb_i_b.sci
new file mode 100755
index 000000000..254198e5e
--- /dev/null
+++ b/modules/overloading/macros/%spb_i_b.sci
@@ -0,0 +1,16 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function a=%spb_i_b(i,j,b,a)
+ // %spis(i,j,b,a) insert a sparse boolean matrix b into full boolean matrix a
+ // a(i,j)=b
+ //!
+
+ a(i,j)=full(b)
+endfunction
diff --git a/modules/overloading/macros/%spb_i_ce.bin b/modules/overloading/macros/%spb_i_ce.bin
new file mode 100755
index 000000000..581872c7f
--- /dev/null
+++ b/modules/overloading/macros/%spb_i_ce.bin
Binary files differ
diff --git a/modules/overloading/macros/%spb_i_ce.sci b/modules/overloading/macros/%spb_i_ce.sci
new file mode 100755
index 000000000..6c01f2482
--- /dev/null
+++ b/modules/overloading/macros/%spb_i_ce.sci
@@ -0,0 +1,13 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA - Vincent Couvert
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function M=%spb_i_ce(varargin)
+ // Insertion of a boolean sparse matrix in a cell
+ M=generic_i_ce(varargin(:))
+endfunction
diff --git a/modules/overloading/macros/%spb_i_h.bin b/modules/overloading/macros/%spb_i_h.bin
new file mode 100755
index 000000000..accd6f0aa
--- /dev/null
+++ b/modules/overloading/macros/%spb_i_h.bin
Binary files differ
diff --git a/modules/overloading/macros/%spb_i_h.sci b/modules/overloading/macros/%spb_i_h.sci
new file mode 100755
index 000000000..d2d0eefbe
--- /dev/null
+++ b/modules/overloading/macros/%spb_i_h.sci
@@ -0,0 +1,16 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function h=%spb_i_h(i,v,h)
+ h=generic_i_h(i,v,h)
+endfunction
+
+
+
+
diff --git a/modules/overloading/macros/%spb_i_st.bin b/modules/overloading/macros/%spb_i_st.bin
new file mode 100755
index 000000000..37c5cb4f9
--- /dev/null
+++ b/modules/overloading/macros/%spb_i_st.bin
Binary files differ
diff --git a/modules/overloading/macros/%spb_i_st.sci b/modules/overloading/macros/%spb_i_st.sci
new file mode 100755
index 000000000..8132fdb4f
--- /dev/null
+++ b/modules/overloading/macros/%spb_i_st.sci
@@ -0,0 +1,12 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function out=%spb_i_st(i,in,out)
+ out=generic_i_st(i,in,out)
+endfunction
diff --git a/modules/overloading/macros/%spb_or.bin b/modules/overloading/macros/%spb_or.bin
new file mode 100755
index 000000000..d4e1dfd70
--- /dev/null
+++ b/modules/overloading/macros/%spb_or.bin
Binary files differ
diff --git a/modules/overloading/macros/%spb_or.sci b/modules/overloading/macros/%spb_or.sci
new file mode 100755
index 000000000..5afcbe425
--- /dev/null
+++ b/modules/overloading/macros/%spb_or.sci
@@ -0,0 +1,18 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function x=%spb_or(a,flag)
+
+ if argn(2)==1 then flag="*",end
+ if flag=="*" then
+ x=find(a,1)<>[]
+ else
+ x=sum(bool2s(a),flag)>=1
+ end
+endfunction
diff --git a/modules/overloading/macros/%spb_prod.bin b/modules/overloading/macros/%spb_prod.bin
new file mode 100755
index 000000000..74f6bee48
--- /dev/null
+++ b/modules/overloading/macros/%spb_prod.bin
Binary files differ
diff --git a/modules/overloading/macros/%spb_prod.sci b/modules/overloading/macros/%spb_prod.sci
new file mode 100755
index 000000000..cc70125d3
--- /dev/null
+++ b/modules/overloading/macros/%spb_prod.sci
@@ -0,0 +1,156 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2010 - INRIA - Serge Steer
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function r=%spb_prod(varargin)
+ a = varargin(1)
+ dims = size(a);
+
+ nargs = size(varargin);
+ select nargs
+ case 1
+ d = "*";
+ typ = "double";
+ case 2
+ if or(varargin(2) == ["native", "double"]) then
+ d = "*";
+ typ = varargin(2);
+ else
+ d = varargin(2);
+ typ = "double";
+ end
+ case 3
+ d = varargin(2);
+ typ = varargin(3);
+ else
+ error(msprintf(_("%s: Wrong number of input argument(s): %d to %d expected.\n"),"prod", 1, 3));
+ end
+
+ // Check second argument : d
+ select type(d)
+ case 1
+ if size(d,'*') <> 1 then
+ error(msprintf(_("%s: Wrong size for input argument #%d: A scalar expected.\n"),"prod", 2))
+ end
+ if int(d) <> d | d < 0 then
+ error(msprintf(_("%s: Wrong value for input argument #%d: Integer >= %d expected.\n"),"prod", 2, 1))
+ end
+ case 10
+ if size(d,'*') <> 1 then
+ error(msprintf(_("%s: Wrong size for input argument #%d: A string expected.\n"),"prod",2))
+ end
+ if and(d<>["r","c","*","m"]) then
+ error(msprintf(_("%s: Wrong value for input argument #%d: Must be in the set {%s}.\n"),..
+ "prod",2,"""*"",""r"",""c"",""m"""))
+ end
+ pos = [1,2,0,find(dims>1,1)];
+ d=pos(find(d==["r","c","*","m"]))
+ else
+ error(msprintf(_("%s: Wrong type for input argument #%d: A string or scalar expected.\n"),"prod",2))
+ end
+
+ // Check third argument
+ if type(typ)<>10 then
+ error(msprintf(_("%s: Wrong type for input argument #%d: A string expected.\n"),"prod",3))
+ end
+
+ if size(typ,"*")<>1 then
+ error(msprintf(_("%s: Wrong size for input argument #%d: A string expected.\n"),"prod",3))
+ end
+
+ if and(typ <> ["native" "double"]) then
+ error(msprintf(_("%s: Wrong value for input argument #%d: ""%s"" or ""%s"" expected.\n"),"prod", 3, "native", "double"));
+ end
+
+// rhs = argn(2);
+// dims=size(a);
+// if rhs==1 then
+// typ="double";
+// d=0 //"*"
+// else
+// // call prod(a, d) or prod(a, d, typ)
+// // d must be a string or scalar -> check type and size
+// if and(type(d)<> [1, 10]) then
+// error(msprintf(_("%s: Wrong type for input argument #%d: A string or scalar expected.\n"),"prod",2))
+// end
+//
+// if size(d,"*")<>1 then
+// if type(d)==10 then
+// error(msprintf(_("%s: Wrong size for input argument #%d: A string expected.\n"),"prod",2))
+// else
+// error(msprintf(_("%s: Wrong size for input argument #%d: A scalar expected.\n"),"prod",2))
+// end
+// end
+//
+// // call prod(a, d) with d = "native" or "double"
+// if rhs == 2 & or(d==["native","double"]) then
+// typ=d;
+// d=0 //"*"
+// else
+// // If d is a string, d = "m", "*", "r" or "c"
+// // Else d is an integer > 0
+// if type(d)==10 then
+// d=find(d==["m","*","r","c"])
+// if d==[] then
+// error(msprintf(_("%s: Wrong value for input argument #%d: Must be in the set {%s}.\n"),..
+// "prod",2,"""*"",""r"",""c"",""m"",1:"+string(ndims(a))))
+// end
+// d=d-2
+// else
+// if d<0 then
+// error(msprintf(_("%s: Wrong value for input argument #%d: Must be in the set {%s}.\n"),..
+// "prod",2,"""*"",""r"",""c"",""m"",1:"+string(ndims(a))))
+// end
+// end
+//
+// if d==-1 then //'m'
+// d=find(dims>1,1)
+// if d==[] then d=0,end
+// end
+//
+// // call prod(a, d, typ)
+// // typ must be a string, equal to "native" or "double"
+// if rhs == 3 then
+// if type(typ)<>10 then
+// error(msprintf(_("%s: Wrong type for input argument #%d: A string expected.\n"),"prod",3))
+// end
+//
+// if size(typ,"*")<>1 then
+// error(msprintf(_("%s: Wrong size for input argument #%d: A string expected.\n"),"prod",3))
+// end
+//
+// if and(typ <> ["native", "double"]) then
+// error(msprintf(_("%s: Wrong value for input argument #%d: ""%s"" or ""%s"" expected.\n"),"prod", 3, "native", "double"));
+// end
+// else
+// typ="double"
+// end
+// end
+// end
+
+ select d
+ case 0 then
+ ij=spget(a)
+ r=size(ij,1)==prod(dims)
+ if typ<>"native" then r=bool2s(r),end
+ case 1 then
+ for k=1:dims(2)
+ r(1,k)=prod(a(:,k),typ)
+ end
+ r=sparse(r)
+ case 2 then
+ for k=1:dims(1)
+ r(k,1)=prod(a(k,:),typ)
+ end
+ r=sparse(r)
+ else
+ r=a
+ if typ<>"native" then r=bool2s(r),end
+ end
+
+endfunction
diff --git a/modules/overloading/macros/%spb_sum.bin b/modules/overloading/macros/%spb_sum.bin
new file mode 100755
index 000000000..b19f105d6
--- /dev/null
+++ b/modules/overloading/macros/%spb_sum.bin
Binary files differ
diff --git a/modules/overloading/macros/%spb_sum.sci b/modules/overloading/macros/%spb_sum.sci
new file mode 100755
index 000000000..869655574
--- /dev/null
+++ b/modules/overloading/macros/%spb_sum.sci
@@ -0,0 +1,182 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2010 - INRIA - Serge Steer
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function r=%spb_sum(varargin)
+ a = varargin(1)
+ dims = size(a);
+
+ nargs = size(varargin);
+ select nargs
+ case 1
+ d = "*";
+ typ = "double";
+ case 2
+ if or(varargin(2) == ["native", "double"]) then
+ d = "*";
+ typ = varargin(2);
+ else
+ d = varargin(2);
+ typ = "double";
+ end
+ case 3
+ d = varargin(2);
+ typ = varargin(3);
+ else
+ error(msprintf(_("%s: Wrong number of input argument(s): %d to %d expected.\n"),"sum", 1, 3));
+ end
+
+ // Check second argument : d
+ select type(d)
+ case 1
+ if size(d,'*') <> 1 then
+ error(msprintf(_("%s: Wrong size for input argument #%d: A scalar expected.\n"),"sum", 2))
+ end
+ if int(d) <> d | d < 0 then
+ error(msprintf(_("%s: Wrong value for input argument #%d: Integer >= %d expected.\n"),"sum", 2, 1))
+ end
+ case 10
+ if size(d,'*') <> 1 then
+ error(msprintf(_("%s: Wrong size for input argument #%d: A string expected.\n"),"sum",2))
+ end
+ if and(d<>["r","c","*","m"]) then
+ error(msprintf(_("%s: Wrong value for input argument #%d: Must be in the set {%s}.\n"),..
+ "sum",2,"""*"",""r"",""c"",""m"""))
+ end
+ pos = [1,2,0,find(dims>1,1)];
+ d=pos(find(d==["r","c","*","m"]))
+ else
+ error(msprintf(_("%s: Wrong type for input argument #%d: A string or scalar expected.\n"),"sum",2))
+ end
+
+ // Check third argument
+ if type(typ)<>10 then
+ error(msprintf(_("%s: Wrong type for input argument #%d: A string expected.\n"),"sum",3))
+ end
+
+ if size(typ,"*")<>1 then
+ error(msprintf(_("%s: Wrong size for input argument #%d: A string expected.\n"),"sum",3))
+ end
+
+ if and(typ <> ["native" "double"]) then
+ error(msprintf(_("%s: Wrong value for input argument #%d: ""%s"" or ""%s"" expected.\n"),"sum", 3, "native", "double"));
+ end
+
+// rhs=argn(2)
+// if rhs==1 then
+// d=0 //"*"
+// typ="double"
+// else
+// // call sum(a, d) or sum(a, d, typ)
+// // d must be a string or scalar -> check type and size
+// if and(type(d)<> [1, 10]) then
+// error(msprintf(_("%s: Wrong type for input argument #%d: A string or scalar expected.\n"),"sum",2))
+// end
+//
+// if size(d,"*")<>1 then
+// if type(d)==10 then
+// error(msprintf(_("%s: Wrong size for input argument #%d: A string expected.\n"),"sum",2))
+// else
+// error(msprintf(_("%s: Wrong size for input argument #%d: A scalar expected.\n"),"sum",2))
+// end
+// end
+//
+// // call sum(a, d) with d = "native" or "double"
+// if rhs == 2 & or(d==["native","double"]) then
+// typ=d
+// d=0 //"*"
+// else
+// // If d is a string, d = "m", "r", "c" or "*"
+// // Else d is an integer > 0
+// if type(d)==10 then
+// d=find(d==["m","*","r","c"])
+// if d==[] then
+// error(msprintf(_("%s: Wrong value for input argument #%d: Must be in the set {%s}.\n"),..
+// "sum",2,"""*"",""r"",""c"",""m"",1:"+string(ndims(a))))
+// end
+// d=d-2
+// else
+// if d<0 then
+// error(msprintf(_("%s: Wrong value for input argument #%d: Must be in the set {%s}.\n"),..
+// "sum",2,"""*"",""r"",""c"",""m"",1:"+string(ndims(a))))
+// end
+// end
+//
+// // call sum(a, d, typ)
+// // typ must be a string and typ must be equal to "native" or "double"
+// // check typ or size
+// if rhs == 3 then
+// if type(typ)<>10 then
+// error(msprintf(_("%s: Wrong type for input argument #%d: A string expected.\n"),"sum",3))
+// end
+//
+// if size(typ,"*")<>1 then
+// error(msprintf(_("%s: Wrong size for input argument #%d: A string expected.\n"),"sum",3))
+// end
+//
+// if and(typ <> ["native", "double"]) then
+// error(msprintf(_("%s: Wrong value for input argument #%d: ""%s"" or ""%s"" expected.\n"),"sum", 3, "native", "double"));
+// end
+// else
+// typ="double"
+// end
+// end
+// end
+//
+// dims=size(a)
+//
+// if d==-1 then
+// //sum(x,'m'), determine the summation direction
+// d=find(dims>1,1)
+// if d==[] then d=0,end
+// end
+
+ ij=spget(a);
+ select d
+ case 0 then
+ //sum of all elements
+ if typ=="native" then
+ r=size(ij,1)<>0
+ else
+ r=size(ij,1)
+ end
+ case 1 then
+ if typ=="native" then
+ r(1,dims(2))=%f
+ for k=1:dims(2)
+ r(k)=or(ij(:,2)==k)
+ end
+ else
+ r=zeros(1,dims(2));
+ for k=1:dims(2)
+ r(k)=size(find(ij(:,2)==k),"*")
+ end
+ end
+ r=sparse(r)
+ case 2 then
+ if typ=="native" then
+ r(dims(1),1)=%f
+ for k=1:dims(1)
+ r(k)=or(ij(:,1)==k)
+ end
+ else
+ r=zeros(ndims(1),1);
+ for k=1:dims(1)
+ r(k)=size(find(ij(:,1)==k),"*")
+ end
+ end
+ r=sparse(r)
+ else
+ if typ=="native" then
+ r=a
+ else
+ r=sparse(ij,ones(size(ij,1),1),dims)
+ end
+ end
+
+endfunction
diff --git a/modules/overloading/macros/%spb_tril.bin b/modules/overloading/macros/%spb_tril.bin
new file mode 100755
index 000000000..2b07b41dc
--- /dev/null
+++ b/modules/overloading/macros/%spb_tril.bin
Binary files differ
diff --git a/modules/overloading/macros/%spb_tril.sci b/modules/overloading/macros/%spb_tril.sci
new file mode 100755
index 000000000..50a4c0b9d
--- /dev/null
+++ b/modules/overloading/macros/%spb_tril.sci
@@ -0,0 +1,20 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function d=%spb_tril(a,k)
+
+
+ [lhs,rhs]=argn(0)
+ if rhs==1 then k=0,end
+
+ [ij,v,sz]=spget(a)
+ m=sz(1);n=sz(2)
+ l=find(ij(:,1)>=(ij(:,2)-k))
+ d=sparse(ij(l,:),v(l),[m,n])
+endfunction
diff --git a/modules/overloading/macros/%spb_triu.bin b/modules/overloading/macros/%spb_triu.bin
new file mode 100755
index 000000000..f98d72038
--- /dev/null
+++ b/modules/overloading/macros/%spb_triu.bin
Binary files differ
diff --git a/modules/overloading/macros/%spb_triu.sci b/modules/overloading/macros/%spb_triu.sci
new file mode 100755
index 000000000..bdd0b905c
--- /dev/null
+++ b/modules/overloading/macros/%spb_triu.sci
@@ -0,0 +1,19 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function d=%spb_triu(a,k)
+
+ [lhs,rhs]=argn(0)
+ if rhs==1 then k=0,end
+
+ [ij,v,sz]=spget(a)
+ m=sz(1);n=sz(2)
+ l=find(ij(:,1)<=(ij(:,2)-k))
+ d=sparse(ij(l,:),v(l),[m,n])
+endfunction
diff --git a/modules/overloading/macros/%st_6.bin b/modules/overloading/macros/%st_6.bin
new file mode 100755
index 000000000..dfde64844
--- /dev/null
+++ b/modules/overloading/macros/%st_6.bin
Binary files differ
diff --git a/modules/overloading/macros/%st_6.sci b/modules/overloading/macros/%st_6.sci
new file mode 100755
index 000000000..11cdc3f8b
--- /dev/null
+++ b/modules/overloading/macros/%st_6.sci
@@ -0,0 +1,54 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA - F.Delebcque , Serge Steer
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function s=%st_6(varargin)
+
+ // called in the context of complex struct insertion
+ // to realize partial extraction
+
+ nind=size(varargin)-1; //the number of indexes
+ s=varargin($); // the struct
+ if size(varargin)==2 & type(varargin(1))==10 then //X.b extraction assumed
+ f=getfield(1,s);
+ if or(varargin(1)==f(3:$)) then //field exists
+ // perform standard field extraction
+ s=%st_e(varargin(:));
+ else //field does not exists
+ // return empty struct
+ //s=mlist(['st','dims'],int32([0 0]))
+ // return empty matrix
+ s=[]
+ end
+
+ else //X(i,j,k) extraction assumed
+ //check if indexes are in the dimension bounds
+ dims=s.dims
+ if size(dims,"*")<nind then dims($:nind)=1;end
+ if size(dims,"*")>nind then dims=[dims(1:nind-1) prod(dims(nind:$))];end
+
+ indmax=ones(1,nind);
+ for k=1:nind,indmax(k)=max(varargin(k));end
+
+ if and(indmax<=dims) then //Yes
+ // perform standard sub-matrix extraction
+ s=%st_e(varargin(:));
+ else // i,j,k out of bounds
+ f=getfield(1,s);f=f(3:$);
+ if f==[] then
+ // the original struct has no field return an empty struct
+ s.dims=int32([0 0]);
+ else
+ // return a 1x1 struct with fields set to []
+ for k=1:size(f,"*"),setfield(k+2,[],s);end
+ s.dims=int32([1 1]);
+ end
+ end
+ end
+endfunction
+
diff --git a/modules/overloading/macros/%st_c_st.bin b/modules/overloading/macros/%st_c_st.bin
new file mode 100755
index 000000000..571173638
--- /dev/null
+++ b/modules/overloading/macros/%st_c_st.bin
Binary files differ
diff --git a/modules/overloading/macros/%st_c_st.sci b/modules/overloading/macros/%st_c_st.sci
new file mode 100755
index 000000000..7e98f9546
--- /dev/null
+++ b/modules/overloading/macros/%st_c_st.sci
@@ -0,0 +1,35 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function R=%st_c_st(M1,M2)
+
+ d1=M1.dims;
+ d2=M2.dims;
+ if size(d1,"*")<>size(d2,"*") then
+ error(msprintf(_("%s: In concatenation the number of dimensions for each component must match.\n"),"%st_c_st"));
+ end
+ F=getfield(1,M1)
+ if or(F<>getfield(1,M2)) then
+ error(msprintf(_("%s: Field names mismatch.\n"),"%st_c_st"));
+ end
+ kd=find(d1<>d2)
+
+ kd(find(kd==2))=[]
+
+ if kd<>[] then
+ error(msprintf(_("%s: Inconsistent dimensions.\n"),"%st_c_st"));
+ end
+ newdim=d1;newdim(2)=d1(2)+d2(2)
+ R=mlist(F,newdim)
+ for k=3:size(F,"*") //loop on fields
+ x1=getfield(k,M1),if type(x1)<>15 then x1=list(x1),end
+ x2=getfield(k,M2),if type(x2)<>15 then x2=list(x2),end
+ setfield(k,lstcat(x1,x2),R)
+ end
+endfunction
diff --git a/modules/overloading/macros/%st_e.bin b/modules/overloading/macros/%st_e.bin
new file mode 100755
index 000000000..dd008d7ea
--- /dev/null
+++ b/modules/overloading/macros/%st_e.bin
Binary files differ
diff --git a/modules/overloading/macros/%st_e.sci b/modules/overloading/macros/%st_e.sci
new file mode 100755
index 000000000..11e81fd83
--- /dev/null
+++ b/modules/overloading/macros/%st_e.sci
@@ -0,0 +1,107 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function s=%st_e(varargin)
+ //extraction from struct
+ w=varargin($);
+ if type(varargin(1))==4 then
+ varargin(1)=find(varargin(1)); // Bug #7244
+ end
+ if type(varargin(1))==15 //x(i,j,k).f or x.f(i,j,k)
+ index=varargin($-1);
+ if type(index($))==10 then //x(i,j,k).f
+ f=index($);
+ //ijk=list2vec(index(1));
+ [indx,I]=convertindex(double(w.dims),index(1)(:));
+ // I<->ijk
+ all_fields=getfield(1,w);all_fields=all_fields(3:$);
+ fieldnum=find(f==all_fields);
+ if fieldnum==[] then error(msprintf(gettext("%s: Invalid field name.\n"),"%st_e")); end
+ good_list=getfield(2+fieldnum,w);
+ if size(I,"*")==1 then
+ s=good_list(I) //list(good_list(I)) ?
+ else
+ s=list();
+ for kk=1:size(I,"*")
+ s(kk)=good_list(I(kk));end
+ end
+ return;
+ else //x.f(i,j,k)
+ f=index(1);
+ li=w(f);
+ [indx,I]=convertindex(double(w.dims),index($)(:));
+ s=li(I);
+ return;
+ end
+ end
+
+ if type(varargin(1))==10 then
+ //field x.f
+ fields=getfield(1,w);nu=find(fields(3:$)==varargin(1));
+ if nu==[] then
+ error(msprintf(gettext("%s: Wrong value for input argument #%d: not a valid field name.\n"),"%st_e",1));return;
+ end
+ s=getfield(nu+2,w);
+ if prod(getfield(2,w))==1 then s=s(1);end
+ return;
+ end
+
+ //substruct x(i,j,k...)
+ nind=size(varargin)-1
+
+ dims1=double(w.dims)
+ if nind<size(dims1,"*") then
+ //reduce the dimension according to the number of indexes
+ dims1=[dims1(1:nind-1) prod(dims1(nind:$))]
+ if size(dims1,"*")==1 then dims1=[dims1 1],end
+ end
+ //get the "linear" vector of indexes
+ [indx,I]=convertindex(dims1,varargin(1:$-1));
+ dims=zeros(1,nind)
+
+ //computing dimensions of the result
+ //following loop should be merged in the convertindex code
+ for kk=1:nind
+ ik=varargin(kk)
+
+ if or(type(ik)==[2 129]) then
+ ik=horner(ik,dims1(kk))
+ end
+ if type(ik)==4 then
+ dims(kk)=max(find(ik))
+ elseif size(ik,1)~=-1 then
+ dims(kk)=size(ik,"*")
+ else
+ dims(kk)=dims1(kk)
+ end
+ end
+
+ while dims<>[]&dims($)==1 then dims($)=[],end
+ select size(dims,"*")
+ case 0 then
+ dims=[1,1]
+ case 1 then
+ dims=[dims,1]
+ else
+ dims=matrix(dims,1,-1)
+ end
+ s=mlist(getfield(1,w),int32(dims));
+ //s=mlist(getfield(1,w),int32(indx));
+ sz=size(getfield(1,w),"*");
+ for k=3:sz
+ ww=getfield(k,w);
+ if type(ww)~=15 then ww=list(ww);end
+ //S(2,3).f1=12 -> k=3;I=6;ww(I)=12;s=mlist(["st","dims","f1"],int32([1;1]));
+ if prod(dims)==1 then
+ setfield(k,ww(I),s);
+ elseif prod(dims)>1 then
+ setfield(k,list(ww(I)),s);
+ end
+ end
+endfunction
diff --git a/modules/overloading/macros/%st_f_st.bin b/modules/overloading/macros/%st_f_st.bin
new file mode 100755
index 000000000..bf0de51ea
--- /dev/null
+++ b/modules/overloading/macros/%st_f_st.bin
Binary files differ
diff --git a/modules/overloading/macros/%st_f_st.sci b/modules/overloading/macros/%st_f_st.sci
new file mode 100755
index 000000000..9d0d39683
--- /dev/null
+++ b/modules/overloading/macros/%st_f_st.sci
@@ -0,0 +1,14 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function R=%st_f_st(M1,M2)
+
+ //R=[M1' M2']'
+ R=%st_t(%st_c_st(%st_t(M1),%st_t(M2)))
+endfunction
diff --git a/modules/overloading/macros/%st_i_b.bin b/modules/overloading/macros/%st_i_b.bin
new file mode 100755
index 000000000..d57568fee
--- /dev/null
+++ b/modules/overloading/macros/%st_i_b.bin
Binary files differ
diff --git a/modules/overloading/macros/%st_i_b.sci b/modules/overloading/macros/%st_i_b.sci
new file mode 100755
index 000000000..c3cf9384f
--- /dev/null
+++ b/modules/overloading/macros/%st_i_b.sci
@@ -0,0 +1,12 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function M=%st_i_b(varargin)
+ M=st_i_generic(varargin(:))
+endfunction
diff --git a/modules/overloading/macros/%st_i_c.bin b/modules/overloading/macros/%st_i_c.bin
new file mode 100755
index 000000000..fed3a38f6
--- /dev/null
+++ b/modules/overloading/macros/%st_i_c.bin
Binary files differ
diff --git a/modules/overloading/macros/%st_i_c.sci b/modules/overloading/macros/%st_i_c.sci
new file mode 100755
index 000000000..00454e5b6
--- /dev/null
+++ b/modules/overloading/macros/%st_i_c.sci
@@ -0,0 +1,12 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function M=%st_i_c(varargin)
+ M=st_i_generic(varargin(:))
+endfunction
diff --git a/modules/overloading/macros/%st_i_fptr.bin b/modules/overloading/macros/%st_i_fptr.bin
new file mode 100755
index 000000000..bc9f9bcec
--- /dev/null
+++ b/modules/overloading/macros/%st_i_fptr.bin
Binary files differ
diff --git a/modules/overloading/macros/%st_i_fptr.sci b/modules/overloading/macros/%st_i_fptr.sci
new file mode 100755
index 000000000..aa59a3415
--- /dev/null
+++ b/modules/overloading/macros/%st_i_fptr.sci
@@ -0,0 +1,12 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function M=%st_i_fptr(varargin)
+ M=st_i_generic(varargin(:))
+endfunction
diff --git a/modules/overloading/macros/%st_i_h.bin b/modules/overloading/macros/%st_i_h.bin
new file mode 100755
index 000000000..28226921a
--- /dev/null
+++ b/modules/overloading/macros/%st_i_h.bin
Binary files differ
diff --git a/modules/overloading/macros/%st_i_h.sci b/modules/overloading/macros/%st_i_h.sci
new file mode 100755
index 000000000..e2dcfad68
--- /dev/null
+++ b/modules/overloading/macros/%st_i_h.sci
@@ -0,0 +1,14 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function M=%st_i_h(varargin)
+ //set(handle, property_name, value)
+ set(varargin(3), varargin(1), varargin(2));
+ M=varargin(3);
+endfunction
diff --git a/modules/overloading/macros/%st_i_i.bin b/modules/overloading/macros/%st_i_i.bin
new file mode 100755
index 000000000..f25fb0f8b
--- /dev/null
+++ b/modules/overloading/macros/%st_i_i.bin
Binary files differ
diff --git a/modules/overloading/macros/%st_i_i.sci b/modules/overloading/macros/%st_i_i.sci
new file mode 100755
index 000000000..29ed9ab62
--- /dev/null
+++ b/modules/overloading/macros/%st_i_i.sci
@@ -0,0 +1,12 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function M=%st_i_i(varargin)
+ M=st_i_generic(varargin(:))
+endfunction
diff --git a/modules/overloading/macros/%st_i_ip.bin b/modules/overloading/macros/%st_i_ip.bin
new file mode 100755
index 000000000..1ba3b3315
--- /dev/null
+++ b/modules/overloading/macros/%st_i_ip.bin
Binary files differ
diff --git a/modules/overloading/macros/%st_i_ip.sci b/modules/overloading/macros/%st_i_ip.sci
new file mode 100755
index 000000000..fc1db7780
--- /dev/null
+++ b/modules/overloading/macros/%st_i_ip.sci
@@ -0,0 +1,12 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function M=%st_i_ip(varargin)
+ M=st_i_generic(varargin(:))
+endfunction
diff --git a/modules/overloading/macros/%st_i_lss.bin b/modules/overloading/macros/%st_i_lss.bin
new file mode 100755
index 000000000..8d1b64171
--- /dev/null
+++ b/modules/overloading/macros/%st_i_lss.bin
Binary files differ
diff --git a/modules/overloading/macros/%st_i_lss.sci b/modules/overloading/macros/%st_i_lss.sci
new file mode 100755
index 000000000..1923eb01f
--- /dev/null
+++ b/modules/overloading/macros/%st_i_lss.sci
@@ -0,0 +1,12 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function M=%st_i_lss(varargin)
+ M=st_i_generic(varargin(:))
+endfunction
diff --git a/modules/overloading/macros/%st_i_msp.bin b/modules/overloading/macros/%st_i_msp.bin
new file mode 100755
index 000000000..da029852e
--- /dev/null
+++ b/modules/overloading/macros/%st_i_msp.bin
Binary files differ
diff --git a/modules/overloading/macros/%st_i_msp.sci b/modules/overloading/macros/%st_i_msp.sci
new file mode 100755
index 000000000..db8a9f947
--- /dev/null
+++ b/modules/overloading/macros/%st_i_msp.sci
@@ -0,0 +1,12 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function M=%st_i_msp(varargin)
+ M=st_i_generic(varargin(:))
+endfunction
diff --git a/modules/overloading/macros/%st_i_p.bin b/modules/overloading/macros/%st_i_p.bin
new file mode 100755
index 000000000..08fc885e4
--- /dev/null
+++ b/modules/overloading/macros/%st_i_p.bin
Binary files differ
diff --git a/modules/overloading/macros/%st_i_p.sci b/modules/overloading/macros/%st_i_p.sci
new file mode 100755
index 000000000..4a1dad9d1
--- /dev/null
+++ b/modules/overloading/macros/%st_i_p.sci
@@ -0,0 +1,12 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function M=%st_i_p(varargin)
+ M=st_i_generic(varargin(:))
+endfunction
diff --git a/modules/overloading/macros/%st_i_r.bin b/modules/overloading/macros/%st_i_r.bin
new file mode 100755
index 000000000..78579580a
--- /dev/null
+++ b/modules/overloading/macros/%st_i_r.bin
Binary files differ
diff --git a/modules/overloading/macros/%st_i_r.sci b/modules/overloading/macros/%st_i_r.sci
new file mode 100755
index 000000000..9ea3e0d25
--- /dev/null
+++ b/modules/overloading/macros/%st_i_r.sci
@@ -0,0 +1,12 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function M=%st_i_r(varargin)
+ M=st_i_generic(varargin(:))
+endfunction
diff --git a/modules/overloading/macros/%st_i_s.bin b/modules/overloading/macros/%st_i_s.bin
new file mode 100755
index 000000000..a1f3bd580
--- /dev/null
+++ b/modules/overloading/macros/%st_i_s.bin
Binary files differ
diff --git a/modules/overloading/macros/%st_i_s.sci b/modules/overloading/macros/%st_i_s.sci
new file mode 100755
index 000000000..bbfdf0984
--- /dev/null
+++ b/modules/overloading/macros/%st_i_s.sci
@@ -0,0 +1,12 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function M=%st_i_s(varargin)
+ M=st_i_generic(varargin(:))
+endfunction
diff --git a/modules/overloading/macros/%st_i_sp.bin b/modules/overloading/macros/%st_i_sp.bin
new file mode 100755
index 000000000..01fe5bed8
--- /dev/null
+++ b/modules/overloading/macros/%st_i_sp.bin
Binary files differ
diff --git a/modules/overloading/macros/%st_i_sp.sci b/modules/overloading/macros/%st_i_sp.sci
new file mode 100755
index 000000000..f49a86190
--- /dev/null
+++ b/modules/overloading/macros/%st_i_sp.sci
@@ -0,0 +1,12 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function M=%st_i_sp(varargin)
+ M=st_i_generic(varargin(:))
+endfunction
diff --git a/modules/overloading/macros/%st_i_spb.bin b/modules/overloading/macros/%st_i_spb.bin
new file mode 100755
index 000000000..de0ff7667
--- /dev/null
+++ b/modules/overloading/macros/%st_i_spb.bin
Binary files differ
diff --git a/modules/overloading/macros/%st_i_spb.sci b/modules/overloading/macros/%st_i_spb.sci
new file mode 100755
index 000000000..b6f200480
--- /dev/null
+++ b/modules/overloading/macros/%st_i_spb.sci
@@ -0,0 +1,12 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function M=%st_i_spb(varargin)
+ M=st_i_generic(varargin(:))
+endfunction
diff --git a/modules/overloading/macros/%st_i_st.bin b/modules/overloading/macros/%st_i_st.bin
new file mode 100755
index 000000000..90c50f518
--- /dev/null
+++ b/modules/overloading/macros/%st_i_st.bin
Binary files differ
diff --git a/modules/overloading/macros/%st_i_st.sci b/modules/overloading/macros/%st_i_st.sci
new file mode 100755
index 000000000..ff39000f0
--- /dev/null
+++ b/modules/overloading/macros/%st_i_st.sci
@@ -0,0 +1,147 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA - F. Delebcque , Serge Steer
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function M=%st_i_st(varargin)
+
+ //insert the struct varargin($-1) into the struct varargin($)
+ //at position varargin(1), varargin(2),varargin(3),...
+ //insert the struct varargin($-1) as the field varargin(1)
+ //of the struct varargin($)
+
+ [lhs,rhs]=argn(0)
+ M=varargin($)
+ N=varargin($-1)//inserted matrix
+ dims=double(matrix(M.dims,1,-1));
+
+ if type(varargin(1))==10 //addind a new field
+ flds=getfield(1,M);flds=[flds,varargin(1)];
+ setfield(1,flds,M);setfield($+1,N,M);
+ if and(dims==[0 0]) then M.dims=int32([1 1]),end
+ else //Subscripted assignment between structures
+ //build resulting struct fields
+ FM=getfield(1,M);FM=FM(3:$);nFM=size(FM,"*")
+ FN=getfield(1,N);FN=FN(3:$);nFN=size(FN,"*")
+ FR=FM;for f=FN, if and(f<>FM) then FR=[FR,f],end,end
+
+ Nfields=size(FR,"*")
+ //computing the dimension of the result
+ nd=size(dims,"*")
+
+ olddims=dims
+
+ reduced_index=%f
+ if rhs-2>nd then //more indices than M number of dims
+ dims(nd+1:rhs-2)=1;
+ elseif rhs-2<nd then //less indices than M number of dims
+ dims=[dims(1:rhs-3) prod(dims(rhs-2:$))]
+ if size(find(dims>1),"*")>1 then reduced_index=%t,end
+ end
+ //convert N-dimensional indexes to 1-D and extend dims if necessary
+ [Ndims,I]=convertindex(list(dims,double(matrix(N.dims,1,-1))),varargin(1:$-2));Ndims=matrix(Ndims,1,-1)
+ if reduced_index&or(Ndims<>dims) then error(21),end
+ if or(Ndims>dims) then
+ //extend the destination matrix
+ I1=0
+ for k=size(Ndims,"*"):-1:1
+ ik1=(1:dims(k))';
+ if ik1<>[] then
+ if Ndims(k)>1 then
+ if size(I1,"*")>1 then
+ I1=(Ndims(k)*I1).*.ones(ik1)+ones(I1).*.(ik1-1);
+ else
+ I1=Ndims(k)*I1+ik1-1;
+ end
+ else
+ I1=Ndims(k)*I1+ik1-1;
+ end
+ end
+ end
+ v1=list();for k=1:prod(Ndims),v1(k)=[];end
+ // create the resulting matrix
+ R=mlist(["st","dims",matrix(FR,1,-1)],int32(Ndims));
+ for k=1:size(FR,"*"),setfield(2+k,v1,R),end
+ // populate it with M entries
+ for k=1:nFM
+ v2=v1;
+ kf=find(FR==FM(k));
+ w=getfield(k+2,M);
+ if type(w)<>15 then w=list(w),end
+ if type(v2)<>15 then v2=list(v2);end
+ for i=1:size(I1,"*"),
+ if w<>list() then
+ v2(I1(i)+1)=w(i);
+ else
+ v2(I1(i)+1)=[];
+ end
+ end
+ setfield(kf+2,v2,R);
+ end
+ else //the dimension agree
+ R=M
+ //does the fields agree?
+ if or(FR<>FM) then //no
+ //add new fields
+ setfield(1,["st","dims",FR],R)
+ v1=list();for k=1:prod(Ndims),v1(k)=[];end
+ for k=nFM+1:size(FR,"*")
+ setfield($+1,v1,R)
+ end
+ end
+ end
+
+ //insert N entries into result
+ for k=1:nFN
+ kf=find(FR==FN(k));
+ v2=getfield(kf+2,R);
+ w=getfield(k+2,N);
+ if type(w)<>15 then w=list(w),end
+ if type(v2)<>15 then v2=list(v2);end
+ for i=1:size(I,"*"),
+ if w<>list() then
+ if size(w)==1 then
+ v2(I(i))=w(1);
+ else
+ v2(I(i))=w(i);
+ end
+ else
+ v2(I(i))=[];
+ end
+ end
+ if length(v2)==1 then v2=v2(1);end
+ setfield(kf+2,v2,R);
+ end
+
+ //remove trailing unitary dimensions
+ if reduced_index then
+ Ndims=olddims
+ else
+ while Ndims($)==1 then Ndims($)=[],end
+ select size(Ndims,"*")
+ case 0 then
+ Ndims=[1,1]
+ case 1 then
+ k=find(olddims<>1&olddims<>0)
+ if k==[] // M was a scalar
+ if mtlb_mode() then
+ Ndims=[1,Ndims]
+ else
+ Ndims=[Ndims,1]
+ end
+ else // M was a vector
+ olddims(k)=Ndims
+ Ndims=olddims;
+ end
+ else
+ Ndims=matrix(Ndims,1,-1)
+ end
+ end
+ R.dims=int32(Ndims)
+ M=R
+ end
+endfunction
diff --git a/modules/overloading/macros/%st_matrix.bin b/modules/overloading/macros/%st_matrix.bin
new file mode 100755
index 000000000..aaa505706
--- /dev/null
+++ b/modules/overloading/macros/%st_matrix.bin
Binary files differ
diff --git a/modules/overloading/macros/%st_matrix.sci b/modules/overloading/macros/%st_matrix.sci
new file mode 100755
index 000000000..87cde1d44
--- /dev/null
+++ b/modules/overloading/macros/%st_matrix.sci
@@ -0,0 +1,33 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2011 - INRIA - Serge Steer
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function M=%st_matrix(M,varargin)
+ //implements matrix function for structs
+ if size(varargin)==1 then
+ sz=varargin(1)
+ if type(sz)<>1 then
+ error(msprintf(_("%s: Wrong type for argument #%d: Real vector expected.\n"),"matrix",2))
+ end
+ else
+ sz=[];
+ for k=1:size(varargin)
+ if size(varargin(k),"*")<>1|type(varargin(k))<>1 then
+ error(msprintf(_("%s: Wrong type for argument #%d: Real scalar expected.\n"),"matrix",k+1))
+ end
+ sz=[sz varargin(k)]
+ end
+ sz=round(sz)
+ end
+ if size(sz,"*")<2 then sz=[sz,1],end
+ Dims=size(M,"*")
+ if Dims<>prod(sz) then
+ error(msprintf(_("%s: input and output matrices must have the same number of elements.\n"),"matrix"))
+ end
+ M.dims=int32(matrix(sz,1,-1))
+endfunction
diff --git a/modules/overloading/macros/%st_n_c.bin b/modules/overloading/macros/%st_n_c.bin
new file mode 100755
index 000000000..9ea03d7ec
--- /dev/null
+++ b/modules/overloading/macros/%st_n_c.bin
Binary files differ
diff --git a/modules/overloading/macros/%st_n_c.sci b/modules/overloading/macros/%st_n_c.sci
new file mode 100755
index 000000000..fd95867fd
--- /dev/null
+++ b/modules/overloading/macros/%st_n_c.sci
@@ -0,0 +1,14 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA, Serge Steer
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function r=%st_n_c(a,b)
+ // implements r=a~=b
+ // for a a struct and b a matrix of strings
+ r=%t
+endfunction
diff --git a/modules/overloading/macros/%st_n_l.bin b/modules/overloading/macros/%st_n_l.bin
new file mode 100755
index 000000000..cc35c9e5c
--- /dev/null
+++ b/modules/overloading/macros/%st_n_l.bin
Binary files differ
diff --git a/modules/overloading/macros/%st_n_l.sci b/modules/overloading/macros/%st_n_l.sci
new file mode 100755
index 000000000..4c7d797e5
--- /dev/null
+++ b/modules/overloading/macros/%st_n_l.sci
@@ -0,0 +1,14 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA, Serge Steer
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function r=%st_n_l(a,b)
+ // implements r=a~=b
+ // for a a struct and b a list
+ r=%t
+endfunction
diff --git a/modules/overloading/macros/%st_n_mc.bin b/modules/overloading/macros/%st_n_mc.bin
new file mode 100755
index 000000000..b4604873b
--- /dev/null
+++ b/modules/overloading/macros/%st_n_mc.bin
Binary files differ
diff --git a/modules/overloading/macros/%st_n_mc.sci b/modules/overloading/macros/%st_n_mc.sci
new file mode 100755
index 000000000..644f3068c
--- /dev/null
+++ b/modules/overloading/macros/%st_n_mc.sci
@@ -0,0 +1,14 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA, Serge Steer
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function r=%st_n_mc(a,b)
+ // implements r=a~=b
+ // for a a struct and b a function
+ r=%t
+endfunction
diff --git a/modules/overloading/macros/%st_n_p.bin b/modules/overloading/macros/%st_n_p.bin
new file mode 100755
index 000000000..6b4394c3e
--- /dev/null
+++ b/modules/overloading/macros/%st_n_p.bin
Binary files differ
diff --git a/modules/overloading/macros/%st_n_p.sci b/modules/overloading/macros/%st_n_p.sci
new file mode 100755
index 000000000..ab44eddb8
--- /dev/null
+++ b/modules/overloading/macros/%st_n_p.sci
@@ -0,0 +1,14 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA, Serge Steer
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function r=%st_n_p(a,b)
+ // implements r=a~=b
+ // for a a struct and b a matrix of polynomials
+ r=%t
+endfunction
diff --git a/modules/overloading/macros/%st_n_s.bin b/modules/overloading/macros/%st_n_s.bin
new file mode 100755
index 000000000..e5e2a0d6a
--- /dev/null
+++ b/modules/overloading/macros/%st_n_s.bin
Binary files differ
diff --git a/modules/overloading/macros/%st_n_s.sci b/modules/overloading/macros/%st_n_s.sci
new file mode 100755
index 000000000..e382ec2c4
--- /dev/null
+++ b/modules/overloading/macros/%st_n_s.sci
@@ -0,0 +1,14 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA, Serge Steer
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function r=%st_n_s(a,b)
+ // implements r=a~=b
+ // for a a struct and b a matrix of floting point numbers
+ r=%t
+endfunction
diff --git a/modules/overloading/macros/%st_o_c.bin b/modules/overloading/macros/%st_o_c.bin
new file mode 100755
index 000000000..b1a19d271
--- /dev/null
+++ b/modules/overloading/macros/%st_o_c.bin
Binary files differ
diff --git a/modules/overloading/macros/%st_o_c.sci b/modules/overloading/macros/%st_o_c.sci
new file mode 100755
index 000000000..a8c5a1c6a
--- /dev/null
+++ b/modules/overloading/macros/%st_o_c.sci
@@ -0,0 +1,14 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA, Serge Steer
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function r=%st_o_c(a,b)
+ // implements r=a==b
+ // for a a struct and b a matrix of strings
+ r=%f
+endfunction
diff --git a/modules/overloading/macros/%st_o_l.bin b/modules/overloading/macros/%st_o_l.bin
new file mode 100755
index 000000000..23ecdf0c4
--- /dev/null
+++ b/modules/overloading/macros/%st_o_l.bin
Binary files differ
diff --git a/modules/overloading/macros/%st_o_l.sci b/modules/overloading/macros/%st_o_l.sci
new file mode 100755
index 000000000..511fa4d6d
--- /dev/null
+++ b/modules/overloading/macros/%st_o_l.sci
@@ -0,0 +1,14 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA, Serge Steer
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function r=%st_o_l(a,b)
+ // implements r=a==b
+ // for a a struct and b a list
+ r=%f
+endfunction
diff --git a/modules/overloading/macros/%st_o_mc.bin b/modules/overloading/macros/%st_o_mc.bin
new file mode 100755
index 000000000..709c47447
--- /dev/null
+++ b/modules/overloading/macros/%st_o_mc.bin
Binary files differ
diff --git a/modules/overloading/macros/%st_o_mc.sci b/modules/overloading/macros/%st_o_mc.sci
new file mode 100755
index 000000000..69d6c76e6
--- /dev/null
+++ b/modules/overloading/macros/%st_o_mc.sci
@@ -0,0 +1,14 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA, Serge Steer
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function r=%st_o_mc(a,b)
+ // implements r=a==b
+ // for a a struct and b a function
+ r=%f
+endfunction
diff --git a/modules/overloading/macros/%st_o_p.bin b/modules/overloading/macros/%st_o_p.bin
new file mode 100755
index 000000000..886ce6185
--- /dev/null
+++ b/modules/overloading/macros/%st_o_p.bin
Binary files differ
diff --git a/modules/overloading/macros/%st_o_p.sci b/modules/overloading/macros/%st_o_p.sci
new file mode 100755
index 000000000..9a133edc5
--- /dev/null
+++ b/modules/overloading/macros/%st_o_p.sci
@@ -0,0 +1,14 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA, Serge Steer
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function r=%st_o_p(a,b)
+ // implements r=a==b
+ // for a a struct and b a matrix of polynomials
+ r=%f
+endfunction
diff --git a/modules/overloading/macros/%st_o_s.bin b/modules/overloading/macros/%st_o_s.bin
new file mode 100755
index 000000000..99ad7faa6
--- /dev/null
+++ b/modules/overloading/macros/%st_o_s.bin
Binary files differ
diff --git a/modules/overloading/macros/%st_o_s.sci b/modules/overloading/macros/%st_o_s.sci
new file mode 100755
index 000000000..6ec90bb89
--- /dev/null
+++ b/modules/overloading/macros/%st_o_s.sci
@@ -0,0 +1,14 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA, Serge Steer
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function r=%st_o_s(a,b)
+ // implements r=a==b
+ // for a a struct and b a matrix of floting point numbers
+ r=%f
+endfunction
diff --git a/modules/overloading/macros/%st_o_tl.bin b/modules/overloading/macros/%st_o_tl.bin
new file mode 100755
index 000000000..23ecdf0c4
--- /dev/null
+++ b/modules/overloading/macros/%st_o_tl.bin
Binary files differ
diff --git a/modules/overloading/macros/%st_o_tl.sci b/modules/overloading/macros/%st_o_tl.sci
new file mode 100755
index 000000000..511fa4d6d
--- /dev/null
+++ b/modules/overloading/macros/%st_o_tl.sci
@@ -0,0 +1,14 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA, Serge Steer
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function r=%st_o_l(a,b)
+ // implements r=a==b
+ // for a a struct and b a list
+ r=%f
+endfunction
diff --git a/modules/overloading/macros/%st_p.bin b/modules/overloading/macros/%st_p.bin
new file mode 100755
index 000000000..81e51e3ce
--- /dev/null
+++ b/modules/overloading/macros/%st_p.bin
Binary files differ
diff --git a/modules/overloading/macros/%st_p.sci b/modules/overloading/macros/%st_p.sci
new file mode 100755
index 000000000..7a6260071
--- /dev/null
+++ b/modules/overloading/macros/%st_p.sci
@@ -0,0 +1,77 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+// Copyright (C) 2010 - DIGITEO - Vincent COUVERT <vincent.couvert@scilab.org>
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function %st_p(s)
+
+ //matlab-like struct display
+
+ f = getfield(1,s)
+ ll = lines()
+ t = []
+ multi = prod(double(s.dims));
+
+ // No fields
+ if size(f, "*")==2 then
+ t = strcat(string(double(s.dims)), "x") + " struct array with no fields.";
+ write(%io(2),t,"(a)");
+ return
+ end
+
+ // 0x0 struct with fields
+ if multi==0 then
+ t="0x0 struct array with fields:"
+ for k=3:size(f,"*")
+ t=[t;" "+f(k)]
+ end
+ write(%io(2),t,"(a)")
+ return
+ end
+
+ // axb struct where a<>0 & b<>0
+
+ if multi>1 then
+ t=strcat(string(double(s.dims)),"x") + " struct array with fields:";
+ end
+
+ for k=3:size(f,"*")
+ var=f(k)
+ value=s(var)
+ tp=typeof(value)
+ if tp=="st" then
+ str="[" + strcat(string(size(value)),"x")+" struct" + "]";
+ elseif type(value)> 10 then
+ str=tp
+ else
+ sz=size(value)
+ // If number of elements in value is greater than ll(1) (current page width)
+ // then we do not call sci2exp
+ // because the returned value will be ignored at line 64: size(str,"*")==1
+ // Note that ll(1)/2 elements could be the max because of colon, semi-colon and brackets added between elements by sci2exp
+ if sz(1)==1 & type(value) <> 9 & prod(sz) < ll(1) then // This line can avoid some stacksize error when field contains a big matrix
+ str=sci2exp(value,ll(1))
+ else
+ str="["+strcat(string(size(value)),"x")+" "+tp+"]"
+ end
+ end
+ txt=" "+var
+ if multi<=1 then
+ if size(str,"*")==1 then
+ txt=txt+": "+str
+ else
+ tp=typeof(value)
+ txt=txt+": "+"["+strcat(string(size(value)),"x")+" "+tp+"]"
+ end
+ end
+ t=[t;txt]
+ end
+
+ write(%io(2),t,"(a)")
+
+endfunction
diff --git a/modules/overloading/macros/%st_size.bin b/modules/overloading/macros/%st_size.bin
new file mode 100755
index 000000000..84c7d1d31
--- /dev/null
+++ b/modules/overloading/macros/%st_size.bin
Binary files differ
diff --git a/modules/overloading/macros/%st_size.sci b/modules/overloading/macros/%st_size.sci
new file mode 100755
index 000000000..49599c268
--- /dev/null
+++ b/modules/overloading/macros/%st_size.sci
@@ -0,0 +1,38 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function varargout=%st_size(M,job)
+
+ // returns dimensions of an hyper matrix
+ [lhs,rhs]=argn(0)
+ dims=matrix(double(M.dims),1,-1)
+ if rhs==2 then
+ if job=="*" then
+ varargout(1)=prod(dims)
+ return
+ elseif type(job)==1 then
+ if size(job,"*") >1 then error(msprintf(_("%s: Wrong size for input argument #%d.\n"),"%st_size",2));end
+ if job<=0|job>size(dims,"*") then
+ error(msprintf(_("%s: Wrong size or value for input argument #%d.\n"),"%st_size",2));
+ end
+ varargout(1)=dims(job)
+ else
+ error(msprintf(_("%s: Wrong value for input argument #%d.\n"),"%st_size",2))
+ end
+ return
+ end
+ if lhs==1 then
+ varargout(1)=matrix(dims,1,-1)
+ else
+ if lhs>size(dims,"*") then error(msprintf(_("%s: Wrong number of output arguments.\n"),"%st_size")),end
+ for k=1:lhs
+ varargout(k)=dims(k)
+ end
+ end
+endfunction
diff --git a/modules/overloading/macros/%st_string.bin b/modules/overloading/macros/%st_string.bin
new file mode 100755
index 000000000..2db942df8
--- /dev/null
+++ b/modules/overloading/macros/%st_string.bin
Binary files differ
diff --git a/modules/overloading/macros/%st_string.sci b/modules/overloading/macros/%st_string.sci
new file mode 100755
index 000000000..3e78b05cf
--- /dev/null
+++ b/modules/overloading/macros/%st_string.sci
@@ -0,0 +1,34 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function t=%st_string(s)
+ f=getfield(1,s)
+ ll=lines()
+ t=[]
+ for k=3:size(f,"*")
+ var=f(k)
+ value=s(var)
+ tp=typeof(value)
+ if tp=="ce" then
+ t=[t;%ce_string(value)]
+ elseif tp=="st" then
+ t=[t;%st_string(value)]
+ else
+ str=sci2exp(value,ll(1))
+ txt=" "+var+": "
+ if size(str,"*")==1 then
+ txt=txt+str
+ else
+ tp=typeof(value)
+ txt=txt+"{"+strcat(string(size(value)),"x")+" "+tp+"}"
+ end
+ t=[t;txt]
+ end
+ end
+endfunction
diff --git a/modules/overloading/macros/%st_t.bin b/modules/overloading/macros/%st_t.bin
new file mode 100755
index 000000000..e772b5b87
--- /dev/null
+++ b/modules/overloading/macros/%st_t.bin
Binary files differ
diff --git a/modules/overloading/macros/%st_t.sci b/modules/overloading/macros/%st_t.sci
new file mode 100755
index 000000000..0223661e4
--- /dev/null
+++ b/modules/overloading/macros/%st_t.sci
@@ -0,0 +1,23 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function R=%st_t(M)
+
+ D=double(M.dims)
+ if size(D,"*")>2 then
+ error(msprintf(_("%s: Wrong size for input argument #%d: Transpose can not be defined.\n"),"%st_t",1));
+ end
+ NewInd=matrix(matrix(1:prod(D),D)',1,-1)
+ F=getfield(1,M)
+ R=mlist(F,int32([D(2) D(1)]))
+ for k=3:size(F,"*")
+ v=getfield(k,M)
+ setfield(k,list(v(NewInd)),R)
+ end
+endfunction
diff --git a/modules/overloading/macros/%ticks_i_h.bin b/modules/overloading/macros/%ticks_i_h.bin
new file mode 100755
index 000000000..deceef476
--- /dev/null
+++ b/modules/overloading/macros/%ticks_i_h.bin
Binary files differ
diff --git a/modules/overloading/macros/%ticks_i_h.sci b/modules/overloading/macros/%ticks_i_h.sci
new file mode 100755
index 000000000..3fddd13a2
--- /dev/null
+++ b/modules/overloading/macros/%ticks_i_h.sci
@@ -0,0 +1,44 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function h=%ticks_i_h(i,v,h)
+ if type(i)==10 then
+ set(h,i,v)
+ elseif type(i)==15 then
+ hdl=h
+ p=i($)
+ if type(p)==1|type(p)==4|type(p)==2|type(p)==129|type(p)==15 then
+ index=i($)
+ i($)=null()
+ else
+ index=:
+ end
+ n=lstsize(i)
+ for k=1:n-1
+ p=i(k)
+ if type(p)==10 then
+ hdl=get(hdl,p),
+ elseif type(p)==1|type(p)==4|type(p)==2|type(p)==129 then
+ hdl=hdl(p)
+ elseif type(p)==15 then
+ hdl=hdl(p(:))
+ else
+ error(msprintf(_("%s: Invalid path.\n"),"%ticks_i_h"));
+ end
+ end
+ if type(index)==15 then
+ hdl=hdl(index(:))
+ else
+ hdl=hdl(index)
+ end
+ set(hdl,i($),v)
+ else
+ error(msprintf(_("%s: Wrong type for input argument #%d.\n"),"%ticks_i_h",1));
+ end
+endfunction
diff --git a/modules/overloading/macros/%xls_e.bin b/modules/overloading/macros/%xls_e.bin
new file mode 100755
index 000000000..42aad2d7b
--- /dev/null
+++ b/modules/overloading/macros/%xls_e.bin
Binary files differ
diff --git a/modules/overloading/macros/%xls_e.sci b/modules/overloading/macros/%xls_e.sci
new file mode 100755
index 000000000..f27566789
--- /dev/null
+++ b/modules/overloading/macros/%xls_e.sci
@@ -0,0 +1,13 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function S=%xls_e(i,sheets)
+ //extract a sheet aout a set of sheets
+ S=sheets.sheets(i)
+endfunction
diff --git a/modules/overloading/macros/%xls_p.bin b/modules/overloading/macros/%xls_p.bin
new file mode 100755
index 000000000..a0e4f8f3b
--- /dev/null
+++ b/modules/overloading/macros/%xls_p.bin
Binary files differ
diff --git a/modules/overloading/macros/%xls_p.sci b/modules/overloading/macros/%xls_p.sci
new file mode 100755
index 000000000..cdc59a33d
--- /dev/null
+++ b/modules/overloading/macros/%xls_p.sci
@@ -0,0 +1,18 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function %xls_p(sheets)
+ //displays excel set of sheets
+ S=sheets.sheets
+ for k=1:size(S)
+ V=S(k).value
+ name=S(k).name
+ mprintf(" %s: %dx%d\n",name,size(V,1),size(V,2))
+ end
+endfunction
diff --git a/modules/overloading/macros/%xlssheet_e.bin b/modules/overloading/macros/%xlssheet_e.bin
new file mode 100755
index 000000000..32c47cec7
--- /dev/null
+++ b/modules/overloading/macros/%xlssheet_e.bin
Binary files differ
diff --git a/modules/overloading/macros/%xlssheet_e.sci b/modules/overloading/macros/%xlssheet_e.sci
new file mode 100755
index 000000000..a38bf4556
--- /dev/null
+++ b/modules/overloading/macros/%xlssheet_e.sci
@@ -0,0 +1,21 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function R=%xlssheet_e(varargin)
+ //extract a subsheet out of an xls sheet
+ s=varargin($)
+ R=s.value;T=s.text
+ R=R(varargin(1:$-1))
+ T=T(varargin(1:$-1))
+ if and(isnan(R)) then
+ R=T
+ elseif or(isnan(R)) then
+ R=mlist(["xlssheet","name","text","value"],"",T,R)
+ end
+endfunction
diff --git a/modules/overloading/macros/%xlssheet_p.bin b/modules/overloading/macros/%xlssheet_p.bin
new file mode 100755
index 000000000..e01cd8200
--- /dev/null
+++ b/modules/overloading/macros/%xlssheet_p.bin
Binary files differ
diff --git a/modules/overloading/macros/%xlssheet_p.sci b/modules/overloading/macros/%xlssheet_p.sci
new file mode 100755
index 000000000..28778a334
--- /dev/null
+++ b/modules/overloading/macros/%xlssheet_p.sci
@@ -0,0 +1,17 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function %xlssheet_p(sheet)
+ //display a xls sheet
+ T=sheet.text
+ V=sheet.value
+ k=find(~isnan(V))
+ T(k)=string(V(k))
+ disp(T)
+endfunction
diff --git a/modules/overloading/macros/%xlssheet_size.bin b/modules/overloading/macros/%xlssheet_size.bin
new file mode 100755
index 000000000..0fecdfc05
--- /dev/null
+++ b/modules/overloading/macros/%xlssheet_size.bin
Binary files differ
diff --git a/modules/overloading/macros/%xlssheet_size.sci b/modules/overloading/macros/%xlssheet_size.sci
new file mode 100755
index 000000000..445a2be6c
--- /dev/null
+++ b/modules/overloading/macros/%xlssheet_size.sci
@@ -0,0 +1,19 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function [m,n]=%xlssheet_size(sheet,opt)
+ if argn(2)>1 then
+ m=size(sheet.value,opt)
+ else
+ m=size(sheet.value)
+ if argn(1)>1 then
+ [m,n]=(m(1),m(2))
+ end
+ end
+endfunction
diff --git a/modules/overloading/macros/%xlssheet_string.bin b/modules/overloading/macros/%xlssheet_string.bin
new file mode 100755
index 000000000..815a9cadb
--- /dev/null
+++ b/modules/overloading/macros/%xlssheet_string.bin
Binary files differ
diff --git a/modules/overloading/macros/%xlssheet_string.sci b/modules/overloading/macros/%xlssheet_string.sci
new file mode 100755
index 000000000..b17dd1bc5
--- /dev/null
+++ b/modules/overloading/macros/%xlssheet_string.sci
@@ -0,0 +1,16 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function T=%xlssheet_string(sheet)
+ //display a xls sheet
+ T=sheet.text
+ V=sheet.value
+ k=find(~isnan(V))
+ T(k)=string(V(k))
+endfunction
diff --git a/modules/overloading/macros/buildmacros.bat b/modules/overloading/macros/buildmacros.bat
new file mode 100755
index 000000000..c4e35ec40
--- /dev/null
+++ b/modules/overloading/macros/buildmacros.bat
@@ -0,0 +1 @@
+@..\..\..\bin\scilex -nwni -ns -e exec('buildmacros.sce');quit; \ No newline at end of file
diff --git a/modules/overloading/macros/buildmacros.sce b/modules/overloading/macros/buildmacros.sce
new file mode 100755
index 000000000..181b0ec1a
--- /dev/null
+++ b/modules/overloading/macros/buildmacros.sce
@@ -0,0 +1,14 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA - Allan CORNET
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+if (isdef("genlib") == %f) then
+ exec(SCI+"/modules/functions/scripts/buildmacros/loadgenlib.sce");
+end
+//------------------------------------
+genlib("overloadinglib","SCI/modules/overloading/macros",%f,%t);
+//------------------------------------
diff --git a/modules/overloading/macros/cleanmacros.bat b/modules/overloading/macros/cleanmacros.bat
new file mode 100755
index 000000000..5079dfd71
--- /dev/null
+++ b/modules/overloading/macros/cleanmacros.bat
@@ -0,0 +1,3 @@
+@del *.bin 2>NUL
+@del lib 2>NUL
+@del names 2>NUL \ No newline at end of file
diff --git a/modules/overloading/macros/createstruct.bin b/modules/overloading/macros/createstruct.bin
new file mode 100755
index 000000000..ea598c528
--- /dev/null
+++ b/modules/overloading/macros/createstruct.bin
Binary files differ
diff --git a/modules/overloading/macros/createstruct.sci b/modules/overloading/macros/createstruct.sci
new file mode 100755
index 000000000..0e0926816
--- /dev/null
+++ b/modules/overloading/macros/createstruct.sci
@@ -0,0 +1,177 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA - S. Steer, F. Delebecque, V. Couvert
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function M=createstruct(index,N)
+ // Create a struct with field pointed by index equal to N
+
+ // If index is not a list, creation is done by routines
+ if type(index)==15 then
+
+ // When only two indexes
+ if size(index)==2 then
+
+ // Second index is a fieldname
+ if type(index(2))==10 then
+
+ // First index is a numerical value or a vector of numerical values
+ if type(index(1))==1 then
+ // X(p).f = y -> index=list(p,f)
+ I=index(1)
+ if mtlb_mode() then
+ Dims=[1 max(I)]
+ else
+ Dims=[max(I) 1]
+ end
+ nmax=prod(Dims);
+ if nmax==1 then
+ M=mlist(["st","dims",index(2)],int32(Dims),N);
+ else
+ M=mlist(["st","dims",index(2)],int32(Dims));
+ //initialize the structure with empty fields
+ Li=list();for kl=1:nmax, Li(kl)=[];end
+ //set fields pointed to by index(1) to N
+ for kl=1:size(I,"*"), Li(I(kl))=N;end
+ setfield(3,Li,M);
+ end
+ return;
+ // First index is a list of numerical values
+ elseif type(index(1))==15
+ // X(p,q[,...]).f=z -> index=list(list(p,q[,...]),f)
+ I=index(1)
+ Ndims=lstsize(I) //the number of dimensions
+
+ //compute the struct dimensions from max indices values
+ Dims=[];for kDims=1:Ndims, Dims=[Dims,max(I(kDims)) ];end
+
+ //initialize the structure with empty fields
+ Li=list();for kl=1:prod(Dims),Li(kl)=[];end
+
+ //set fields pointed to by I to N
+ I1=sub2ind(Dims,I(:)) // build one dimensional index equivalent to I
+ for kl=1:size(I1,"*"), Li(I1(kl))=N;end
+
+ M=mlist(["st","dims",index(2)],int32(Dims),Li);
+ return;
+ // First index is also a fieldname
+ else
+ // X.f.g=y -> index=list(f,g)
+ M=mlist(["st","dims",index(1)],int32([1,1]),...
+ mlist(["st","dims",index(2)],int32([1,1]),N));
+ return;
+ end
+
+ // Second index is a fieldname
+ else
+ // X.f(p[,q,...])=y : index=list(f,list(p[,q,...]))
+
+ if typeof(N)=="st" then // When recursive call of createstruct
+ if type(index(2))==15 then // index=list(f,list(p,q[,...]))
+ Dims=list2vec(index(2))'
+ else // index=list(f,p)
+ if mtlb_mode() then
+ Dims=[1 index(2)]
+ else
+ Dims=[index(2) 1]
+ end
+ end
+ kmax=prod(Dims)
+ z=list()
+ for kl=1:kmax
+ z(kl)=[]
+ end
+ z(kmax)=getfield(3,N)
+ z=mlist(getfield(1,N),int32(Dims),z);
+ else
+ z(index(2)(:))=N;
+ end
+ if type(index(1))<>10 then pause,end
+ M=mlist(["st","dims",index(1)],int32([1,1]),z);
+ return;
+ end
+
+ // Any number of indexes <> 2
+ else
+ // Last index is a fieldname -> init struct
+ if type(index($))==10 then
+ M=mlist(["st","dims",index($)],int32([1,1]),N);
+ index($)=null();
+ // Last index is a numerical value or a list of numerical values
+ elseif type(index($))==1 | type(index($))==15 then
+
+ // If only one index value (happens when recursive calls to createstruct)
+ if size(index)==1 then
+ if typeof(N)=="st" then
+ if type(index($))==15 then
+ Dims=list2vec(index($))'
+ else
+ if mtlb_mode() then
+ Dims=[1 index($)]
+ else
+ Dims=[index($) 1]
+ end
+ end
+ kmax=prod(Dims)
+ if kmax==1 then
+ M=N
+ else
+ z=list()
+ for kl=1:kmax
+ z(kl)=[]
+ end
+ z(kmax)=getfield(3,N)
+ M=mlist(getfield(1,N),int32(Dims),z);
+ end
+ else
+ M(index($)(:))=N;
+ end
+ index($)=null()
+ // More than one index value
+ else
+ if typeof(N)=="st" then
+ if type(index($))==15 then
+ Dims=list2vec(index($))'
+ else
+ if mtlb_mode() then
+ Dims=[1 index($)]
+ else
+ Dims=[index($) 1]
+ end
+ end
+ kmax=prod(Dims)
+ z=list()
+ for kl=1:kmax
+ z(kl)=[]
+ end
+ z(kmax)=getfield(3,N)
+ z=mlist(getfield(1,N),int32(Dims),z);
+ else
+ z(index($)(:))=N;
+ end
+ M=mlist(["st","dims",index($-1)],int32([1,1]),z);
+ index($)=null()
+ index($)=null()
+ end
+ else
+ // This case should not happen (unknown kind of index)
+ error(msprintf(_("%s: Not implemented.\n"),"createstruct"));
+ end
+ if index==list() then
+ return
+ end
+ M=createstruct(index,M);
+ return;
+ end
+ else
+ if type(index)==10 then
+ M=mlist(["st","dims",index($)],int32([1,1]),N);
+ else
+ error(msprintf(_("%s: Not implemented.\n"),"createstruct"));
+ end
+ end
+endfunction
diff --git a/modules/overloading/macros/generic_i_ce.bin b/modules/overloading/macros/generic_i_ce.bin
new file mode 100755
index 000000000..12df32b32
--- /dev/null
+++ b/modules/overloading/macros/generic_i_ce.bin
Binary files differ
diff --git a/modules/overloading/macros/generic_i_ce.sci b/modules/overloading/macros/generic_i_ce.sci
new file mode 100755
index 000000000..efdbff3d1
--- /dev/null
+++ b/modules/overloading/macros/generic_i_ce.sci
@@ -0,0 +1,13 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA - Vincent Couvert
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function M=generic_i_ce(varargin)
+ // Generic function for insertion of any type of data in a cell
+ error(msprintf(_("%s: Wrong assignment: for insertion in cell, use e.g. x(i,j).entries=y.\n"),"generic_i_ce"));
+endfunction
diff --git a/modules/overloading/macros/generic_i_h.bin b/modules/overloading/macros/generic_i_h.bin
new file mode 100755
index 000000000..0a8e691cc
--- /dev/null
+++ b/modules/overloading/macros/generic_i_h.bin
Binary files differ
diff --git a/modules/overloading/macros/generic_i_h.sci b/modules/overloading/macros/generic_i_h.sci
new file mode 100755
index 000000000..0ac648c33
--- /dev/null
+++ b/modules/overloading/macros/generic_i_h.sci
@@ -0,0 +1,72 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function h=generic_i_h(i,v,h)
+ hsave=h
+ // if v==[] then error('Field property cannot be []'),end
+ if type(i)==10 then set(h,i,v),return,end
+ if type(i)<>15 then error(msprintf(_("%s: Wrong type for input argument #%d.\n"),"generic_i_h",1)),end
+
+ if and(type(i($))<>[1 2 4 8 129 15]) then
+ i($+1)=:
+ end
+ n=lstsize(i)
+ hdl=h;hind=[]
+ for k=1:lstsize(i)// walk down in the handle tree
+ p=i(k)
+ lasthandle=hdl,
+ if type(p)==10 then
+ hdl=get(hdl,p),
+ elseif or(type(p)==[1 2 4 8 129]) then
+ hdl=hdl(p)
+ elseif type(p)==15 then
+ hdl=hdl(p(:))
+ else
+ error("Invalid path")
+ end
+ if type(hdl)<>9 then //a leaf found
+ property=hdl
+ hdl=lasthandle
+ hind=p
+ if (k+1)==size(i) then
+ index=i($)
+ else
+ index=list(i(k+1:$))
+ end
+ break
+ end
+ end
+
+ if hind<>[] then // a property found
+ if type(index)==15 & and(type(property)<>[15 16 17]) then
+ property(index(:))=v
+ else
+ if or(size(index)<>[-1 -1]) then
+ if (index(1)=="locations" | index(1)=="labels") & size(v,"*") ~= 1 & size(property(index),"*") ~= size(v,"*") then
+ error(msprintf(_("%s: Incompatible sizes for properties ''%s'' and ''%s'': Same sizes expected.\n"), "generic_i_h", string(i($-2))+".locations", string(i($-2))+".labels"));
+ end
+ property(index)=v
+ else
+ property=v
+ end
+ end
+ if size(hdl,"*")==1 then //a single handle
+ hdl(hind)=property
+ else //mutiple handle
+ np=size(hdl,"*")
+ for k=1:np
+ h=hdl(k);h(hind)=property
+ end
+
+ end
+ else
+ error(msprintf(_("%s: Wrong type for input argument #%d.\n"),"generic_i_h",1));
+ end
+ h = hsave
+endfunction
diff --git a/modules/overloading/macros/generic_i_hm.bin b/modules/overloading/macros/generic_i_hm.bin
new file mode 100755
index 000000000..cf9c0c725
--- /dev/null
+++ b/modules/overloading/macros/generic_i_hm.bin
Binary files differ
diff --git a/modules/overloading/macros/generic_i_hm.sci b/modules/overloading/macros/generic_i_hm.sci
new file mode 100755
index 000000000..da27e3bba
--- /dev/null
+++ b/modules/overloading/macros/generic_i_hm.sci
@@ -0,0 +1,140 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function M=generic_i_hm(default_value,varargin)
+
+
+ //insertion of a matrix in an hypermatrix
+ [lhs,rhs]=argn(0)
+ rhs=rhs-1
+ M=varargin(rhs);
+ N=varargin(rhs-1);//inserted matrix
+ dims=matrix(double(M.dims),-1,1);
+ v=matrix(M.entries,-1,1);
+
+ nd=size(dims,"*")
+ olddims=dims
+
+ // adjust dimension of matrix M to number of indices
+ reduced_index=%f
+ if rhs-2>nd then
+ dims(nd+1:rhs-2)=0;
+ elseif rhs-2<nd then //less indices than M number of dims
+ dims=[dims(1:rhs-3);prod(dims(rhs-2:$))]
+ if size(find(dims>1),"*")>1 then reduced_index=%t,end
+ end
+
+ //handling special case M(....)=[]
+ if N==[] then
+ // at most only one index should not match the full
+ // corresponding dimension
+ // if yes insertion is the extraction of the complement.
+ ok=[];
+ for k=1:rhs-2
+ dk=varargin(k)
+ if or(type(dk)==[2 129]) then
+ dk=horner(dk,dims(k)),
+ elseif type(dk)==4 then
+ dk=find(dk)
+ end
+ if or(size(dk)<>-1) then
+ dk=gsort(dk);
+ if or(dk<>(dims(k):-1:1)) then
+ if dk(1)<1|dk($)>dims(k) then error(21),end
+ if ok<>[] then
+ error(msprintf(_("%s: A null assignment can have only one non-colon index.\n"),"generic_i_hm"));
+ end
+ ok=k
+ I1=1:dims(k);I1(dk)=[]
+ varargin(k)=I1
+ end
+ end
+
+ end
+
+ if size(ok,"*")==0 then
+ M=[]
+ else //use extraction
+ [Ndims,I]=convertindex(dims,varargin(1:$-2));
+ dims(ok)=size(I1,"*")
+ while dims($)==1&size(dims,"*")>2, dims($)=[],end
+ M.entries=M.entries(I);
+ if size(dims,"*")==2 then
+ M=matrix(M.entries,dims)
+ else
+ M.dims=int32(dims')
+ end
+
+ //M=M(varargin(1:rhs-2))
+ end
+
+ return
+ end
+
+
+ //convert N-dimensional indexes to 1-D and extend dims if necessary
+ [Ndims,I]=convertindex(list(dims,size(N)),varargin(1:$-2));
+ Ndims=matrix(Ndims,-1,1)
+
+
+ //if reduced_index&or(Ndims<>dims) then error(21),end
+ if or(Ndims>dims) then
+ //extend the destination matrix
+ I1=0
+ for k=size(Ndims,"*"):-1:1
+ ik1=(1:dims(k))';
+ if ik1<>[] then
+ if Ndims(k)>1 then
+ if size(I1,"*")>1 then
+ I1=(Ndims(k)*I1).*.ones(ik1)+ones(I1).*.(ik1-1);
+ else
+ I1=Ndims(k)*I1+ik1-1;
+ end
+ else
+ I1=Ndims(k)*I1+ik1-1;
+ end
+ end
+ end
+ // create the resulting matrix
+ v2=[];v2(1:prod(Ndims),1)=default_value;
+ // populate it with M entries
+ if v<>[] then v2(I1+1)=v;end
+ else
+ v2=v
+ end
+ //insert N entries into result
+ v2(I)=N(:)
+
+ //remove trailing unitary dimensions
+ if reduced_index then
+ Ndims=olddims
+ else
+ while Ndims($)==1 then Ndims($)=[],end
+ select size(Ndims,"*")
+ case 0 then
+ Ndims=[1,1]
+ case 1 then
+ k=find(olddims<>1&olddims<>0)
+ if k==[]|Ndims>prod(olddims) then //shape changed
+ if mtlb_mode() then
+ Ndims=[1,Ndims]
+ else
+ Ndims=[Ndims,1]
+ end
+ else
+ Ndims=olddims;
+ end
+ else
+ if N==[]
+ Ndims=matrix(Ndims,1,-1)
+ end
+ end
+ end
+ M=matrix(v2,Ndims)
+endfunction
diff --git a/modules/overloading/macros/generic_i_s.bin b/modules/overloading/macros/generic_i_s.bin
new file mode 100755
index 000000000..796057657
--- /dev/null
+++ b/modules/overloading/macros/generic_i_s.bin
Binary files differ
diff --git a/modules/overloading/macros/generic_i_s.sci b/modules/overloading/macros/generic_i_s.sci
new file mode 100755
index 000000000..cfc0fc987
--- /dev/null
+++ b/modules/overloading/macros/generic_i_s.sci
@@ -0,0 +1,36 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function M=generic_i_s(varargin)
+
+ [lhs,rhs]=argn(0)
+ M=varargin(rhs)
+ N=varargin(rhs-1)//inserted matrix
+ index=varargin(1) //
+ if rhs==3&(type(index)==10|type(index)==15) then
+ if type(index)<>15 then
+ M=struct()
+ M(index)=N
+ else
+ M=createstruct(index,N)
+
+ end
+ if index($)=="entries" then
+ // change struct to cell
+ f=getfield(1,M);f(1)="ce"
+ setfield(1,f,M)
+ end
+ return
+ elseif rhs==3 &(type(index)<>10 & type(index)<>15) then
+ error(msprintf(_("%s: Wrong type for input argument #%d.\n"),"generic_i_s",1));
+ else
+ error(msprintf(_("%s: Wrong number of input arguments: %d expected.\n"),"generic_i_s",3));
+ end
+endfunction
+
diff --git a/modules/overloading/macros/generic_i_st.bin b/modules/overloading/macros/generic_i_st.bin
new file mode 100755
index 000000000..304f298d6
--- /dev/null
+++ b/modules/overloading/macros/generic_i_st.bin
Binary files differ
diff --git a/modules/overloading/macros/generic_i_st.sci b/modules/overloading/macros/generic_i_st.sci
new file mode 100755
index 000000000..42e9b2bbd
--- /dev/null
+++ b/modules/overloading/macros/generic_i_st.sci
@@ -0,0 +1,25 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA - F. Delebecque
+// Copyright (C) INRIA - S. Steer
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function out=generic_i_st(i,in,out)
+
+ // out.i=in
+ // this function is called only if the i field is not already defined in out
+ //
+ if prod(out.dims)>1 then
+ error(1);
+ end
+ T=getfield(1,out);
+ T($+1)=i;setfield(1,T,out)
+ setfield($+1,in,out)
+ if double(out.dims)==[0 0] then
+ out.dims=int32([1 1]);
+ end
+endfunction
diff --git a/modules/overloading/macros/lib b/modules/overloading/macros/lib
new file mode 100755
index 000000000..7a022e5a7
--- /dev/null
+++ b/modules/overloading/macros/lib
Binary files differ
diff --git a/modules/overloading/macros/names b/modules/overloading/macros/names
new file mode 100755
index 000000000..0959cf6d8
--- /dev/null
+++ b/modules/overloading/macros/names
@@ -0,0 +1,664 @@
+%0_i_st
+%3d_i_h
+%ar_p
+%b_c_spb
+%b_diag
+%b_e
+%b_f_spb
+%b_g_s
+%b_g_spb
+%b_h_s
+%b_h_spb
+%b_i_b
+%b_i_ce
+%b_i_h
+%b_i_hm
+%b_i_s
+%b_i_sp
+%b_i_spb
+%b_i_st
+%b_iconvert
+%b_matrix
+%b_n_hm
+%b_o_hm
+%b_string
+%b_tril
+%b_triu
+%c_a_c
+%c_b_c
+%c_b_s
+%c_diag
+%c_dsearch
+%c_e
+%c_eye
+%c_f_s
+%c_i_c
+%c_i_ce
+%c_i_h
+%c_i_hm
+%c_i_lss
+%c_i_r
+%c_i_s
+%c_i_st
+%c_matrix
+%c_n_l
+%c_n_st
+%c_o_l
+%c_o_st
+%c_ones
+%c_rand
+%c_tril
+%c_triu
+%cblock_c_cblock
+%cblock_c_s
+%cblock_e
+%cblock_f_cblock
+%cblock_p
+%cblock_size
+%ce_6
+%ce_c_ce
+%ce_e
+%ce_f_ce
+%ce_i_ce
+%ce_i_s
+%ce_i_st
+%ce_matrix
+%ce_p
+%ce_size
+%ce_string
+%ce_t
+%champdat_i_h
+%choose
+%fptr_i_st
+%grayplot_i_h
+%h_i_st
+%hmS_k_hmS_generic
+%hm_1_hm
+%hm_1_s
+%hm_2_hm
+%hm_2_s
+%hm_3_hm
+%hm_3_s
+%hm_4_hm
+%hm_4_s
+%hm_5
+%hm_a_hm
+%hm_a_r
+%hm_a_s
+%hm_abs
+%hm_and
+%hm_bool2s
+%hm_c_hm
+%hm_ceil
+%hm_conj
+%hm_cos
+%hm_cumprod
+%hm_cumsum
+%hm_d_hm
+%hm_d_s
+%hm_degree
+%hm_dsearch
+%hm_e
+%hm_exp
+%hm_eye
+%hm_f_hm
+%hm_find
+%hm_floor
+%hm_g_hm
+%hm_h_hm
+%hm_i_b
+%hm_i_ce
+%hm_i_h
+%hm_i_hm
+%hm_i_i
+%hm_i_p
+%hm_i_r
+%hm_i_s
+%hm_i_st
+%hm_iconvert
+%hm_imag
+%hm_int
+%hm_isnan
+%hm_isreal
+%hm_j_hm
+%hm_j_s
+%hm_k_hm
+%hm_k_s
+%hm_log
+%hm_m_p
+%hm_m_r
+%hm_m_s
+%hm_matrix
+%hm_max
+%hm_mean
+%hm_median
+%hm_min
+%hm_n_b
+%hm_n_c
+%hm_n_hm
+%hm_n_i
+%hm_n_p
+%hm_n_s
+%hm_o_b
+%hm_o_c
+%hm_o_hm
+%hm_o_i
+%hm_o_p
+%hm_o_s
+%hm_ones
+%hm_or
+%hm_p
+%hm_prod
+%hm_q_hm
+%hm_r_s
+%hm_rand
+%hm_real
+%hm_round
+%hm_s
+%hm_s_hm
+%hm_s_r
+%hm_s_s
+%hm_sign
+%hm_sin
+%hm_size
+%hm_sqrt
+%hm_stdev
+%hm_string
+%hm_sum
+%hm_x_hm
+%hm_x_p
+%hm_x_s
+%hm_zeros
+%i_a_i
+%i_and
+%i_ascii
+%i_b_s
+%i_bezout
+%i_d_i
+%i_dsearch
+%i_e
+%i_g_i
+%i_gcd
+%i_h_i
+%i_i_ce
+%i_i_h
+%i_i_hm
+%i_i_i
+%i_i_s
+%i_i_st
+%i_lcm
+%i_length
+%i_m_i
+%i_or
+%i_r_i
+%i_round
+%i_s_i
+%i_x_i
+%ip_a_s
+%ip_i_st
+%ip_m_s
+%ip_n_ip
+%ip_o_ip
+%ip_p
+%ip_s_s
+%ip_string
+%l_i_h
+%l_i_s
+%l_i_st
+%l_isequal
+%l_n_c
+%l_n_l
+%l_n_m
+%l_n_p
+%l_n_s
+%l_n_st
+%l_o_c
+%l_o_l
+%l_o_m
+%l_o_p
+%l_o_s
+%l_o_st
+%lss_a_lss
+%lss_a_p
+%lss_a_r
+%lss_a_s
+%lss_c_lss
+%lss_c_p
+%lss_c_r
+%lss_c_s
+%lss_e
+%lss_eye
+%lss_f_lss
+%lss_f_p
+%lss_f_r
+%lss_f_s
+%lss_i_ce
+%lss_i_lss
+%lss_i_p
+%lss_i_r
+%lss_i_s
+%lss_i_st
+%lss_inv
+%lss_l_lss
+%lss_l_p
+%lss_l_r
+%lss_l_s
+%lss_m_lss
+%lss_m_p
+%lss_m_r
+%lss_m_s
+%lss_n_lss
+%lss_n_p
+%lss_n_r
+%lss_n_s
+%lss_norm
+%lss_o_lss
+%lss_o_p
+%lss_o_r
+%lss_o_s
+%lss_ones
+%lss_r_lss
+%lss_r_p
+%lss_r_r
+%lss_r_s
+%lss_rand
+%lss_s
+%lss_s_lss
+%lss_s_p
+%lss_s_r
+%lss_s_s
+%lss_size
+%lss_t
+%lss_v_lss
+%lss_v_p
+%lss_v_r
+%lss_v_s
+%lt_i_s
+%m_n_l
+%m_o_l
+%mc_i_h
+%mc_i_s
+%mc_i_st
+%mc_n_st
+%mc_o_st
+%msp_i_s
+%msp_i_st
+%msp_n_msp
+%msp_o_msp
+%msp_p
+%msp_spones
+%p_a_lss
+%p_a_r
+%p_c_lss
+%p_c_r
+%p_cumprod
+%p_cumsum
+%p_d_p
+%p_d_r
+%p_d_s
+%p_det
+%p_e
+%p_f_lss
+%p_f_r
+%p_i_ce
+%p_i_h
+%p_i_hm
+%p_i_lss
+%p_i_p
+%p_i_r
+%p_i_s
+%p_i_st
+%p_inv
+%p_j_s
+%p_k_p
+%p_k_r
+%p_k_s
+%p_l_lss
+%p_l_p
+%p_l_r
+%p_l_s
+%p_m_hm
+%p_m_lss
+%p_m_r
+%p_matrix
+%p_n_l
+%p_n_lss
+%p_n_r
+%p_o_l
+%p_o_lss
+%p_o_r
+%p_o_sp
+%p_p_s
+%p_prod
+%p_q_p
+%p_q_r
+%p_q_s
+%p_r_lss
+%p_r_p
+%p_r_r
+%p_r_s
+%p_s_lss
+%p_s_r
+%p_simp
+%p_string
+%p_sum
+%p_v_lss
+%p_v_p
+%p_v_r
+%p_v_s
+%p_x_hm
+%p_x_r
+%p_y_p
+%p_y_r
+%p_y_s
+%p_z_p
+%p_z_r
+%p_z_s
+%plist_p
+%r_0
+%r_a_hm
+%r_a_lss
+%r_a_p
+%r_a_r
+%r_a_s
+%r_c_lss
+%r_c_p
+%r_c_r
+%r_c_s
+%r_clean
+%r_cumprod
+%r_cumsum
+%r_d_p
+%r_d_r
+%r_d_s
+%r_det
+%r_diag
+%r_e
+%r_eye
+%r_f_lss
+%r_f_p
+%r_f_r
+%r_f_s
+%r_i_ce
+%r_i_hm
+%r_i_lss
+%r_i_p
+%r_i_r
+%r_i_s
+%r_i_st
+%r_inv
+%r_j_s
+%r_k_p
+%r_k_r
+%r_k_s
+%r_l_lss
+%r_l_p
+%r_l_r
+%r_l_s
+%r_m_hm
+%r_m_lss
+%r_m_p
+%r_m_r
+%r_m_s
+%r_matrix
+%r_n_lss
+%r_n_p
+%r_n_r
+%r_n_s
+%r_norm
+%r_o_lss
+%r_o_p
+%r_o_r
+%r_o_s
+%r_ones
+%r_p
+%r_p_s
+%r_prod
+%r_q_p
+%r_q_r
+%r_q_s
+%r_r_lss
+%r_r_p
+%r_r_r
+%r_r_s
+%r_rand
+%r_s
+%r_s_hm
+%r_s_lss
+%r_s_p
+%r_s_r
+%r_s_s
+%r_simp
+%r_size
+%r_string
+%r_sum
+%r_t
+%r_tril
+%r_triu
+%r_v_lss
+%r_v_p
+%r_v_r
+%r_v_s
+%r_varn
+%r_x_p
+%r_x_r
+%r_x_s
+%r_y_p
+%r_y_r
+%r_y_s
+%r_z_p
+%r_z_r
+%r_z_s
+%s_1_hm
+%s_2_hm
+%s_3_hm
+%s_4_hm
+%s_5
+%s_a_hm
+%s_a_ip
+%s_a_lss
+%s_a_r
+%s_a_sp
+%s_and
+%s_b_i
+%s_b_s
+%s_c_cblock
+%s_c_lss
+%s_c_r
+%s_c_sp
+%s_d_p
+%s_d_r
+%s_d_sp
+%s_e
+%s_f_cblock
+%s_f_lss
+%s_f_r
+%s_f_sp
+%s_g_b
+%s_g_s
+%s_h_b
+%s_h_s
+%s_i_b
+%s_i_c
+%s_i_ce
+%s_i_h
+%s_i_hm
+%s_i_lss
+%s_i_p
+%s_i_r
+%s_i_s
+%s_i_sp
+%s_i_spb
+%s_i_st
+%s_k_hm
+%s_k_p
+%s_k_r
+%s_k_sp
+%s_l_hm
+%s_l_lss
+%s_l_p
+%s_l_r
+%s_l_s
+%s_l_sp
+%s_m_hm
+%s_m_ip
+%s_m_lss
+%s_m_r
+%s_matrix
+%s_n_hm
+%s_n_l
+%s_n_lss
+%s_n_r
+%s_n_st
+%s_o_hm
+%s_o_l
+%s_o_lss
+%s_o_r
+%s_o_st
+%s_or
+%s_pow
+%s_q_hm
+%s_q_p
+%s_q_r
+%s_q_sp
+%s_r_lss
+%s_r_p
+%s_r_r
+%s_r_s
+%s_r_sp
+%s_s_hm
+%s_s_ip
+%s_s_lss
+%s_s_r
+%s_s_sp
+%s_simp
+%s_v_lss
+%s_v_p
+%s_v_r
+%s_v_s
+%s_x_hm
+%s_x_r
+%s_y_p
+%s_y_r
+%s_y_sp
+%s_z_p
+%s_z_r
+%s_z_sp
+%sp_a_s
+%sp_a_sp
+%sp_and
+%sp_c_s
+%sp_ceil
+%sp_conj
+%sp_cos
+%sp_cumprod
+%sp_cumsum
+%sp_d_s
+%sp_d_sp
+%sp_det
+%sp_diag
+%sp_e
+%sp_exp
+%sp_f_s
+%sp_floor
+%sp_i_ce
+%sp_i_h
+%sp_i_s
+%sp_i_sp
+%sp_i_st
+%sp_int
+%sp_inv
+%sp_k_s
+%sp_k_sp
+%sp_l_s
+%sp_l_sp
+%sp_length
+%sp_norm
+%sp_or
+%sp_p_s
+%sp_prod
+%sp_q_s
+%sp_q_sp
+%sp_r_s
+%sp_r_sp
+%sp_round
+%sp_s_s
+%sp_s_sp
+%sp_sin
+%sp_sqrt
+%sp_string
+%sp_sum
+%sp_tril
+%sp_triu
+%sp_y_s
+%sp_y_sp
+%sp_z_s
+%sp_z_sp
+%spb_and
+%spb_c_b
+%spb_cumprod
+%spb_cumsum
+%spb_diag
+%spb_e
+%spb_f_b
+%spb_g_b
+%spb_g_spb
+%spb_h_b
+%spb_h_spb
+%spb_i_b
+%spb_i_ce
+%spb_i_h
+%spb_i_st
+%spb_or
+%spb_prod
+%spb_sum
+%spb_tril
+%spb_triu
+%st_6
+%st_c_st
+%st_e
+%st_f_st
+%st_i_b
+%st_i_c
+%st_i_fptr
+%st_i_h
+%st_i_i
+%st_i_ip
+%st_i_lss
+%st_i_msp
+%st_i_p
+%st_i_r
+%st_i_s
+%st_i_sp
+%st_i_spb
+%st_i_st
+%st_matrix
+%st_n_c
+%st_n_l
+%st_n_mc
+%st_n_p
+%st_n_s
+%st_o_c
+%st_o_l
+%st_o_mc
+%st_o_p
+%st_o_s
+%st_o_tl
+%st_p
+%st_size
+%st_string
+%st_t
+%ticks_i_h
+%xls_e
+%xls_p
+%xlssheet_e
+%xlssheet_p
+%xlssheet_size
+%xlssheet_string
+createstruct
+generic_i_ce
+generic_i_h
+generic_i_hm
+generic_i_s
+generic_i_st
+st_i_generic
diff --git a/modules/overloading/macros/st_i_generic.bin b/modules/overloading/macros/st_i_generic.bin
new file mode 100755
index 000000000..674c31345
--- /dev/null
+++ b/modules/overloading/macros/st_i_generic.bin
Binary files differ
diff --git a/modules/overloading/macros/st_i_generic.sci b/modules/overloading/macros/st_i_generic.sci
new file mode 100755
index 000000000..0fba99b5c
--- /dev/null
+++ b/modules/overloading/macros/st_i_generic.sci
@@ -0,0 +1,27 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+
+function M=st_i_generic(varargin)
+ [lhs,rhs]=argn(0)
+ M=varargin(rhs)
+ N=varargin(rhs-1)//inserted matrix
+ index=varargin(1) //
+ if M==[] then M=struct(),M(index)=N;return;end
+ if rhs==3&(type(index)==10|type(index)==15) then
+ if type(index)==15 then
+ M=struct()
+ M(index)=N
+ else
+ M=createstruct(index,N)
+ end
+ else
+ error(1)
+ end
+
+endfunction