Thanks to Hassaan answer, I got to know about quiver function and used the below code to get the required image
mArrow3([0 0 0],[10 0 0],'color','red','stemWidth',0.05);
mArrow3([0 0 0],[0 10 0],'color','red','stemWidth',0.05);
mArrow3([0 0 0],[0 0 10],'color','red','stemWidth',0.05);
view(32, 32);
x = 0:0.1:10;
sine_wave = 5*sin(x);
hold on;plot3(x,zeros(length(x),1),sine_wave,'b');
vector_3d_x = 0:1:10;
vector_3d_y = 0:1:10;
vector_3d_z = 0:1:10;
[X,Y,Z] = meshgrid(vector_3d_x,vector_3d_y,vector_3d_z);
U = zeros(size(X));
V = zeros(size(Y));
W = sin(X);
hold on;quiver3(X, Y, Z, U, V, W, 'k');