Displacement of a particle in moving fluid
%program to calculate total displacement of a particle
clear all
close all
clc
%Inputs
v = [2 3 4]; %Velocity in each direction x,y,&z (Row vector)
t = [1;2;3]; %Time taken in each direction x,y &z (Column vector)
%Output
displacement = v*t;