iLMS知識社群(Sites)師生部落格(Blogs)朝陽首頁(Homepage)TronClass教學平台Login
Position: 曹晉翊 > Matlab
by 曹晉翊 2017-12-28 11:38:22, Reply(0), Views(157)
by 曹晉翊 2017-12-28 10:51:37, Reply(0), Views(173)
function b=Test1(A)b=iscell(A);if(b==1)    fprintf('輸入內容為異質陣列\n');else    fprintf('輸入內容不為異質陣列\n');    fprintf('是否將輸
(Read All...)
by 曹晉翊 2017-12-21 11:25:14, Reply(0), Views(115)
by 曹晉翊 2017-12-21 11:18:21, Reply(0), Views(147)
clc;clear;A={ '桌子',0,0,0;    '椅子',0,0,0} ;A{1,2}=input('輸入:');A{1,3}=input('輸入:');A{2,2}=input('輸入:');A{2,3}=input('輸入:');A{1,4}(1,1)=A{1,2}(1,1).*A{1,3}(
(Read All...)
by 曹晉翊 2017-12-21 10:28:33, Reply(0), Views(93)
clc;clear;A={'項目','數量','單價','金額';     '桌子',30,10000,0;     '椅子',120,500,0} ;A{2,4}(1,1)=A{2,2}(1,1).*A{2,3}(1,1);A{3,4}(1,1)=A{3,2}(1,
(Read All...)
by 曹晉翊 2017-11-23 10:46:33, Reply(0), Views(161)
function b=Test1(a)i=0;k=0;for j=1:length(a)if a(j)>=60    i=i+1;endif a(j)<60    k=k+1;endendfprintf('及格:%g\n',i);fprintf('不及格:%g\n',k);hist(a,100);xlabel('
(Read All...)
by 曹晉翊 2017-11-16 10:16:29, Reply(0), Views(186)
clc;clear;n=input('請輸入一個數字');fprintf('奇數');for i=1:n    if mod(i,2)==1        fprintf('%g ',i);    endendfprintf('\n');fprintf('偶
(Read All...)
by 曹晉翊 2017-11-09 10:49:42, Reply(0), Views(191)
clc;clear;sum=0;for i=1:100    sum=sum+i;      if(sum>=100&&sum<=400)        fprintf('%d ',sum);         
(Read All...)
by 曹晉翊 2017-10-19 11:46:35, Reply(0), Views(193)
clc;clear;A=1:1000;A= reshape(A,10, 100);sum(A(1):A(1000))A(end,:)=[];sum(A(1):A(900))A(end,:)=[];sum(A(1):A(800))A(end,:)=[];sum(A(1):A(700))A(end,:)=[];sum(A(1):A(600))A(end,:)=[];sum(A(1):A(500))A(
(Read All...)
by 曹晉翊 2017-10-19 10:59:40, Reply(0), Views(142)
clc;clear;t=0:0.01:1;x1=sin(120*pi*t);x2=-cos(120*pi*t);subplot(2,1,1); plot(t,x1);xlabel('t(sec)');ylabel('x1');title('x1=sin(120*pi*t)');text(0.5, sin(60*pi),'\leftarrow sample 1');sub
(Read All...)
Prev12Next