ã³ãã³ãã¦ã£ã³ãã®æ¶å» â clear ã¯ãã¯ã¼ã¯ã¹ãã¼ã¹ã®æ¶å» clc ã¯ã³ãã³ãã¦ã£ã³ãã®æ¶å»ã ã¡ãªã¿ã«å±¥æ´ã¯æ¶å»ãããªãã â foræã¨ifæã極å使ããªã â matlaã¯è¡åè¨ç®ã¯å¾æã ãforæã®å®è¡é度ã¯é ãã¿ããã ã§ããã ã使ããªãããã«ããã ä¾ãã°ä»¥ä¸ã®ãããªforã¨ifãæ··ãã£ããããªã³ã¼ã for i=1:10 if i>5 z(i)=i^2; else z(i)=i^(-2); end end ããã¯ä»¥ä¸ã®ããã«ããã i=1:10; z=(i>5).*i.^2+(i<=5).*i.^(-2); ããã§é«éåandã³ã¼ãããã£ããã ãã ããNaNã«ã¯æ³¨æã â è¡åã®æãåºã â A=1:0.1:100; B=1:10:100; C=A(B); ã¨ããã¨ã C=[1 2 3 4 5 6 7 8 9 10] ã¨ãªããè¡åã®ã«æãåºãã«ä¾¿å©ã C=A(1:10
{{#tags}}- {{label}}
{{/tags}}