Email: helpdesk@telkomuniversity.ac.id

This Portal for internal use only!

  • My Download
  • Checkout
Application Package Repository Telkom University
All Categories

All Categories

  • Visual Paradigm
  • IBM
  • Adobe
  • Google
  • Matlab
  • Microsoft
    • Microsoft Apps
    • Analytics
    • AI + Machine Learning
    • Compute
    • Database
    • Developer Tools
    • Internet Of Things
    • Learning Services
    • Middleware System
    • Networking
    • Operating System
    • Productivity Tools
    • Security
    • VLS
      • Office
      • Windows
  • Opensource
  • Wordpress
    • Plugin WP
    • Themes WP
  • Others

Search

0 Wishlist

Cart

Categories
  • Microsoft
    • Microsoft Apps
    • Office
    • Operating System
    • VLS
    • Developer Tools
    • Productivity Tools
    • Database
    • AI + Machine Learning
    • Middleware System
    • Learning Services
    • Analytics
    • Networking
    • Compute
    • Security
    • Internet Of Things
  • Adobe
  • Matlab
  • Google
  • Visual Paradigm
  • WordPress
    • Plugin WP
    • Themes WP
  • Opensource
  • Others
More Categories Less Categories
  • Get Pack
    • Product Category
    • Simple Product
    • Grouped Product
    • Variable Product
    • External Product
  • My Account
    • Download
    • Cart
    • Checkout
    • Login
  • About Us
    • Contact
    • Forum
    • Frequently Questions
    • Privacy Policy
  • Forum
    • News
      • Category
      • News Tag

iconTicket Service Desk

  • My Download
  • Checkout
Application Package Repository Telkom University
All Categories

All Categories

  • Visual Paradigm
  • IBM
  • Adobe
  • Google
  • Matlab
  • Microsoft
    • Microsoft Apps
    • Analytics
    • AI + Machine Learning
    • Compute
    • Database
    • Developer Tools
    • Internet Of Things
    • Learning Services
    • Middleware System
    • Networking
    • Operating System
    • Productivity Tools
    • Security
    • VLS
      • Office
      • Windows
  • Opensource
  • Wordpress
    • Plugin WP
    • Themes WP
  • Others

Search

0 Wishlist

Cart

Menu
  • Home
    • Download Application Package Repository Telkom University
    • Application Package Repository Telkom University
    • Download Official License Telkom University
    • Download Installer Application Pack
    • Product Category
    • Simple Product
    • Grouped Product
    • Variable Product
    • External Product
  • All Pack
    • Microsoft
      • Operating System
      • Productivity Tools
      • Developer Tools
      • Database
      • AI + Machine Learning
      • Middleware System
      • Networking
      • Compute
      • Security
      • Analytics
      • Internet Of Things
      • Learning Services
    • Microsoft Apps
      • VLS
    • Adobe
    • Matlab
    • WordPress
      • Themes WP
      • Plugin WP
    • Google
    • Opensource
    • Others
  • My account
    • Download
    • Get Pack
    • Cart
    • Checkout
  • News
    • Category
    • News Tag
  • Forum
  • About Us
    • Privacy Policy
    • Frequently Questions
    • Contact
Home/Matlab/Give me images of the code bellow

Give me images of the code bellow

PuTI / 2025-03-02
Give me images of the code bellow
Matlab News

* Item one
* Item twoclc; clear; close all;

% Given Parameters
M = 1000; % Mass (kg)
K = 36000; % Column stiffness (N/m)
C = 600; % Damping coefficient (Ns/m)
Ks = 10000; % Soil stiffness (N/m)
wn = 6; % Natural frequency (rad/sec)
tspan = [0 10]; % Time span for simulation

% LuGre friction model parameters
mu_s = 0.2; % Static friction coefficient
mu_c = 0.1; % Dynamic friction coefficient
vs = 0.1; % Stribeck velocity
sigma0 = 1000; % Stiffness coefficient of bristle deflection
sigma1 = 10; % Damping coefficient
sigma2 = 0; % Viscous damping (optional)

% Load Seismic Data (Modify to load your earthquake data)
load(‘seismic_data.mat’);
acc_eq = acc_eq * 9.81; % Convert to m/s² if needed

% Interpolate to match time step
t_interp = linspace(min(t_eq), max(t_eq), length(tspan));
acc_interp = interp1(t_eq, acc_eq, t_interp, ‘linear’);

% Define ODE function with seismic input
function dxdt = SDOF_LuGre_Seismic(t, x, M, C, K, Ks, acc_interp, t_interp, mu_s, mu_c, vs, sigma0, sigma1, sigma2)
y = x(1);
y_dot = x(2);
z = x(3);
acc_g = interp1(t_interp, acc_interp, t, ‘linear’, 0);
g_y = mu_c + (mu_s – mu_c) * exp(-(y_dot / vs)^2);
z_dot = y_dot – (abs(y_dot) / g_y) * z;
F_friction = sigma0 * z + sigma1 * z_dot + sigma2 * y_dot;
y_ddot = (-C/M) * y_dot – (K/M) * y + (Ks/M) * acc_g – (F_friction/M);
dxdt = [y_dot; y_ddot; z_dot];
end

% Initial conditions
y0 = [0; 0; 0];

% Solve using ODE45
[t, Y] = ode45(@(t, x) SDOF_LuGre_Seismic(t, x, M, C, K, Ks, acc_interp, t_interp, mu_s, mu_c, vs, sigma0, sigma1, sigma2), tspan, y0);

% Extract displacement and velocity
y_response = Y(:, 1);
y_velocity = Y(:, 2);

% FFT Analysis
Fs = 100;
L = length(y_response);
Y_fft = fft(y_response);
P2 = abs(Y_fft/L);
P1 = P2(1:L/2+1);
P1(2:end-1) = 2*P1(2:end-1);
f = Fs * (0:(L/2)) / L;

% Plot and Save Waveform
figure;
plot(t, y_response, ‘b’, ‘LineWidth’, 1.5);
xlabel(‘Time (s)’); ylabel(‘Displacement (m)’);
title(‘Displacement Response under Seismic Excitation’);
grid on;
saveas(gcf, ‘displacement_waveform.png’);

% Plot and Save Phase Plot
figure;
plot(y_response, y_velocity, ‘r’, ‘LineWidth’, 1.5);
xlabel(‘Displacement (m)’); ylabel(‘Velocity (m/s)’);
title(‘Phase Plot: Velocity vs. Displacement’);
grid on;
saveas(gcf, ‘phase_plot.png’);

% Plot and Save FFT Analysis
figure;
plot(f, P1, ‘g’, ‘LineWidth’, 1.5);
xlabel(‘Frequency (Hz)’); ylabel(‘Magnitude’);
title(‘FFT Analysis of Displacement Response’);
grid on;
saveas(gcf, ‘fft_analysis.png’);

% Display maximum displacement
disp([‘Maximum Displacement: ‘, num2str(max(abs(y_response))), ‘ m’]);* Item one
* Item twoclc; clear; close all;

% Given Parameters
M = 1000; % Mass (kg)
K = 36000; % Column stiffness (N/m)
C = 600; % Damping coefficient (Ns/m)
Ks = 10000; % Soil stiffness (N/m)
wn = 6; % Natural frequency (rad/sec)
tspan = [0 10]; % Time span for simulation

% LuGre friction model parameters
mu_s = 0.2; % Static friction coefficient
mu_c = 0.1; % Dynamic friction coefficient
vs = 0.1; % Stribeck velocity
sigma0 = 1000; % Stiffness coefficient of bristle deflection
sigma1 = 10; % Damping coefficient
sigma2 = 0; % Viscous damping (optional)

% Load Seismic Data (Modify to load your earthquake data)
load(‘seismic_data.mat’);
acc_eq = acc_eq * 9.81; % Convert to m/s² if needed

% Interpolate to match time step
t_interp = linspace(min(t_eq), max(t_eq), length(tspan));
acc_interp = interp1(t_eq, acc_eq, t_interp, ‘linear’);

% Define ODE function with seismic input
function dxdt = SDOF_LuGre_Seismic(t, x, M, C, K, Ks, acc_interp, t_interp, mu_s, mu_c, vs, sigma0, sigma1, sigma2)
y = x(1);
y_dot = x(2);
z = x(3);
acc_g = interp1(t_interp, acc_interp, t, ‘linear’, 0);
g_y = mu_c + (mu_s – mu_c) * exp(-(y_dot / vs)^2);
z_dot = y_dot – (abs(y_dot) / g_y) * z;
F_friction = sigma0 * z + sigma1 * z_dot + sigma2 * y_dot;
y_ddot = (-C/M) * y_dot – (K/M) * y + (Ks/M) * acc_g – (F_friction/M);
dxdt = [y_dot; y_ddot; z_dot];
end

% Initial conditions
y0 = [0; 0; 0];

% Solve using ODE45
[t, Y] = ode45(@(t, x) SDOF_LuGre_Seismic(t, x, M, C, K, Ks, acc_interp, t_interp, mu_s, mu_c, vs, sigma0, sigma1, sigma2), tspan, y0);

% Extract displacement and velocity
y_response = Y(:, 1);
y_velocity = Y(:, 2);

% FFT Analysis
Fs = 100;
L = length(y_response);
Y_fft = fft(y_response);
P2 = abs(Y_fft/L);
P1 = P2(1:L/2+1);
P1(2:end-1) = 2*P1(2:end-1);
f = Fs * (0:(L/2)) / L;

% Plot and Save Waveform
figure;
plot(t, y_response, ‘b’, ‘LineWidth’, 1.5);
xlabel(‘Time (s)’); ylabel(‘Displacement (m)’);
title(‘Displacement Response under Seismic Excitation’);
grid on;
saveas(gcf, ‘displacement_waveform.png’);

% Plot and Save Phase Plot
figure;
plot(y_response, y_velocity, ‘r’, ‘LineWidth’, 1.5);
xlabel(‘Displacement (m)’); ylabel(‘Velocity (m/s)’);
title(‘Phase Plot: Velocity vs. Displacement’);
grid on;
saveas(gcf, ‘phase_plot.png’);

% Plot and Save FFT Analysis
figure;
plot(f, P1, ‘g’, ‘LineWidth’, 1.5);
xlabel(‘Frequency (Hz)’); ylabel(‘Magnitude’);
title(‘FFT Analysis of Displacement Response’);
grid on;
saveas(gcf, ‘fft_analysis.png’);

% Display maximum displacement
disp([‘Maximum Displacement: ‘, num2str(max(abs(y_response))), ‘ m’]); * Item one
* Item twoclc; clear; close all;

% Given Parameters
M = 1000; % Mass (kg)
K = 36000; % Column stiffness (N/m)
C = 600; % Damping coefficient (Ns/m)
Ks = 10000; % Soil stiffness (N/m)
wn = 6; % Natural frequency (rad/sec)
tspan = [0 10]; % Time span for simulation

% LuGre friction model parameters
mu_s = 0.2; % Static friction coefficient
mu_c = 0.1; % Dynamic friction coefficient
vs = 0.1; % Stribeck velocity
sigma0 = 1000; % Stiffness coefficient of bristle deflection
sigma1 = 10; % Damping coefficient
sigma2 = 0; % Viscous damping (optional)

% Load Seismic Data (Modify to load your earthquake data)
load(‘seismic_data.mat’);
acc_eq = acc_eq * 9.81; % Convert to m/s² if needed

% Interpolate to match time step
t_interp = linspace(min(t_eq), max(t_eq), length(tspan));
acc_interp = interp1(t_eq, acc_eq, t_interp, ‘linear’);

% Define ODE function with seismic input
function dxdt = SDOF_LuGre_Seismic(t, x, M, C, K, Ks, acc_interp, t_interp, mu_s, mu_c, vs, sigma0, sigma1, sigma2)
y = x(1);
y_dot = x(2);
z = x(3);
acc_g = interp1(t_interp, acc_interp, t, ‘linear’, 0);
g_y = mu_c + (mu_s – mu_c) * exp(-(y_dot / vs)^2);
z_dot = y_dot – (abs(y_dot) / g_y) * z;
F_friction = sigma0 * z + sigma1 * z_dot + sigma2 * y_dot;
y_ddot = (-C/M) * y_dot – (K/M) * y + (Ks/M) * acc_g – (F_friction/M);
dxdt = [y_dot; y_ddot; z_dot];
end

% Initial conditions
y0 = [0; 0; 0];

% Solve using ODE45
[t, Y] = ode45(@(t, x) SDOF_LuGre_Seismic(t, x, M, C, K, Ks, acc_interp, t_interp, mu_s, mu_c, vs, sigma0, sigma1, sigma2), tspan, y0);

% Extract displacement and velocity
y_response = Y(:, 1);
y_velocity = Y(:, 2);

% FFT Analysis
Fs = 100;
L = length(y_response);
Y_fft = fft(y_response);
P2 = abs(Y_fft/L);
P1 = P2(1:L/2+1);
P1(2:end-1) = 2*P1(2:end-1);
f = Fs * (0:(L/2)) / L;

% Plot and Save Waveform
figure;
plot(t, y_response, ‘b’, ‘LineWidth’, 1.5);
xlabel(‘Time (s)’); ylabel(‘Displacement (m)’);
title(‘Displacement Response under Seismic Excitation’);
grid on;
saveas(gcf, ‘displacement_waveform.png’);

% Plot and Save Phase Plot
figure;
plot(y_response, y_velocity, ‘r’, ‘LineWidth’, 1.5);
xlabel(‘Displacement (m)’); ylabel(‘Velocity (m/s)’);
title(‘Phase Plot: Velocity vs. Displacement’);
grid on;
saveas(gcf, ‘phase_plot.png’);

% Plot and Save FFT Analysis
figure;
plot(f, P1, ‘g’, ‘LineWidth’, 1.5);
xlabel(‘Frequency (Hz)’); ylabel(‘Magnitude’);
title(‘FFT Analysis of Displacement Response’);
grid on;
saveas(gcf, ‘fft_analysis.png’);

% Display maximum displacement
disp([‘Maximum Displacement: ‘, num2str(max(abs(y_response))), ‘ m’]); image processing MATLAB Answers — New Questions

​

Tags: matlab

Share this!

Related posts

Warning: Error updating FunctionLine in using fplot
2025-05-12

Warning: Error updating FunctionLine in using fplot

Solid creation Simulink, simscape multibody: stuck in loading
2025-05-12

Solid creation Simulink, simscape multibody: stuck in loading

Issues with EMG Signal Acquisition via Simulink Desktop Real-Time (SDRT) and DAQ Board Usage
2025-05-12

Issues with EMG Signal Acquisition via Simulink Desktop Real-Time (SDRT) and DAQ Board Usage

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Search

Categories

  • Matlab
  • Microsoft
  • News
  • Other
Application Package Repository Telkom University

Tags

matlab microsoft opensources
Application Package Download License

Application Package Download License

Adobe
Google for Education
IBM
Matlab
Microsoft
Wordpress
Visual Paradigm
Opensource

Sign Up For Newsletters

Be the First to Know. Sign up for newsletter today

Application Package Repository Telkom University

Portal Application Package Repository Telkom University, for internal use only, empower civitas academica in study and research.

Information

  • Telkom University
  • About Us
  • Contact
  • Forum Discussion
  • FAQ
  • Helpdesk Ticket

Contact Us

  • Ask: Any question please read FAQ
  • Mail: helpdesk@telkomuniversity.ac.id
  • Call: +62 823-1994-9941
  • WA: +62 823-1994-9943
  • Site: Gedung Panambulai. Jl. Telekomunikasi

Copyright © Telkom University. All Rights Reserved. ch

  • FAQ
  • Privacy Policy
  • Term

This Application Package for internal Telkom University only (students and employee). Chiers... Dismiss