SlideShare a Scribd company logo
MATLAB PROGRAMMING (SAMPLE ASSIGNMENT)
Our online Tutors are available 24*7 to provide Help with Help with Matlab
Programming Homework/Assignment or a long term Graduate/Undergraduate Help
with Matlab Programming Project. Our Tutors being experienced and proficient in Help
with Matlab Programming ensure to provide high quality Help with Matlab Programming
Homework Help. Upload your Help with Matlab Programming Assignment at ‘Submit
Your Assignment’ button or email it to . You can
use our ‘Live Chat’ option to schedule an Online Tutoring session with our Help with
Matlab Programming Tutors.
Wave Equation on a Square Domain
This sample assignment shows how to solve the wave equation using
the hyperbolic function in the Partial Differential Equation Toolbox™.
We solve the standard second-order wave equation
on a square domain with zero Dirichlet boundary conditions on left and right and zero
Neumann boundary conditions on the top and bottom.
Problem Definition
The following variables will define our problem:
 g: A specification function that is used by initmesh. For more information, please see the
documentation page for squarereg andpdegeom.
 b: A boundary file used by assempde. For more information, please see the
documentation pages for squareb3 and pdebound.
 c, a, f, d: The coefficients of the PDE.
g='squareg';
b='squareb3';
c=1;
a=0;
f=0;
d=1;
Generate Mesh
[p,e,t]=initmesh('squareg');
figure;
pdemesh(p,e,t); axis equal
info@assignmentpedia.com
Generate Initial Conditions
The initial conditions:
 .
 .
This choice avoids putting energy into the higher vibration modes and permits a
reasonable time step size.
x=p(1,:)';
y=p(2,:)';
u0=atan(cos(pi/2*x));
ut0=3*sin(pi*x).*exp(sin(pi/2*y));
Define Time-Discretization
We want the solution at 31 points in time between 0 and 5.
n=31;
tlist=linspace(0,5,n);
Find FEM Solution
uu=hyperbolic(u0,ut0,tlist,b,p,e,t,c,a,f,d);
428 successful steps
62 failed attempts
982 function evaluations
1 partial derivatives
142 LU decompositions
981 solutions of linear systems
Animate FEM Solution
To speed up the plotting, we interpolate to a rectangular grid.
figure; set(gcf,'renderer','zbuffer');
delta=-1:0.1:1;
[uxy,tn,a2,a3]=tri2grid(p,t,uu(:,1),delta,delta);
gp=[tn;a2;a3];
newplot;
umax=max(max(uu));
umin=min(min(uu));
for i=1:n
pdeplot(p,e,t,'xydata',uu(:,i),'zdata',uu(:,i),'zstyle','continuous',...
'mesh','off','xygrid','on','gridparam',gp,'colorbar','off');
axis([-1 1 -1 1 umin umax]); caxis([umin umax]);
M(i)=getframe;
end
movie(M,1);
visit us at www.assignmentpedia.com or email us at info@assignmentpedia.com or call us at +1 520 8371215
Ad

Recommended

Basics of programming in matlab
Basics of programming in matlab
AKANKSHA GUPTA
 
Matlab for diploma students(1)
Matlab for diploma students(1)
Retheesh Raj
 
An Introduction to MATLAB for beginners
An Introduction to MATLAB for beginners
Murshida ck
 
Matlab introduction
Matlab introduction
Ameen San
 
Matlab Basic Tutorial
Matlab Basic Tutorial
Muhammad Rizwan
 
Matlab practical and lab session
Matlab practical and lab session
Dr. Krishna Mohbey
 
Introduction to matlab
Introduction to matlab
Mohan Raj
 
Matlab-free course by Mohd Esa
Matlab-free course by Mohd Esa
Mohd Esa
 
Matlab 1(operations on_matrix)
Matlab 1(operations on_matrix)
harman kaur
 
Introduction to matlab
Introduction to matlab
BilawalBaloch1
 
Brief Introduction to Matlab
Brief Introduction to Matlab
Tariq kanher
 
Matlab ppt
Matlab ppt
Dhammpal Ramtake
 
How to work on Matlab.......
How to work on Matlab.......
biinoida
 
Matlab intro
Matlab intro
fvijayami
 
B61301007 matlab documentation
B61301007 matlab documentation
Manchireddy Reddy
 
MATLAB INTRODUCTION
MATLAB INTRODUCTION
Dr. Krishna Mohbey
 
Matlab for beginners, Introduction, signal processing
Matlab for beginners, Introduction, signal processing
Dr. Manjunatha. P
 
Introduction to Matlab
Introduction to Matlab
aman gupta
 
Basic matlab and matrix
Basic matlab and matrix
Saidur Rahman
 
MATLAB BASICS
MATLAB BASICS
butest
 
Matlab intro
Matlab intro
Chaitanya Banoth
 
Matlab Introduction
Matlab Introduction
ideas2ignite
 
Matlab ppt
Matlab ppt
chestialtaff
 
MatLab Basic Tutorial On Plotting
MatLab Basic Tutorial On Plotting
MOHDRAFIQ22
 
Matlab Presentation
Matlab Presentation
Mohamed El Rayany
 
Advanced MATLAB Tutorial for Engineers & Scientists
Advanced MATLAB Tutorial for Engineers & Scientists
Ray Phan
 
Introduction to MATLAB
Introduction to MATLAB
Ravikiran A
 
Introduction to matlab
Introduction to matlab
Santosh V
 
Final
Final
Richard Kim
 
Lecture 02 visualization and programming
Lecture 02 visualization and programming
Smee Kaem Chann
 

More Related Content

What's hot (20)

Matlab 1(operations on_matrix)
Matlab 1(operations on_matrix)
harman kaur
 
Introduction to matlab
Introduction to matlab
BilawalBaloch1
 
Brief Introduction to Matlab
Brief Introduction to Matlab
Tariq kanher
 
Matlab ppt
Matlab ppt
Dhammpal Ramtake
 
How to work on Matlab.......
How to work on Matlab.......
biinoida
 
Matlab intro
Matlab intro
fvijayami
 
B61301007 matlab documentation
B61301007 matlab documentation
Manchireddy Reddy
 
MATLAB INTRODUCTION
MATLAB INTRODUCTION
Dr. Krishna Mohbey
 
Matlab for beginners, Introduction, signal processing
Matlab for beginners, Introduction, signal processing
Dr. Manjunatha. P
 
Introduction to Matlab
Introduction to Matlab
aman gupta
 
Basic matlab and matrix
Basic matlab and matrix
Saidur Rahman
 
MATLAB BASICS
MATLAB BASICS
butest
 
Matlab intro
Matlab intro
Chaitanya Banoth
 
Matlab Introduction
Matlab Introduction
ideas2ignite
 
Matlab ppt
Matlab ppt
chestialtaff
 
MatLab Basic Tutorial On Plotting
MatLab Basic Tutorial On Plotting
MOHDRAFIQ22
 
Matlab Presentation
Matlab Presentation
Mohamed El Rayany
 
Advanced MATLAB Tutorial for Engineers & Scientists
Advanced MATLAB Tutorial for Engineers & Scientists
Ray Phan
 
Introduction to MATLAB
Introduction to MATLAB
Ravikiran A
 
Introduction to matlab
Introduction to matlab
Santosh V
 
Matlab 1(operations on_matrix)
Matlab 1(operations on_matrix)
harman kaur
 
Introduction to matlab
Introduction to matlab
BilawalBaloch1
 
Brief Introduction to Matlab
Brief Introduction to Matlab
Tariq kanher
 
How to work on Matlab.......
How to work on Matlab.......
biinoida
 
Matlab intro
Matlab intro
fvijayami
 
B61301007 matlab documentation
B61301007 matlab documentation
Manchireddy Reddy
 
Matlab for beginners, Introduction, signal processing
Matlab for beginners, Introduction, signal processing
Dr. Manjunatha. P
 
Introduction to Matlab
Introduction to Matlab
aman gupta
 
Basic matlab and matrix
Basic matlab and matrix
Saidur Rahman
 
MATLAB BASICS
MATLAB BASICS
butest
 
Matlab Introduction
Matlab Introduction
ideas2ignite
 
MatLab Basic Tutorial On Plotting
MatLab Basic Tutorial On Plotting
MOHDRAFIQ22
 
Advanced MATLAB Tutorial for Engineers & Scientists
Advanced MATLAB Tutorial for Engineers & Scientists
Ray Phan
 
Introduction to MATLAB
Introduction to MATLAB
Ravikiran A
 
Introduction to matlab
Introduction to matlab
Santosh V
 

Viewers also liked (17)

Final
Final
Richard Kim
 
Lecture 02 visualization and programming
Lecture 02 visualization and programming
Smee Kaem Chann
 
Coursee
Coursee
Aqua Pie
 
Matlab Programming Tips Part 1
Matlab Programming Tips Part 1
Shameer Ahmed Koya
 
Mit6 094 iap10_lec01
Mit6 094 iap10_lec01
Tribhuwan Pant
 
Matlab Programming Assignment help , Matlab Programming Online tutors
Matlab Programming Assignment help , Matlab Programming Online tutors
john mayer
 
Lecture 19 matlab_script&function_files06
Lecture 19 matlab_script&function_files06
Aman kazmi
 
aem : Fourier series of Even and Odd Function
aem : Fourier series of Even and Odd Function
Sukhvinder Singh
 
first order system
first order system
Sanjay Kumar Menghwar
 
MATLAB Based Vehicle Number Plate Identification System using OCR
MATLAB Based Vehicle Number Plate Identification System using OCR
Ghanshyam Dusane
 
MATLAB Programming - Loop Control Part 2
MATLAB Programming - Loop Control Part 2
Shameer Ahmed Koya
 
MATLAB Programming
MATLAB Programming
محمدعبد الحى
 
Licence plate recognition using matlab programming
Licence plate recognition using matlab programming
somchaturvedi
 
Ch 02 MATLAB Applications in Chemical Engineering_陳奇中教授教學投影片
Ch 02 MATLAB Applications in Chemical Engineering_陳奇中教授教學投影片
Chyi-Tsong Chen
 
Ch 01 MATLAB Applications in Chemical Engineering_陳奇中教授教學投影片
Ch 01 MATLAB Applications in Chemical Engineering_陳奇中教授教學投影片
Chyi-Tsong Chen
 
Writing Fast MATLAB Code
Writing Fast MATLAB Code
Jia-Bin Huang
 
Product and service design
Product and service design
Grace Falcis
 
Lecture 02 visualization and programming
Lecture 02 visualization and programming
Smee Kaem Chann
 
Matlab Programming Tips Part 1
Matlab Programming Tips Part 1
Shameer Ahmed Koya
 
Matlab Programming Assignment help , Matlab Programming Online tutors
Matlab Programming Assignment help , Matlab Programming Online tutors
john mayer
 
Lecture 19 matlab_script&function_files06
Lecture 19 matlab_script&function_files06
Aman kazmi
 
aem : Fourier series of Even and Odd Function
aem : Fourier series of Even and Odd Function
Sukhvinder Singh
 
MATLAB Based Vehicle Number Plate Identification System using OCR
MATLAB Based Vehicle Number Plate Identification System using OCR
Ghanshyam Dusane
 
MATLAB Programming - Loop Control Part 2
MATLAB Programming - Loop Control Part 2
Shameer Ahmed Koya
 
Licence plate recognition using matlab programming
Licence plate recognition using matlab programming
somchaturvedi
 
Ch 02 MATLAB Applications in Chemical Engineering_陳奇中教授教學投影片
Ch 02 MATLAB Applications in Chemical Engineering_陳奇中教授教學投影片
Chyi-Tsong Chen
 
Ch 01 MATLAB Applications in Chemical Engineering_陳奇中教授教學投影片
Ch 01 MATLAB Applications in Chemical Engineering_陳奇中教授教學投影片
Chyi-Tsong Chen
 
Writing Fast MATLAB Code
Writing Fast MATLAB Code
Jia-Bin Huang
 
Product and service design
Product and service design
Grace Falcis
 
Ad

Similar to Matlab programming project (20)

Matlab Sample Assignment Solution
Matlab Sample Assignment Solution
All Assignment Experts
 
matlab pde toolbox
matlab pde toolbox
Fernando Fonteque
 
Ch 05 MATLAB Applications in Chemical Engineering_陳奇中教授教學投影片
Ch 05 MATLAB Applications in Chemical Engineering_陳奇中教授教學投影片
Chyi-Tsong Chen
 
cheb_conf_aksenov.pdf
cheb_conf_aksenov.pdf
Alexey Vasyukov
 
Mit6 094 iap10_lec03
Mit6 094 iap10_lec03
Tribhuwan Pant
 
Assignment On Matlab
Assignment On Matlab
Miranda Anderson
 
Numerical Analysis Assignment Help
Numerical Analysis Assignment Help
Maths Assignment Help
 
5 numerical analysis
5 numerical analysis
khalil ur rehman marwat
 
Mathematical Modelling of Electrical/Mechanical modellinng in MATLAB
Mathematical Modelling of Electrical/Mechanical modellinng in MATLAB
COMSATS Abbottabad
 
Lec3
Lec3
Amba Research
 
Numerical Analysis Assignment Help
Numerical Analysis Assignment Help
Math Homework Solver
 
computational brrtyuuufdddfgggxxzzcv.pdf
computational brrtyuuufdddfgggxxzzcv.pdf
DerreseSolomon
 
Optimization ucla cs 170 fall 2016 123456.pdf
Optimization ucla cs 170 fall 2016 123456.pdf
triyantri
 
2018 MUMS Fall Course - Statistical Representation of Model Input (EDITED) - ...
2018 MUMS Fall Course - Statistical Representation of Model Input (EDITED) - ...
The Statistical and Applied Mathematical Sciences Institute
 
DSP LAB COMPLETE CODES.docx
DSP LAB COMPLETE CODES.docx
MUMAR57
 
matlab lecture 4 solving mathematical problems.ppt
matlab lecture 4 solving mathematical problems.ppt
aaaaboud1
 
Palm ch1
Palm ch1
Heera Rawat
 
Solving heat conduction equation (parabolic pde)
Solving heat conduction equation (parabolic pde)
Addis Ababa Institute of Technology
 
ML-CheatSheet (1).pdf
ML-CheatSheet (1).pdf
KarroumAbdelmalek
 
04_AJMS_167_18_RA.pdf
04_AJMS_167_18_RA.pdf
BRNSS Publication Hub
 
Ch 05 MATLAB Applications in Chemical Engineering_陳奇中教授教學投影片
Ch 05 MATLAB Applications in Chemical Engineering_陳奇中教授教學投影片
Chyi-Tsong Chen
 
Mathematical Modelling of Electrical/Mechanical modellinng in MATLAB
Mathematical Modelling of Electrical/Mechanical modellinng in MATLAB
COMSATS Abbottabad
 
Numerical Analysis Assignment Help
Numerical Analysis Assignment Help
Math Homework Solver
 
computational brrtyuuufdddfgggxxzzcv.pdf
computational brrtyuuufdddfgggxxzzcv.pdf
DerreseSolomon
 
Optimization ucla cs 170 fall 2016 123456.pdf
Optimization ucla cs 170 fall 2016 123456.pdf
triyantri
 
DSP LAB COMPLETE CODES.docx
DSP LAB COMPLETE CODES.docx
MUMAR57
 
matlab lecture 4 solving mathematical problems.ppt
matlab lecture 4 solving mathematical problems.ppt
aaaaboud1
 
Ad

More from Assignmentpedia (20)

Transmitter side components
Transmitter side components
Assignmentpedia
 
Single object range detection
Single object range detection
Assignmentpedia
 
Sequential radar tracking
Sequential radar tracking
Assignmentpedia
 
Resolution project
Resolution project
Assignmentpedia
 
Radar cross section project
Radar cross section project
Assignmentpedia
 
Radar application project help
Radar application project help
Assignmentpedia
 
Parallel computing homework help
Parallel computing homework help
Assignmentpedia
 
Network costing analysis
Network costing analysis
Assignmentpedia
 
Matlab simulation project
Matlab simulation project
Assignmentpedia
 
Links design
Links design
Assignmentpedia
 
Image processing project using matlab
Image processing project using matlab
Assignmentpedia
 
Help with root locus homework1
Help with root locus homework1
Assignmentpedia
 
Transmitter subsystem
Transmitter subsystem
Assignmentpedia
 
Computer Networks Homework Help
Computer Networks Homework Help
Assignmentpedia
 
Theory of computation homework help
Theory of computation homework help
Assignmentpedia
 
Econometrics Homework Help
Econometrics Homework Help
Assignmentpedia
 
Video Codec
Video Codec
Assignmentpedia
 
Radar Spectral Analysis
Radar Spectral Analysis
Assignmentpedia
 
Pi Controller
Pi Controller
Assignmentpedia
 
Help With Digital Communication Project
Help With Digital Communication Project
Assignmentpedia
 
Transmitter side components
Transmitter side components
Assignmentpedia
 
Single object range detection
Single object range detection
Assignmentpedia
 
Sequential radar tracking
Sequential radar tracking
Assignmentpedia
 
Radar cross section project
Radar cross section project
Assignmentpedia
 
Radar application project help
Radar application project help
Assignmentpedia
 
Parallel computing homework help
Parallel computing homework help
Assignmentpedia
 
Network costing analysis
Network costing analysis
Assignmentpedia
 
Matlab simulation project
Matlab simulation project
Assignmentpedia
 
Image processing project using matlab
Image processing project using matlab
Assignmentpedia
 
Help with root locus homework1
Help with root locus homework1
Assignmentpedia
 
Computer Networks Homework Help
Computer Networks Homework Help
Assignmentpedia
 
Theory of computation homework help
Theory of computation homework help
Assignmentpedia
 
Econometrics Homework Help
Econometrics Homework Help
Assignmentpedia
 
Help With Digital Communication Project
Help With Digital Communication Project
Assignmentpedia
 

Recently uploaded (20)

Public Health For The 21st Century 1st Edition Judy Orme Jane Powell
Public Health For The 21st Century 1st Edition Judy Orme Jane Powell
trjnesjnqg7801
 
IIT KGP Quiz Week 2024 Sports Quiz (Prelims + Finals)
IIT KGP Quiz Week 2024 Sports Quiz (Prelims + Finals)
IIT Kharagpur Quiz Club
 
Q1_TLE 8_Week 1- Day 1 tools and equipment
Q1_TLE 8_Week 1- Day 1 tools and equipment
clairenotado3
 
K12 Tableau User Group virtual event June 18, 2025
K12 Tableau User Group virtual event June 18, 2025
dogden2
 
YSPH VMOC Special Report - Measles Outbreak Southwest US 6-14-2025.pptx
YSPH VMOC Special Report - Measles Outbreak Southwest US 6-14-2025.pptx
Yale School of Public Health - The Virtual Medical Operations Center (VMOC)
 
This is why students from these 44 institutions have not received National Se...
This is why students from these 44 institutions have not received National Se...
Kweku Zurek
 
Paper 106 | Ambition and Corruption: A Comparative Analysis of ‘The Great Gat...
Paper 106 | Ambition and Corruption: A Comparative Analysis of ‘The Great Gat...
Rajdeep Bavaliya
 
University of Ghana Cracks Down on Misconduct: Over 100 Students Sanctioned
University of Ghana Cracks Down on Misconduct: Over 100 Students Sanctioned
Kweku Zurek
 
M&A5 Q1 1 differentiate evolving early Philippine conventional and contempora...
M&A5 Q1 1 differentiate evolving early Philippine conventional and contempora...
ErlizaRosete
 
Hurricane Helene Application Documents Checklists
Hurricane Helene Application Documents Checklists
Mebane Rash
 
GREAT QUIZ EXCHANGE 2025 - GENERAL QUIZ.pptx
GREAT QUIZ EXCHANGE 2025 - GENERAL QUIZ.pptx
Ronisha Das
 
THE PSYCHOANALYTIC OF THE BLACK CAT BY EDGAR ALLAN POE (1).pdf
THE PSYCHOANALYTIC OF THE BLACK CAT BY EDGAR ALLAN POE (1).pdf
nabilahk908
 
Gladiolous Cultivation practices by AKL.pdf
Gladiolous Cultivation practices by AKL.pdf
kushallamichhame
 
Pests of Maize: An comprehensive overview.pptx
Pests of Maize: An comprehensive overview.pptx
Arshad Shaikh
 
LDMMIA Shop & Student News Summer Solstice 25
LDMMIA Shop & Student News Summer Solstice 25
LDM & Mia eStudios
 
INDUCTIVE EFFECT slide for first prof pharamacy students
INDUCTIVE EFFECT slide for first prof pharamacy students
SHABNAM FAIZ
 
ECONOMICS, DISASTER MANAGEMENT, ROAD SAFETY - STUDY MATERIAL [10TH]
ECONOMICS, DISASTER MANAGEMENT, ROAD SAFETY - STUDY MATERIAL [10TH]
SHERAZ AHMAD LONE
 
ENGLISH-5 Q1 Lesson 1.pptx - Story Elements
ENGLISH-5 Q1 Lesson 1.pptx - Story Elements
Mayvel Nadal
 
2025 June Year 9 Presentation: Subject selection.pptx
2025 June Year 9 Presentation: Subject selection.pptx
mansk2
 
List View Components in Odoo 18 - Odoo Slides
List View Components in Odoo 18 - Odoo Slides
Celine George
 
Public Health For The 21st Century 1st Edition Judy Orme Jane Powell
Public Health For The 21st Century 1st Edition Judy Orme Jane Powell
trjnesjnqg7801
 
IIT KGP Quiz Week 2024 Sports Quiz (Prelims + Finals)
IIT KGP Quiz Week 2024 Sports Quiz (Prelims + Finals)
IIT Kharagpur Quiz Club
 
Q1_TLE 8_Week 1- Day 1 tools and equipment
Q1_TLE 8_Week 1- Day 1 tools and equipment
clairenotado3
 
K12 Tableau User Group virtual event June 18, 2025
K12 Tableau User Group virtual event June 18, 2025
dogden2
 
This is why students from these 44 institutions have not received National Se...
This is why students from these 44 institutions have not received National Se...
Kweku Zurek
 
Paper 106 | Ambition and Corruption: A Comparative Analysis of ‘The Great Gat...
Paper 106 | Ambition and Corruption: A Comparative Analysis of ‘The Great Gat...
Rajdeep Bavaliya
 
University of Ghana Cracks Down on Misconduct: Over 100 Students Sanctioned
University of Ghana Cracks Down on Misconduct: Over 100 Students Sanctioned
Kweku Zurek
 
M&A5 Q1 1 differentiate evolving early Philippine conventional and contempora...
M&A5 Q1 1 differentiate evolving early Philippine conventional and contempora...
ErlizaRosete
 
Hurricane Helene Application Documents Checklists
Hurricane Helene Application Documents Checklists
Mebane Rash
 
GREAT QUIZ EXCHANGE 2025 - GENERAL QUIZ.pptx
GREAT QUIZ EXCHANGE 2025 - GENERAL QUIZ.pptx
Ronisha Das
 
THE PSYCHOANALYTIC OF THE BLACK CAT BY EDGAR ALLAN POE (1).pdf
THE PSYCHOANALYTIC OF THE BLACK CAT BY EDGAR ALLAN POE (1).pdf
nabilahk908
 
Gladiolous Cultivation practices by AKL.pdf
Gladiolous Cultivation practices by AKL.pdf
kushallamichhame
 
Pests of Maize: An comprehensive overview.pptx
Pests of Maize: An comprehensive overview.pptx
Arshad Shaikh
 
LDMMIA Shop & Student News Summer Solstice 25
LDMMIA Shop & Student News Summer Solstice 25
LDM & Mia eStudios
 
INDUCTIVE EFFECT slide for first prof pharamacy students
INDUCTIVE EFFECT slide for first prof pharamacy students
SHABNAM FAIZ
 
ECONOMICS, DISASTER MANAGEMENT, ROAD SAFETY - STUDY MATERIAL [10TH]
ECONOMICS, DISASTER MANAGEMENT, ROAD SAFETY - STUDY MATERIAL [10TH]
SHERAZ AHMAD LONE
 
ENGLISH-5 Q1 Lesson 1.pptx - Story Elements
ENGLISH-5 Q1 Lesson 1.pptx - Story Elements
Mayvel Nadal
 
2025 June Year 9 Presentation: Subject selection.pptx
2025 June Year 9 Presentation: Subject selection.pptx
mansk2
 
List View Components in Odoo 18 - Odoo Slides
List View Components in Odoo 18 - Odoo Slides
Celine George
 

Matlab programming project

  • 1. MATLAB PROGRAMMING (SAMPLE ASSIGNMENT) Our online Tutors are available 24*7 to provide Help with Help with Matlab Programming Homework/Assignment or a long term Graduate/Undergraduate Help with Matlab Programming Project. Our Tutors being experienced and proficient in Help with Matlab Programming ensure to provide high quality Help with Matlab Programming Homework Help. Upload your Help with Matlab Programming Assignment at ‘Submit Your Assignment’ button or email it to . You can use our ‘Live Chat’ option to schedule an Online Tutoring session with our Help with Matlab Programming Tutors. Wave Equation on a Square Domain This sample assignment shows how to solve the wave equation using the hyperbolic function in the Partial Differential Equation Toolbox™. We solve the standard second-order wave equation on a square domain with zero Dirichlet boundary conditions on left and right and zero Neumann boundary conditions on the top and bottom. Problem Definition The following variables will define our problem:  g: A specification function that is used by initmesh. For more information, please see the documentation page for squarereg andpdegeom.  b: A boundary file used by assempde. For more information, please see the documentation pages for squareb3 and pdebound.  c, a, f, d: The coefficients of the PDE. g='squareg'; b='squareb3'; c=1; a=0; f=0; d=1; Generate Mesh [p,e,t]=initmesh('squareg'); figure; pdemesh(p,e,t); axis equal [email protected]
  • 2. Generate Initial Conditions The initial conditions:  .  . This choice avoids putting energy into the higher vibration modes and permits a reasonable time step size. x=p(1,:)'; y=p(2,:)'; u0=atan(cos(pi/2*x)); ut0=3*sin(pi*x).*exp(sin(pi/2*y)); Define Time-Discretization We want the solution at 31 points in time between 0 and 5. n=31; tlist=linspace(0,5,n); Find FEM Solution
  • 3. uu=hyperbolic(u0,ut0,tlist,b,p,e,t,c,a,f,d); 428 successful steps 62 failed attempts 982 function evaluations 1 partial derivatives 142 LU decompositions 981 solutions of linear systems Animate FEM Solution To speed up the plotting, we interpolate to a rectangular grid. figure; set(gcf,'renderer','zbuffer'); delta=-1:0.1:1; [uxy,tn,a2,a3]=tri2grid(p,t,uu(:,1),delta,delta); gp=[tn;a2;a3]; newplot; umax=max(max(uu)); umin=min(min(uu)); for i=1:n pdeplot(p,e,t,'xydata',uu(:,i),'zdata',uu(:,i),'zstyle','continuous',... 'mesh','off','xygrid','on','gridparam',gp,'colorbar','off'); axis([-1 1 -1 1 umin umax]); caxis([umin umax]); M(i)=getframe; end movie(M,1);
  • 4. visit us at www.assignmentpedia.com or email us at [email protected] or call us at +1 520 8371215