SlideShare a Scribd company logo
MATLAB SIMULATION (SAMPLE ASSIGNMENT)
Our online Tutors are available 24*7 to provide Help with Help with Matlab Simulation
Homework/Assignment or a long term Graduate/Undergraduate Help with Matlab
Simulation Project. Our Tutors being experienced and proficient in Help with Matlab
Simulation ensure to provide high quality Help with Matlab Simulation Homework Help.
Upload your Help with Matlab Simulation 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
Simulation Tutors.
Monte Carlo Method
This sample assignment shows Calculating pi using Monte Carlo Method
MonteCarlo.m
% To calculate the value of pi using Monte Carlo Method
%-------------------------------------------------------------------------
% Code written by : Siva Srinivas Kolukula |
% Senior Research Fellow |
% Structural Mechanics Laboratory |
% Indira Gandhi Center for Atomic Research |
% India |
% E-mail : allwayzitzme@gmail.com |
% http://sites.google.com/site/kolukulasivasrinivas/ |
%-------------------------------------------------------------------------
clear all ;clc ;
% Radius of the Circle
R = 1 ;
shg
clf reset
set(gcf,'color','w','menubar','none','numbertitle','off','name','Monte Carlo Method ') ;
x = [0.; 0.];
h = plot(x(1),x(2),'.');
set(h,'markersize',1.5,'erasemode','none');
title('Calculation of pi using Monte Carlo Method','Color','r','fontweight','bold') ;
axis([-R R -R R]) ;
axis equal ;
axis off ;
% Stop and close toggle button
stop = uicontrol('style','toggle','string','stop','position',[115,20,40,20],.....
'background','white');
% Text boxes
tb1 = uicontrol('style','text','position',[190 20 100 20],'background','w') ;
info@assignmentpedia.com
tb2 = uicontrol('style','text','position',[320 20 150 20],'background','w') ;
drawnow ;
%
cnt = 1; % Count for Total Random Numbers
ccnt = 1 ; % Count for Random Numbers which lie inside circle
tic
while ~get(stop,'value')
% Generate Random Numbers between R and -R
x = 2*R*rand(2,1)-R ;
set(h,'XData',x(1),'YData',x(2),'Color','b') ;
drawnow
cnt = cnt + 1;
N = sprintf('N = %8.0f',cnt) ; % Update the total number of Random Numbers
set(tb1,'String',N)
RR = (x(1)^2+x(2)^2) ;
if RR<R^2 % If point lies inside the Circle
set(h,'XData',x(1),'YData',x(2),'Color','r') ;
drawnow ;
kssv = 4*ccnt/cnt ;
Pi = sprintf('pi(approx)=%6.8f',kssv) ; % Values of pi approximately
set(tb2,'String',Pi) ;
ccnt = ccnt+1 ;
end
end
toc
% Close the figure window
set(stop,'style','pushbutton','string','close','callback','close(gcf)')
visit us at www.assignmentpedia.com or email us at info@assignmentpedia.com or call us at +1 520 8371215
Ad

Recommended

Dti2143 lab sheet 9
Dti2143 lab sheet 9
alish sha
 
C programming codes for the class assignment
C programming codes for the class assignment
Zenith SVG
 
Bti1022 lab sheet 9 10
Bti1022 lab sheet 9 10
alish sha
 
Swadeshi Microprocessor Quiz 2020 (Start-up India)
Swadeshi Microprocessor Quiz 2020 (Start-up India)
PARNIKA GUPTA
 
Cse 121 presentation on matrix [autosaved]
Cse 121 presentation on matrix [autosaved]
Kanis Fatema Shanta
 
Spiral array
Spiral array
Akhilesh Agrawal
 
Prime number program in C
Prime number program in C
Hitesh Kumar
 
SATySFiのこれからの課題たち
SATySFiのこれからの課題たち
T. Suwa
 
Introduction to java Programming, Addition, Substraction, Multiplication, Div...
Introduction to java Programming, Addition, Substraction, Multiplication, Div...
Laxminarayan Sharma
 
CRCof Computer Network Laboratory
CRCof Computer Network Laboratory
Barnali Gupta Banik
 
1 (1)
1 (1)
Krish Na
 
Faisal
Faisal
Faisal Saeed
 
Cheatsheet - tmux
Cheatsheet - tmux
Lane Bryson
 
Tmux cheatsheet
Tmux cheatsheet
Ian Yang
 
2 d rotation
2 d rotation
Chandu Kumare
 
Newton cotes method
Newton cotes method
Faisal Saeed
 
Tmux quick-reference
Tmux quick-reference
Ramesh Kumar
 
Bti1022 lab sheet 8
Bti1022 lab sheet 8
alish sha
 
Using matlab simulink
Using matlab simulink
Marilyn Barragán Castañeda
 
Using matlab simulink
Using matlab simulink
Marilyn Barragán Castañeda
 
Control Systems Using Matlab
Control Systems Using Matlab
Assignmentpedia
 
CSE 103 Project Presentation.pptx
CSE 103 Project Presentation.pptx
TasnimSaimaRaita
 
Transmitter subsystem
Transmitter subsystem
Assignmentpedia
 
Alpine ML Talk: Vtreat: A Package for Automating Variable Treatment in R By ...
Alpine ML Talk: Vtreat: A Package for Automating Variable Treatment in R By ...
Chester Chen
 
34. Cam is a mechanical device that transforms rotary motion into lin.pdf
34. Cam is a mechanical device that transforms rotary motion into lin.pdf
ssuserc77a341
 
Distributed Radar Tracking Simulation Project
Distributed Radar Tracking Simulation Project
Assignmentpedia
 
Distributed Radar Tracking Simulation Project
Distributed Radar Tracking Simulation Project
Assignmentpedia
 
Matlab
Matlab
Muhammad Rehman Iqbal
 
Introduction to matlab
Introduction to matlab
VidhyaSenthil
 
Components Explanation
Components Explanation
Assignmentpedia
 

More Related Content

What's hot (10)

Introduction to java Programming, Addition, Substraction, Multiplication, Div...
Introduction to java Programming, Addition, Substraction, Multiplication, Div...
Laxminarayan Sharma
 
CRCof Computer Network Laboratory
CRCof Computer Network Laboratory
Barnali Gupta Banik
 
1 (1)
1 (1)
Krish Na
 
Faisal
Faisal
Faisal Saeed
 
Cheatsheet - tmux
Cheatsheet - tmux
Lane Bryson
 
Tmux cheatsheet
Tmux cheatsheet
Ian Yang
 
2 d rotation
2 d rotation
Chandu Kumare
 
Newton cotes method
Newton cotes method
Faisal Saeed
 
Tmux quick-reference
Tmux quick-reference
Ramesh Kumar
 
Bti1022 lab sheet 8
Bti1022 lab sheet 8
alish sha
 
Introduction to java Programming, Addition, Substraction, Multiplication, Div...
Introduction to java Programming, Addition, Substraction, Multiplication, Div...
Laxminarayan Sharma
 
CRCof Computer Network Laboratory
CRCof Computer Network Laboratory
Barnali Gupta Banik
 
Cheatsheet - tmux
Cheatsheet - tmux
Lane Bryson
 
Tmux cheatsheet
Tmux cheatsheet
Ian Yang
 
Newton cotes method
Newton cotes method
Faisal Saeed
 
Tmux quick-reference
Tmux quick-reference
Ramesh Kumar
 
Bti1022 lab sheet 8
Bti1022 lab sheet 8
alish sha
 

Similar to Matlab simulation project (20)

Using matlab simulink
Using matlab simulink
Marilyn Barragán Castañeda
 
Using matlab simulink
Using matlab simulink
Marilyn Barragán Castañeda
 
Control Systems Using Matlab
Control Systems Using Matlab
Assignmentpedia
 
CSE 103 Project Presentation.pptx
CSE 103 Project Presentation.pptx
TasnimSaimaRaita
 
Transmitter subsystem
Transmitter subsystem
Assignmentpedia
 
Alpine ML Talk: Vtreat: A Package for Automating Variable Treatment in R By ...
Alpine ML Talk: Vtreat: A Package for Automating Variable Treatment in R By ...
Chester Chen
 
34. Cam is a mechanical device that transforms rotary motion into lin.pdf
34. Cam is a mechanical device that transforms rotary motion into lin.pdf
ssuserc77a341
 
Distributed Radar Tracking Simulation Project
Distributed Radar Tracking Simulation Project
Assignmentpedia
 
Distributed Radar Tracking Simulation Project
Distributed Radar Tracking Simulation Project
Assignmentpedia
 
Matlab
Matlab
Muhammad Rehman Iqbal
 
Introduction to matlab
Introduction to matlab
VidhyaSenthil
 
Components Explanation
Components Explanation
Assignmentpedia
 
MATLAB for Technical Computing
MATLAB for Technical Computing
Naveed Rehman
 
maxbox starter60 machine learning
maxbox starter60 machine learning
Max Kleiner
 
Digital Pulse Radar
Digital Pulse Radar
Assignmentpedia
 
Day2 Verilog HDL Basic
Day2 Verilog HDL Basic
Ron Liu
 
Quantitative finance in q
Quantitative finance in q
Mark Lefevre, CQF
 
Fourier series example
Fourier series example
Abi finni
 
K fold validation
K fold validation
Masrur Ahmed
 
2 d matrices
2 d matrices
Himanshu Arora
 
Control Systems Using Matlab
Control Systems Using Matlab
Assignmentpedia
 
CSE 103 Project Presentation.pptx
CSE 103 Project Presentation.pptx
TasnimSaimaRaita
 
Alpine ML Talk: Vtreat: A Package for Automating Variable Treatment in R By ...
Alpine ML Talk: Vtreat: A Package for Automating Variable Treatment in R By ...
Chester Chen
 
34. Cam is a mechanical device that transforms rotary motion into lin.pdf
34. Cam is a mechanical device that transforms rotary motion into lin.pdf
ssuserc77a341
 
Distributed Radar Tracking Simulation Project
Distributed Radar Tracking Simulation Project
Assignmentpedia
 
Distributed Radar Tracking Simulation Project
Distributed Radar Tracking Simulation Project
Assignmentpedia
 
Introduction to matlab
Introduction to matlab
VidhyaSenthil
 
MATLAB for Technical Computing
MATLAB for Technical Computing
Naveed Rehman
 
maxbox starter60 machine learning
maxbox starter60 machine learning
Max Kleiner
 
Day2 Verilog HDL Basic
Day2 Verilog HDL Basic
Ron Liu
 
Fourier series example
Fourier series example
Abi finni
 
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 programming project
Matlab programming 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
 
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
 
Fpga Design Project
Fpga Design 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 programming project
Matlab programming 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
 
Ad

Recently uploaded (20)

How to use search fetch method in Odoo 18
How to use search fetch method in Odoo 18
Celine George
 
2025 Completing the Pre-SET Plan Form.pptx
2025 Completing the Pre-SET Plan Form.pptx
mansk2
 
CRYPTO TRADING COURSE BY FINANCEWORLD.IO
CRYPTO TRADING COURSE BY FINANCEWORLD.IO
AndrewBorisenko3
 
How to Manage Different Customer Addresses in Odoo 18 Accounting
How to Manage Different Customer Addresses in Odoo 18 Accounting
Celine George
 
F-BLOCK ELEMENTS POWER POINT PRESENTATIONS
F-BLOCK ELEMENTS POWER POINT PRESENTATIONS
mprpgcwa2024
 
Q1_TLE 8_Week 1- Day 1 tools and equipment
Q1_TLE 8_Week 1- Day 1 tools and equipment
clairenotado3
 
How payment terms are configured in Odoo 18
How payment terms are configured in Odoo 18
Celine George
 
HistoPathology Ppt. Arshita Gupta for Diploma
HistoPathology Ppt. Arshita Gupta for Diploma
arshitagupta674
 
Pests of Maize: An comprehensive overview.pptx
Pests of Maize: An comprehensive overview.pptx
Arshad Shaikh
 
ENGLISH-5 Q1 Lesson 1.pptx - Story Elements
ENGLISH-5 Q1 Lesson 1.pptx - Story Elements
Mayvel Nadal
 
A Visual Introduction to the Prophet Jeremiah
A Visual Introduction to the Prophet Jeremiah
Steve Thomason
 
Aprendendo Arquitetura Framework Salesforce - Dia 02
Aprendendo Arquitetura Framework Salesforce - Dia 02
Mauricio Alexandre Silva
 
LDMMIA Yoga S10 Free Workshop Grad Level
LDMMIA Yoga S10 Free Workshop Grad Level
LDM & Mia eStudios
 
SCHIZOPHRENIA OTHER PSYCHOTIC DISORDER LIKE Persistent delusion/Capgras syndr...
SCHIZOPHRENIA OTHER PSYCHOTIC DISORDER LIKE Persistent delusion/Capgras syndr...
parmarjuli1412
 
VCE Literature Section A Exam Response Guide
VCE Literature Section A Exam Response Guide
jpinnuck
 
English 3 Quarter 1_LEwithLAS_Week 1.pdf
English 3 Quarter 1_LEwithLAS_Week 1.pdf
DeAsisAlyanajaneH
 
2025 June Year 9 Presentation: Subject selection.pptx
2025 June Year 9 Presentation: Subject selection.pptx
mansk2
 
Learning Styles Inventory for Senior High School Students
Learning Styles Inventory for Senior High School Students
Thelma Villaflores
 
GREAT QUIZ EXCHANGE 2025 - GENERAL QUIZ.pptx
GREAT QUIZ EXCHANGE 2025 - GENERAL QUIZ.pptx
Ronisha Das
 
K12 Tableau User Group virtual event June 18, 2025
K12 Tableau User Group virtual event June 18, 2025
dogden2
 
How to use search fetch method in Odoo 18
How to use search fetch method in Odoo 18
Celine George
 
2025 Completing the Pre-SET Plan Form.pptx
2025 Completing the Pre-SET Plan Form.pptx
mansk2
 
CRYPTO TRADING COURSE BY FINANCEWORLD.IO
CRYPTO TRADING COURSE BY FINANCEWORLD.IO
AndrewBorisenko3
 
How to Manage Different Customer Addresses in Odoo 18 Accounting
How to Manage Different Customer Addresses in Odoo 18 Accounting
Celine George
 
F-BLOCK ELEMENTS POWER POINT PRESENTATIONS
F-BLOCK ELEMENTS POWER POINT PRESENTATIONS
mprpgcwa2024
 
Q1_TLE 8_Week 1- Day 1 tools and equipment
Q1_TLE 8_Week 1- Day 1 tools and equipment
clairenotado3
 
How payment terms are configured in Odoo 18
How payment terms are configured in Odoo 18
Celine George
 
HistoPathology Ppt. Arshita Gupta for Diploma
HistoPathology Ppt. Arshita Gupta for Diploma
arshitagupta674
 
Pests of Maize: An comprehensive overview.pptx
Pests of Maize: An comprehensive overview.pptx
Arshad Shaikh
 
ENGLISH-5 Q1 Lesson 1.pptx - Story Elements
ENGLISH-5 Q1 Lesson 1.pptx - Story Elements
Mayvel Nadal
 
A Visual Introduction to the Prophet Jeremiah
A Visual Introduction to the Prophet Jeremiah
Steve Thomason
 
Aprendendo Arquitetura Framework Salesforce - Dia 02
Aprendendo Arquitetura Framework Salesforce - Dia 02
Mauricio Alexandre Silva
 
LDMMIA Yoga S10 Free Workshop Grad Level
LDMMIA Yoga S10 Free Workshop Grad Level
LDM & Mia eStudios
 
SCHIZOPHRENIA OTHER PSYCHOTIC DISORDER LIKE Persistent delusion/Capgras syndr...
SCHIZOPHRENIA OTHER PSYCHOTIC DISORDER LIKE Persistent delusion/Capgras syndr...
parmarjuli1412
 
VCE Literature Section A Exam Response Guide
VCE Literature Section A Exam Response Guide
jpinnuck
 
English 3 Quarter 1_LEwithLAS_Week 1.pdf
English 3 Quarter 1_LEwithLAS_Week 1.pdf
DeAsisAlyanajaneH
 
2025 June Year 9 Presentation: Subject selection.pptx
2025 June Year 9 Presentation: Subject selection.pptx
mansk2
 
Learning Styles Inventory for Senior High School Students
Learning Styles Inventory for Senior High School Students
Thelma Villaflores
 
GREAT QUIZ EXCHANGE 2025 - GENERAL QUIZ.pptx
GREAT QUIZ EXCHANGE 2025 - GENERAL QUIZ.pptx
Ronisha Das
 
K12 Tableau User Group virtual event June 18, 2025
K12 Tableau User Group virtual event June 18, 2025
dogden2
 

Matlab simulation project

  • 1. MATLAB SIMULATION (SAMPLE ASSIGNMENT) Our online Tutors are available 24*7 to provide Help with Help with Matlab Simulation Homework/Assignment or a long term Graduate/Undergraduate Help with Matlab Simulation Project. Our Tutors being experienced and proficient in Help with Matlab Simulation ensure to provide high quality Help with Matlab Simulation Homework Help. Upload your Help with Matlab Simulation 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 Simulation Tutors. Monte Carlo Method This sample assignment shows Calculating pi using Monte Carlo Method MonteCarlo.m % To calculate the value of pi using Monte Carlo Method %------------------------------------------------------------------------- % Code written by : Siva Srinivas Kolukula | % Senior Research Fellow | % Structural Mechanics Laboratory | % Indira Gandhi Center for Atomic Research | % India | % E-mail : [email protected] | % http://sites.google.com/site/kolukulasivasrinivas/ | %------------------------------------------------------------------------- clear all ;clc ; % Radius of the Circle R = 1 ; shg clf reset set(gcf,'color','w','menubar','none','numbertitle','off','name','Monte Carlo Method ') ; x = [0.; 0.]; h = plot(x(1),x(2),'.'); set(h,'markersize',1.5,'erasemode','none'); title('Calculation of pi using Monte Carlo Method','Color','r','fontweight','bold') ; axis([-R R -R R]) ; axis equal ; axis off ; % Stop and close toggle button stop = uicontrol('style','toggle','string','stop','position',[115,20,40,20],..... 'background','white'); % Text boxes tb1 = uicontrol('style','text','position',[190 20 100 20],'background','w') ; [email protected]
  • 2. tb2 = uicontrol('style','text','position',[320 20 150 20],'background','w') ; drawnow ; % cnt = 1; % Count for Total Random Numbers ccnt = 1 ; % Count for Random Numbers which lie inside circle tic while ~get(stop,'value') % Generate Random Numbers between R and -R x = 2*R*rand(2,1)-R ; set(h,'XData',x(1),'YData',x(2),'Color','b') ; drawnow cnt = cnt + 1; N = sprintf('N = %8.0f',cnt) ; % Update the total number of Random Numbers set(tb1,'String',N) RR = (x(1)^2+x(2)^2) ; if RR<R^2 % If point lies inside the Circle set(h,'XData',x(1),'YData',x(2),'Color','r') ; drawnow ; kssv = 4*ccnt/cnt ; Pi = sprintf('pi(approx)=%6.8f',kssv) ; % Values of pi approximately set(tb2,'String',Pi) ; ccnt = ccnt+1 ; end end toc % Close the figure window set(stop,'style','pushbutton','string','close','callback','close(gcf)') visit us at www.assignmentpedia.com or email us at [email protected] or call us at +1 520 8371215