0% found this document useful (0 votes)
19 views5 pages

Numerical Method LabA1

The document describes a MATLAB lab experiment on numerical analysis. It includes MATLAB programs to divide a figure into grids and plot different functions, take 3 functions and plot them in the same figure, and calculate the sum of several mathematical terms and expressions.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
19 views5 pages

Numerical Method LabA1

The document describes a MATLAB lab experiment on numerical analysis. It includes MATLAB programs to divide a figure into grids and plot different functions, take 3 functions and plot them in the same figure, and calculate the sum of several mathematical terms and expressions.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

GREEN UNIVERSITY OF BANGLADESH

Department of Electrical and Electronic Engineering

Course Code: EEE-302


Course Title: Numerical Analysis Lab

Experiment Number: 01
Experiment Name :Introduction to Mathlab(PartA)
Date of Performance : 27-01-2024
Date of Submission : 05-02-2024

Submitted to: Submitted by:


Name: Abdullah Md.Zobaver Name Tonmoy Roy Akash
Designation: Lecturer ID # : 212001026
Department: EEE Dept. : EEE

Remarks:

Page 1 of 5
❖ Write a MATLAB program that will divide the figure into 11 grids, take equal
number of variables. And plot them by using the program.

% Sample data for demonstration


x = linspace(0,2*pi,500);
y = sin(x);
z = cos(y);
p = sin(x)+0.1*cos(y);
% Dividing the figure into an 3×4 grid
subplot(3, 4, 1);
plot(x, y);
title('Plot 1');
subplot(3, 4, 2);
plot(x, z);
title('Plot 2');
subplot(3, 4, 3);
plot(z, y);
title('Plot 3');
subplot(3, 4, 4);
plot(x, y);
title('Plot 4');
subplot(3, 4, 5);
plot(x, p);
title('Plot 5');
subplot(3, 4, 6);
plot(z, y);
title('Plot 6');
subplot(3, 4, 7);
plot(p, z);
title('Plot 7');
subplot(3, 4, 8);
plot(y, y);
title('Plot 8');
subplot(3, 4, 9);
plot(x, z);
title('Plot 9');
subplot(3, 4, 10);
plot(x, x);
title('Plot 10');
subplot(3, 4, 11);
plot(x, p);
title('Plot 11');

Page 2 of 5
❖ Take 3 different function and plot them into the same figure (The
function is of time (t).
clc;
clear all;
close all;
t = linspace(0, 2*pi, 100);
% Define three different functions
a = sin(t);
b = cos(t);
c = 0.5*sin(2*t);
plot(a);
hold on;
plot(b);
hold on;
plot(c);
hold on;
plot(a.^2);

Page 3 of 5

clc;
clear all;
close all;
term1 = sind(225);
term2 = cotd(30);
term3 = atan(1/2);
term4 = 10 * exp(-10);
term5 = 9 * 10^(-2);
term6 = (log10(10))^3;
term7 = (log(10))^5;

SUM = term1 + term2 + term3 + term4 + term5 + term6 + term7;

disp(SUM);


clc;
clear all;
close all;
z = sind(26);
x = cotd(62);
c = atan(6/2);
v = 6 * exp(-62);
b = 2* 10^(-2);
n = (log10(6))^ 26;
m = (log(62)) ^ 2;
result = z+x+c+v+b+n+m;
disp(result);

Page 4 of 5
Page 5 of 5

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy