I have in my workspace two variables with different length how can I make them have same length in order to plot them in a graph ?
9 views (last 30 days)
Shameer Parmar on 24 Jun 2016
Hello Manny Ram,
Let us consider Varibale A is having size of 16x30000 and B is having size of 9x1200
You can do this..
newRowLength = max(size(A,1),size(B,1));
newColLength = max(size(A,2),size(B,2));
if ((size(A,1)~=newRowLength) || (size(A,2)~=newColLength))
A(newRowLength,newColLength) = ;
if ((size(B,1)~=newRowLength) || (size(B,2)~=newColLength))
B(newRowLength,newColLength) = ;
Now A and B become of same length..