Here's a general outline to write a MATLAB code to simulate the train loading with an axle load of 130KN:
Load the necessary data or create the data to use as inputs in your code, such as the axle load and the desired curve.
Define the variables to use in your code, such as the position of the axle along the track, the time step, and any other parameters needed to generate the curve.
Create a loop to calculate the position of the axle for each time step. You can use the equation for position, velocity, and acceleration to calculate the position of the axle for each time step.
Plot the calculated position of the axle versus time. You can use the "plot" function in MATLAB to generate the graph.
Compare the plot of the calculated position to the desired curve. You can use the "hold on" and "plot" functions to overlay the two plots and compare them.
Here's an example code to get you started:
clear; close all;
% Define the variables
axle_load = 130; % KN
time_step = 0.01; % s
t = 0:time_step:100; % time
% Calculate position, velocity, and acceleration
velocity = 100 * sin(2*pi*t); % m/s
acceleration = 100 * 2*pi * cos(2*pi*t); % m/s^2
position = cumtrapz(t, velocity); % m
% Plot position vs time
figure;
plot(t, position);
xlabel('Time (s)');
ylabel('Position (m)');
title('Train Loading with Axle Load 130KN');
This is just an example code to give you a general idea of how to write a MATLAB code to simulate the train loading with an axle load of 130KN. The exact details of the calculations and the curve may differ based on your specific requirements.