-
Notifications
You must be signed in to change notification settings - Fork 2
/
Example1.m
49 lines (36 loc) · 1.01 KB
/
Example1.m
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
%Error using randperm
%K must be less than or equal to N.
%table1 = xlsread('data.xlsx');
%size(table1);%ans = 349 3
%p = randperm(size(table1,1),50);% gets random data points of 50 cols between 1 to 349
%table=[1 2 3;3 2 1];
%size(table,1);%(2 3)=>2
%X=ones(size(table,1),1);
%X;%[1;1]
%X=[X table];%[1 1 2 3;1 3 2 1]
%a=[12 13 14];
%a(a>13)=14.5;
%b=a(a>13);
%b;
%greaterThanThree=a>3;
%greaterThanThree;
%X = rand(5,3);
%n=numel(X);
%n
%plot(X,'ro-','LineWidth',3);
%legend('rand1','rand2','rand3');
%disp(' Corn Oats Hay');
%disp(X);%disp(X) displays the value of variable X without printing the variable name
%X = '<a href = "https://www.mathworks.com">MathWorks Web Site</a>';
%disp(X);
%name = 'Alice';
%age = 12;
%X = [name,' will be ',num2str(age),' this year.'];
%disp(X);
%name = 'Alice';
%age = 12;
%X = [name,' will be ',num2str(age),' this year.'];
%disp(X);
%name = 'Alice';
%age = 12;
%fprintf('%s will be %d this year.\n',name,age);