conv(1:3, 4:8) 
x = 3:4; 
z = 1:5; 
y = conv(cos(conv(x, 2*z)), x) 
x = 4:5; 
y = 8 - conv(x, 1:3) 
params( (3) )
params( [3] )
d0 = (1-sqrt(3))/(4*sqrt(2)); 
d1 = -(3-sqrt(3))/(4*sqrt(2)); 
d2 = (3+sqrt(3))/(4*sqrt(2)); 
d3 = -(1+sqrt(3))/(4*sqrt(2)); 
wavelet = [d0, d1, d2, d3]; 
disp(wavelet) 
sum([ 9, 5, 3, 1 ]) 
myvar = 0.125 + 6.7
(3-4)*12/((-5+1+2*3)-(103-160+myvar))
myvar = (3-4)*12/((-5+1+2*3)-(103-160+6/8));
myvar 

z2 = 4 + 3 + 1 
if (z2==8) 
    disp(z2); 
end 
num = 0;
for i=4:6
  for j = 7:10
    for k = 2:3
      num = num + k;
    end
  end
end
num



% test 2 ------
disp('test 2 ------');

num2 = 0;
ii = 6;
while ii > 3 
  jj = 7;
  while jj < 11
    kk = 2; 
    while kk <= 3
      num2 = num2 + kk;
      kk = kk + 1; 
    end
    jj = jj + 1; 
  end
  ii = ii - 1; 
end
num2

for xx = 1:4 
  if (xx==2) 
      disp('the if is true'); 
  else
      if (xx==3) 
          disp('the elseif is true'); 
      else 
          disp('went to the 2nd else block') 
      end 
  end 
end 

for xxx = 0:4 
    if (xxx==2) 
        disp('two'); 
    elseif (xxx==3) 
        disp('three'); 
    elseif (xxx==1) 
        disp('one'); 
    else 
        disp('xxx is not 1 2 or 3.'); 
    end 
end 

mylist1 = [ 9, 5, 3, 1 ]; 
sum(mylist1) / length(mylist1) 

a = 4
disp(a:10-1)

mylist2 = [ 9, 5, 3, 1, 2, 8, 4, 2, 6];
aa = 2;
mylist2(aa:length(mylist2)-1)



% test 3 ------
disp('test 3 ------');

disp('hello'); 
ls 
disp('there'); 

mylist3 = [ 9, 5, 3, 1, 2, 8, 4, 2, 6];
swap = 1;
while (swap==1)
    swap = 0;
    % go through the list, swapping if out of order
    for index=1:length(mylist3)-1
        if (mylist3(index) > mylist3(index+1))
            % swap the order of these two
            y = mylist3(index);
            swap = 1;
            mylist3(index) = mylist3(index+1);
            mylist3(index+1) = y;
        end
    end
end
% show the sorted array
disp(mylist3)


t = 0:99; 
xxxx = cos(2*pi*5*t/100); 
plot(xxxx) 


% test 4 ------
disp('test 4 ------');

5 > 4

xxxxx = 4

if (xxxxx == 4)
    y = 1
else
    y = 2
end

while (xxxxx < 5)
    disp('hello')
    xxxxx = xxxxx + 1
end

for x6 = 1:5
    disp('hello')
end

pi = 3.1415926
x7 = cos(2*pi*10)



disp('test 5 ------');

% Add this to "calqTestCases.html"


a3 = 3*j
b = 1-a3


disp('test 5b ------');

a4 = 'hello';
b = 'there';
d = a4 + b;
disp(d);
disp(a4 + ' ' + b);


disp('test 5c ------');

x8 = 2.6;
disp('The angle is ' + x8 + ' radians.');


disp('test 5d ------');

a5 = 'hello';
b = 'hello';
c = 'hallo';

if (a5==b)
  disp('a5 equals b');
else
  disp('a5 does not equal b');
end

if (a5!=c)
  disp('a5 does not equal c');
else
  disp('a5 does equal c');
end


disp('test 5e ------');

c = 'hallo';

if (c != 'hello')
  disp('c does not equal hello');
end


disp('test 5f ------');
A = 'helloi, how are you'
A = 'there'


disp('test 5g ------');
a2 ='hello'+' '+'there'


disp('test 5h ------');
aaa = '';
length(aaa);
disp('The empty string is "' + aaa + '".');

disp('test 5i ------');
length('hello')

