1. The problem statement, all variables and given/known data So I have a function that allows me to input two vectors and it will calculate the resultant vector. The code works fine. I need to call on this function and plot the two input vectors and the resultant; it's easier to explain if you look at the code. 2. Relevant equations 3. The attempt at a solution -------CODE------- run ResVec figure grid off %Data from ResVec x1 = [ 0 v1_x ]; y1 = [ 0 v1_y ]; x2 = [ 0 v2_x ]; y2 = [ 0 v2_y ]; x3 = [ 0 vR_x ]; y3 = [ 0 vR_y ]; hold on plot(x1,y1,x2,y2,x3,y3) ------------END-------------- But MATLAB first of all doesn't pull out v1_x, v1_y etc. out of the function. I want it to pull the values out of the function ResVec and store them in the workspace. Second of all, it seems to be refusing to plot these vectors and keeps plotting just one of them.