File: %25h_i_h.sci

package info (click to toggle)
scilab-plotlib 0.41-2
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 3,196 kB
  • sloc: xml: 3,308; makefile: 15
file content (27 lines) | stat: -rw-r--r-- 866 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
function cible=%h_i_h(varargin)
 
  source=varargin($-1) //the handle to be inserted
  cible=varargin($)  //the destination handle
  ind=varargin(1)  //the path
  temp=cible(ind(1)) //ind(1) is "user_data" so temp is the user_data value
  if size(ind)==2 then
    if type(ind($))==15 then //last index is a matrix index: user_data(i,j)
      last=ind($)
      temp(last(:))=source
    else //user_data(i) or user_data.xxx
      temp(ind(2))=source
    end
  else
    if type(ind($))==15 then //last index is a matrix index: user_data.xxx....(i,j)
      temp2=temp(list(ind(2:$-1)))
      last=ind($)
      temp2(last(:))=source
      temp(list(ind(2:$-1)))=temp2
    else // user_data.xxx....(i) or user_data.xxx...yyy
      temp(list(ind(2:$)))=source
    end
  end
  cible(ind(1))=temp  //put the user data_value back into the graphic data structure
endfunction