%Plotting examples


%First Make a time or x axis; Two ways to do this
    
    %If you want a certin step size do this:
    timeAxis1=(-3:0.1:3);
              %(start:increment:finish)
              
    %If you want a certin number of steps, do this:
    timeAxis2=linspace(-3,3,400);
                      %linspace(start, finish, number of steps)
                      
                     
%Want to plot the functions f(t)=x^2
%                           f(t)=2*x^4-3*x+7
%                           f(t)=sin(t)*cos(t)
    
    %I want to call the variable t so 
    t=timeAxis1;

    %Create the functions:
    y1=t.^2;
    y2=2*t.^4-3*t+7;
    y3=sin(t).*cos(t);

    %do one function with timeAxis2:
    y4=timeAxis2.^6;
    
    %plot
    figure
    plot(t(:), y1(:))
    
    figure
    plot(t(:), y2(:))
    
    figure
    hold on 
    plot(t(:), y2(:),'b')
    plot(t(:), y3(:),'r')
    
    figure
    plot(timeAxis2(:), y4(:))
    
    
    
    
    
    
    
    
    
    