The document provides examples of MATLAB programs, including:
1) A program to compute k given x and y values using equations involving square root, hyperbolic cosine, cosecant, and hyperbolic sine functions.
2) A program to compute k given x and y values using cosine, sine, and inverse hyperbolic tangent functions and plotting the results.
3) A program demonstrating different output formats (long, short, generic) for a variable calculated using powers, division, and roots.
4) A similar program to 3) demonstrating plot options.
5) Programs to plot multiple curves using different options, including quadratic and linear functions with labeling.
6) A program to plot a 5th
Copyright:
Attribution Non-Commercial (BY-NC)
Available Formats
Download as DOC, PDF, TXT or read online from Scribd
The document provides examples of MATLAB programs, including:
1) A program to compute k given x and y values using equations involving square root, hyperbolic cosine, cosecant, and hyperbolic sine functions.
2) A program to compute k given x and y values using cosine, sine, and inverse hyperbolic tangent functions and plotting the results.
3) A program demonstrating different output formats (long, short, generic) for a variable calculated using powers, division, and roots.
4) A similar program to 3) demonstrating plot options.
5) Programs to plot multiple curves using different options, including quadratic and linear functions with labeling.
6) A program to plot a 5th
The document provides examples of MATLAB programs, including:
1) A program to compute k given x and y values using equations involving square root, hyperbolic cosine, cosecant, and hyperbolic sine functions.
2) A program to compute k given x and y values using cosine, sine, and inverse hyperbolic tangent functions and plotting the results.
3) A program demonstrating different output formats (long, short, generic) for a variable calculated using powers, division, and roots.
4) A similar program to 3) demonstrating plot options.
5) Programs to plot multiple curves using different options, including quadratic and linear functions with labeling.
6) A program to plot a 5th
Copyright:
Attribution Non-Commercial (BY-NC)
Available Formats
Download as DOC, PDF, TXT or read online from Scribd
The document provides examples of MATLAB programs, including:
1) A program to compute k given x and y values using equations involving square root, hyperbolic cosine, cosecant, and hyperbolic sine functions.
2) A program to compute k given x and y values using cosine, sine, and inverse hyperbolic tangent functions and plotting the results.
3) A program demonstrating different output formats (long, short, generic) for a variable calculated using powers, division, and roots.
4) A similar program to 3) demonstrating plot options.
5) Programs to plot multiple curves using different options, including quadratic and linear functions with labeling.
6) A program to plot a 5th
Copyright:
Attribution Non-Commercial (BY-NC)
Available Formats
Download as DOC, PDF, TXT or read online from Scribd
x=input('enter the value of x,x=') y=input('enter the value of y,y=') k=(sqrt((x^2*cosh (100*y^3)) + csc(sqrt(4*y))))/(sinh(x^2)-20*10^-8)
2. Program for computing k, given x & y values:
x=input('enter the value of x,x=') y=input ('enter the value of y,y=') k= cos (sin (5*x*sin(4*x^6))/(1-atanh((1-x)/y^2))) plot(k,y,'*g')
3. Program to show the various format options:
a=input('enter the value of a,a=') b=input('enter the value of b,b=') c=input('enter the value of c,c=') y=a^4+(b^9/4)-6*(c)^(1/3) %disp will only show value of the variable without the variable as well. format long e disp(y) format short g disp (y) format long g disp(y) plot(a,y,'+r') 4. Program to show the various format options: a=input('enter the value of a,a=') b=input('enter the value of b,b=') c=input('enter the value of c,c=') y=a^2+(b^5/4)-6*(c)^(1/3) %disp will only show value of the variable without the variable as well. format long e disp(y) format short g disp (y) format long g disp(y) plot(a,y,'+r')
5. % Multiple Curves example using option 1
s= -2:0.01:4; %ranges of s y= s.^2 -2.*s+7;%y(s) funxns T=s + 4; % T(s) function figure (1) plot(s,y,'k', s,T,':k') % first option grid on xlabel ('Time[s]') ylabel ('speed[rad/s]') legend ('Quadratic','Linear')
x=(-2:.05:2); write the program format for the equation below for the range of x given above. p=a5*x.^5+a4*x.^4+a3*x.^3+a2*x.^2+a1.*x+a0 y=m.*x+c plot(x,p,'-*r') grid on hold on plot(x,y,':og')