• <noscript id="ecgc0"><kbd id="ecgc0"></kbd></noscript>
    <menu id="ecgc0"></menu>
  • <tt id="ecgc0"></tt>

    怎么在matlab中進行邏輯判斷

    學習和分享。

    東西/原料

    • 電腦
    • matlab軟件

    方式/步調

    1. 1

      if ~isempty(get(groot,'CurrentFigure'))     %若是現有的窗口沒有圖

      disp('There are existing figures.')         %顯示There are existing figures

      else    

      disp('There are no existing figures.')   %顯示There are no existing figures

      end

    2. 2

      if ~isempty(findobj('Tag','myFigures'))    

          disp('There are objects with this tag.')  

                  %顯示There are objects with this tag

      else    

          disp('There are no objects with this tag.')

                  %顯示There are no objects with this tag

      end

    3. 3

      if isgraphics(h,'figure')    

        disp('h is a valid figure handle.')

      else    

        disp('h is not a valid figure handle.')

      end

    4. 4

      if isequal(h,groot)    

        disp('h is the root handle')

      else    

        disp('h is not the root handle')

      end

    5. 5

      p = plot(magic(3)); 

      par = get(p,'Parent'); 

      objarray = [par{:}]'; 

      whos objarray

    6. 6

      p1 = plot(1:10); 

      p2 = p1; 

      p2 == p1

    7. 7

      l1 = line; 

      l2 = line; 

      isequal(l1,l2)

    8. 8

      t = num2str(rand); 

      fh = @(t) text(1,1,t); 

      th = cellfun(fh,{t},'UniformOutput',false);

      END
    原作者:matlab舉報
    • 發表于 2020-03-08 20:55
    • 閱讀 ( 1630 )
    • 分類:其他類型

    你可能感興趣的文章

    相關問題

    0 條評論

    請先 登錄 后評論
    聯系我們:uytrv@hotmail.com 問答工具
  • <noscript id="ecgc0"><kbd id="ecgc0"></kbd></noscript>
    <menu id="ecgc0"></menu>
  • <tt id="ecgc0"></tt>
    久久久久精品国产麻豆