Open navigation menu
Close suggestions
Search
Search
en
Change Language
Upload
Sign in
Sign in
Download free for days
0 ratings
0% found this document useful (0 votes)
13 views
5 pages
Matlabe Code
Uploaded by
benjelloun.kenza2023
AI-enhanced title
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content,
claim it here
.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
Download
Save
Save matlabe code For Later
Share
0%
0% found this document useful, undefined
0%
, undefined
Print
Embed
Report
0 ratings
0% found this document useful (0 votes)
13 views
5 pages
Matlabe Code
Uploaded by
benjelloun.kenza2023
AI-enhanced title
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content,
claim it here
.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
Carousel Previous
Carousel Next
Download
Save
Save matlabe code For Later
Share
0%
0% found this document useful, undefined
0%
, undefined
Print
Embed
Report
Download
Save matlabe code For Later
You are on page 1
/ 5
Search
Fullscreen
function createAcousticWaveGUI()
% Create the figure and components
fig = uifigure('Name', 'Full Acoustic Wave Visualization', 'Position', [100,
100, 1000, 800]);
% Labels and fields for input
lblA = uilabel(fig, 'Position', [10, 720, 120, 22], 'Text', 'Amplitude (A):');
fldA = uieditfield(fig, 'numeric', 'Position', [130, 720, 100, 22]);
lblc = uilabel(fig,'Position',[10, 580, 150, 22], 'Text','sound speed (c)
m/s:') ;
ddc = uidropdown(fig ,'position',[130, 580, 100, 22],...
'Items',{'Air: 330-340 m/s','Water: 1450 m/s','Soft Tissue: 1540 m/s',
'Bone:3300 m/s'},...
'ItemsData',[335,1450,1540,3300]);
% Add the fields for the period, speed of sound, and density here
lblT = uilabel(fig, 'Position', [10, 700, 120, 22], 'Text', 'Period (T):');
fldT = uieditfield(fig, 'numeric', 'Position', [130, 700, 100, 22]);
lblRho = uilabel(fig, 'Position', [10, 680, 120, 22], 'Text', 'Density
(rho):');
fldRho = uieditfield(fig, 'numeric', 'Position', [130, 680, 100, 22]);
% Configuration of the button for calculation and plot
btn = uibutton(fig, 'push', 'Text', 'Calculate and Plot', 'Position', [250,
690, 150, 30]);
function createAcousticWaveGUI()
% Create the figure and components
fig = uifigure('Name', 'Full Acoustic Wave Visualization', 'Position', [100,
100, 1000, 800]);
% Labels and fields for input
lblA = uilabel(fig, 'Position', [10, 720, 120, 22], 'Text', 'Amplitude (A):');
fldA = uieditfield(fig, 'numeric', 'Position', [130, 720, 100, 22]);
lblR = uilabel(fig, 'Position', [500, 700, 120, 22], 'Text', 'Angular
frequency(R):');
lblF = uilabel(fig, 'Position', [500, 720, 120, 22], 'Text', 'frequency
(hz):');
lblW = uilabel(fig, 'Position', [500, 740, 120, 22], 'Text', ' Wavelenght
(w):');
lblc = uilabel(fig,'Position',[10, 580, 150, 22], 'Text','sound speed (c)
m/s:') ;
ddc = uidropdown(fig ,'position',[130, 580, 100, 22],...
'Items',{'Air: 330-340 m/s','Water: 1450 m/s','Soft Tissue: 1540 m/s',
'Bone:3300 m/s'},...
'ItemsData',[335,1450,1540,3300]);
% Add the fields for the period, speed of sound, and density here
lblT = uilabel(fig, 'Position', [10, 700, 120, 22], 'Text', 'Period (T):');
fldT = uieditfield(fig, 'numeric', 'Position', [130, 700, 100, 22]);
lblRho = uilabel(fig, 'Position', [10, 680, 120, 22], 'Text', 'Density
(rho):');
fldRho = uieditfield(fig, 'numeric', 'Position', [130, 680, 100, 22]);
% Configuration of the button for calculation and plot
btn = uibutton(fig, 'push', 'Text', 'Calculate and Plot', 'Position', [250,
690, 150, 30]);
ax2 = uiaxes(fig, 'Position', [510, 420, 480, 200], 'XGrid', 'on', 'YGrid',
'on');
title(ax2, 'Pressure');
xlabel(ax2, 'Time (s)');
ylabel(ax2, 'Pressure');
ax3 = uiaxes(fig, 'Position', [10, 100, 480, 200], 'XGrid', 'on', 'YGrid',
'on');
title(ax2, ' vieiocity field');
xlabel(ax2, 'Time (s)');
ylabel(ax2, 'Pressure');
ax4 = uiaxes(fig, 'Position', [500,100 , 480, 200], 'XGrid', 'on',
'YGrid', 'on');
title(ax2, 'pressue field');
xlabel(ax2, 'lateral distance (mm)');
ylabel(ax2, 'Axial distance');
function createAcousticWaveGUI()
% Create the figure and components
fig = uifigure('Name', 'Full Acoustic Wave Visualization', 'Position',
[100, 100, 1000, 800]);
% Labels and fields for input
lblA = uilabel(fig, 'Position', [10, 720, 120, 22], 'Text', 'Amplitude
(A):');
fldA = uieditfield(fig, 'numeric', 'Position', [130, 720, 100, 22]);
lblR = uilabel(fig, 'Position', [500, 700, 120, 22], 'Text', 'Angular
frequency(R):');
lblF = uilabel(fig, 'Position', [500, 720, 120, 22], 'Text', 'frequency
(hz):');
lblW = uilabel(fig, 'Position', [500, 740, 120, 22], 'Text', ' Wavelenght
(w):');
lblc = uilabel(fig,'Position',[10, 760, 150, 22], 'Text','sound speed (c)
m/s:') ;
ddC = uidropdown(fig ,'position',[130, 760, 100, 22],...
'Items',{'Air: 330-340 m/s','Water: 1450 m/s','Soft Tissue: 1540 m/s',
'Bone:3300 m/s'},...
'ItemsData',[335,1450,1540,3300]);
% Add the fields for the period, speed of sound, and density here
lblT = uilabel(fig, 'Position', [10, 700, 120, 22], 'Text', 'Period
(T):');
fldT = uieditfield(fig, 'numeric', 'Position', [130, 700, 100, 22]);
lblRho = uilabel(fig, 'Position', [10, 680, 120, 22], 'Text', 'Density
(rho):');
fldRho = uieditfield(fig, 'numeric', 'Position', [130, 680, 100, 22]);
% Configuration of the button for calculation and plot
btn = uibutton(fig, 'push', 'Text', 'Calculate and Plot', 'Position',
[250, 620, 150, 30], ...
'ButtonPushedFcn', @(btn,event) plotWave(fldA.Value,
fldT.Value, ddC.Value, fldRho.Value));
% Axes pour le tracé du déplacement et de la vitesse
ax1 = uiaxes(fig, 'Position', [10, 300, 480, 200], 'XGrid', 'on',
'YGrid', 'on');.
title(ax1, 'Displacement and Velocity');
xlabel(ax1, 'Time (s)');
ylabel(ax1, 'Displacement / Velocity');
ax4 = uiaxes(fig, 'Position', [500 ,100 , 480, 200], 'XGrid', 'on',
'YGrid', 'on');
title(ax4, 'pressue field');
xlabel(ax4, 'lateral distance (mm)');
ylabel(ax4, 'Axial distance');
ax3 = uiaxes(fig, 'Position', [10, 100, 480, 200], 'XGrid', 'on',
'YGrid', 'on');
title(ax3, ' vieiocity field');
xlabel(ax3, 'Time (s)');
ylabel(ax3, 'Pressure');
ax2 = uiaxes(fig, 'Position', [500, 300, 480, 200], 'XGrid', 'on',
'YGrid', 'on');
title(ax2, 'Pressure');
xlabel(ax2, 'Time (s)');
ylabel(ax2, 'Pressure');
function plotWave(A, T, c, rho)
t = linspace(0, 4*T, 1000);
% Calculate frequency, angular frequency, and wavelength
f = 1 / T;
omega = 2 * pi * f;
lamda = c / f;
% Calculate displacement, velocity, and pressure
x = A * sin(omega * t);
v = A * omega * cos(omega * t);
P = rho * c * A * omega * cos(omega * t);
lblF.Text = sprintf('Frequency (hz)' , f);
lblR.Text = sprintf('Angular Frequency (R) rad/s', omega);
lblW.Text = sprintf('wavelengh (w)', lamda);
You might also like
Hilbert Vibration Decomposition
PDF
0% (1)
Hilbert Vibration Decomposition
31 pages
Timing Chain: Service and Repair Installation
PDF
No ratings yet
Timing Chain: Service and Repair Installation
3 pages
Lab2 (1) 2
PDF
No ratings yet
Lab2 (1) 2
10 pages
Modelling Elastic Wave Propagation Using The K-Wave Matlab Toolbox
PDF
No ratings yet
Modelling Elastic Wave Propagation Using The K-Wave Matlab Toolbox
4 pages
Day - 1 Explain
PDF
No ratings yet
Day - 1 Explain
8 pages
Field II To FOCUS Guide: Michigan State University
PDF
No ratings yet
Field II To FOCUS Guide: Michigan State University
15 pages
Digital Signal Processing
PDF
No ratings yet
Digital Signal Processing
9 pages
Asymmetric Sandwich Beam Harmonic Modal Analysis
PDF
No ratings yet
Asymmetric Sandwich Beam Harmonic Modal Analysis
10 pages
Report DMD CurveFit
PDF
No ratings yet
Report DMD CurveFit
11 pages
All Progs
PDF
No ratings yet
All Progs
3 pages
Lecture 04: 2D & 3D Graphs: - Line Graphs - Bar-Type Graphs - Area Graphs - Mesh Graphs - Surf Graphs - Other Graphs
PDF
No ratings yet
Lecture 04: 2D & 3D Graphs: - Line Graphs - Bar-Type Graphs - Area Graphs - Mesh Graphs - Surf Graphs - Other Graphs
59 pages
Maxwell
PDF
No ratings yet
Maxwell
9 pages
Public Car Seismic Manual
PDF
No ratings yet
Public Car Seismic Manual
27 pages
Matlab Scripts For Hilbert Transform
PDF
No ratings yet
Matlab Scripts For Hilbert Transform
31 pages
All Codes
PDF
No ratings yet
All Codes
8 pages
Vibration Analysis SDOF.
PDF
No ratings yet
Vibration Analysis SDOF.
11 pages
Labsheet 2 QU. 1: %period of The Square Wave %cut-Off Angular Frequency and Q-Factor of The Lowpass Filter
PDF
No ratings yet
Labsheet 2 QU. 1: %period of The Square Wave %cut-Off Angular Frequency and Q-Factor of The Lowpass Filter
4 pages
MATLAB Code
PDF
No ratings yet
MATLAB Code
8 pages
Review of Scilab Command Lines
PDF
No ratings yet
Review of Scilab Command Lines
6 pages
Numperiods Period : Comexp.M
PDF
No ratings yet
Numperiods Period : Comexp.M
1 page
Holzercodereal
PDF
No ratings yet
Holzercodereal
5 pages
DC Lab Exp6 17l238 Rep
PDF
No ratings yet
DC Lab Exp6 17l238 Rep
12 pages
Matlab Primer2
PDF
No ratings yet
Matlab Primer2
3 pages
1.2 Chapter 3 Examples
PDF
No ratings yet
1.2 Chapter 3 Examples
6 pages
REFERENCES
PDF
No ratings yet
REFERENCES
9 pages
Report DMD CurveFit
PDF
No ratings yet
Report DMD CurveFit
14 pages
PHP Assignment
PDF
No ratings yet
PHP Assignment
7 pages
Dispersion Curve
PDF
No ratings yet
Dispersion Curve
2 pages
Sachin Scilab 1
PDF
No ratings yet
Sachin Scilab 1
28 pages
Algorithm Notes
PDF
No ratings yet
Algorithm Notes
11 pages
New Algorithm With Translation
PDF
No ratings yet
New Algorithm With Translation
6 pages
Bimla Devi Education Society Group of Institutions JB Knowledge Park
PDF
No ratings yet
Bimla Devi Education Society Group of Institutions JB Knowledge Park
21 pages
Reverse Time Migration (RTM) SEM
PDF
No ratings yet
Reverse Time Migration (RTM) SEM
2 pages
5 Solutions PDF
PDF
No ratings yet
5 Solutions PDF
8 pages
Pre Lab
PDF
No ratings yet
Pre Lab
1 page
Lecture 2
PDF
No ratings yet
Lecture 2
6 pages
Scilab Practical File 1 Signal Processing (DSP) 4TH Sem, BSC (H) Electronics
PDF
No ratings yet
Scilab Practical File 1 Signal Processing (DSP) 4TH Sem, BSC (H) Electronics
6 pages
DSP Lab Programs
PDF
No ratings yet
DSP Lab Programs
15 pages
21EC10061 Sandeep Gr-06
PDF
No ratings yet
21EC10061 Sandeep Gr-06
16 pages
Matlab Lesson 3
PDF
No ratings yet
Matlab Lesson 3
6 pages
Exp1 Merged
PDF
No ratings yet
Exp1 Merged
11 pages
Week1MATLAB WEEK 2 Merged
PDF
No ratings yet
Week1MATLAB WEEK 2 Merged
10 pages
Lab 1 MCL746 Mohit Kumar
PDF
No ratings yet
Lab 1 MCL746 Mohit Kumar
33 pages
Analysis Fixed
PDF
No ratings yet
Analysis Fixed
10 pages
Robotics Lab Lecture #4: Purpose of This Lecture
PDF
No ratings yet
Robotics Lab Lecture #4: Purpose of This Lecture
5 pages
Lab 1 Report: Ta:Pham Van Tuan
PDF
No ratings yet
Lab 1 Report: Ta:Pham Van Tuan
10 pages
W3 P1 Gaussian
PDF
No ratings yet
W3 P1 Gaussian
7 pages
Holzercode
PDF
No ratings yet
Holzercode
4 pages
Assignment 2 Modal Analysis of Mechanical Systems: Submitted By, Pranav R ME15M081
PDF
No ratings yet
Assignment 2 Modal Analysis of Mechanical Systems: Submitted By, Pranav R ME15M081
6 pages
Pole Zero
PDF
No ratings yet
Pole Zero
9 pages
Important
PDF
No ratings yet
Important
9 pages
Lab 3
PDF
No ratings yet
Lab 3
5 pages
Working With Wavelets: Task 1: Shannon Wavelet
PDF
No ratings yet
Working With Wavelets: Task 1: Shannon Wavelet
13 pages
comp2DDM WithFluid
PDF
No ratings yet
comp2DDM WithFluid
6 pages
Matlab Code For Ecg
PDF
No ratings yet
Matlab Code For Ecg
5 pages
LAB 2 All Q
PDF
No ratings yet
LAB 2 All Q
5 pages
2104.ipynb - Colab
PDF
No ratings yet
2104.ipynb - Colab
1 page
Steel Renewal Report
PDF
No ratings yet
Steel Renewal Report
21 pages
Benefiting From Nozzle Flexibility in Piping Design
PDF
No ratings yet
Benefiting From Nozzle Flexibility in Piping Design
8 pages
Haas Tooling Catalog
PDF
No ratings yet
Haas Tooling Catalog
36 pages
VT Report
PDF
No ratings yet
VT Report
1 page
Yanmar Shop - FIG 21. LUB - OIL COOLER Schematic
PDF
No ratings yet
Yanmar Shop - FIG 21. LUB - OIL COOLER Schematic
3 pages
Gear Shaving PDF
PDF
100% (1)
Gear Shaving PDF
8 pages
1.7.1.8 Flow Switch - 2
PDF
No ratings yet
1.7.1.8 Flow Switch - 2
3 pages
@airbus: Component Maintenance Manual With Illustrated Part List
PDF
No ratings yet
@airbus: Component Maintenance Manual With Illustrated Part List
435 pages
Knuckle Thread DIN 405
PDF
No ratings yet
Knuckle Thread DIN 405
2 pages
Ipc Am HDM 145d k01 en
PDF
No ratings yet
Ipc Am HDM 145d k01 en
31 pages
FSN220006 e
PDF
No ratings yet
FSN220006 e
7 pages
Assignment Questions Kinematics of Machines BTech 4th
PDF
No ratings yet
Assignment Questions Kinematics of Machines BTech 4th
16 pages
Powerboss7000 Parts
PDF
No ratings yet
Powerboss7000 Parts
19 pages
Japanese Agricultural Standard For Glued Laminated Timber
PDF
No ratings yet
Japanese Agricultural Standard For Glued Laminated Timber
45 pages
2RB Ring Blower User Manual
PDF
No ratings yet
2RB Ring Blower User Manual
26 pages
Chip Breaker Threading Insert Shim Seat: API Buttress
PDF
No ratings yet
Chip Breaker Threading Insert Shim Seat: API Buttress
1 page
Inj Calculator Sensor Inj Calculator Sensor Inj Calculator Sensor Inj Calculator Sensor
PDF
No ratings yet
Inj Calculator Sensor Inj Calculator Sensor Inj Calculator Sensor Inj Calculator Sensor
2 pages
DE5302 Strength of Materials 1 - S1 2019 Exam - FINAL
PDF
No ratings yet
DE5302 Strength of Materials 1 - S1 2019 Exam - FINAL
24 pages
Capter-5 Deformable-Bodies Ce
PDF
No ratings yet
Capter-5 Deformable-Bodies Ce
19 pages
Lexus Timing Belt
PDF
No ratings yet
Lexus Timing Belt
6 pages
Lesson 2 Volleyball Equipment
PDF
No ratings yet
Lesson 2 Volleyball Equipment
5 pages
Torque Overload Release Coupling
PDF
No ratings yet
Torque Overload Release Coupling
12 pages
Datasheet: TVH 335-01/01Z-M20
PDF
No ratings yet
Datasheet: TVH 335-01/01Z-M20
6 pages
Experiment Number 5 To Study Different Types of Steering Gears
PDF
No ratings yet
Experiment Number 5 To Study Different Types of Steering Gears
3 pages
cths660 01spcr2231349 01
PDF
100% (1)
cths660 01spcr2231349 01
36 pages
Parts Catalogue: Maestro (Feb, 2012) E-1
PDF
No ratings yet
Parts Catalogue: Maestro (Feb, 2012) E-1
40 pages
S Venkataramanan Resume
PDF
No ratings yet
S Venkataramanan Resume
1 page
Quiz
PDF
No ratings yet
Quiz
8 pages
PDF文档 28
PDF
No ratings yet
PDF文档 28
1 page