⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ft_find_element_in_all_blocks.m

📁 用matlab做的Frequency domain INterferomEter Simulation SoftwarE,在国外网站下的,还在研究中,不会用,有会用的回复我
💻 M
字号:
%---------------------------------------------------------------------  % function [block_index, line_start, line_stop, line_numbers] = FT_find_element_in_block(blocks, position, value)% % Returnes block_index and line numbers for which the element % specified by position and value has been found.%% blocks: vector of block structures% position: integer, specifying the element's position% value: double or string which is the element's content%% block_index: vector of integers, givin the blocks in which the element%              was found% line_stop, vector of integers pointing into line_numbers, see below% line_start, vector of integers pointing into line_numbers, see below% line_numbers, vector of integers, giving the lines in which %               element was found%% So, if lines 2 and 5 of block 3 contained the element the solution will include% block_index(i)=3% line_numbers(line_start(i):line_stop(i))= [2 5]%% Part of the SimTools package% Andreas Freise 22.05.08 afreise@googlemail.com%---------------------------------------------------------------------  function [block_index, line_start, line_stop, line_numbers] = FT_find_element_in_block(blocks, position, value)  % base string for error message id  baseid='FT_find_element_in_block';  if (~isstruct(blocks))    msgid=[baseid,':checkinarg'];    result='first input argument must be a block structure';    error(msgid,result);  end  block_index=[];  line_numbers=[];  line_start=[];  line_stop=[];  n_blocks=length(blocks);  index=1;  startat=1;    for i=1:n_blocks    new_lines=FT_find_element_in_active_block(blocks(i),position, value);    n_lines=length(new_lines);    if (n_lines)      block_index=[block_index,i];      line_start(index)=startat;      line_stop(index)=startat+n_lines-1;      line_numbers=[line_numbers,new_lines];      startat=startat+n_lines;      index=index+1;    end  end  

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -