Reversing an Array in MATLAB without using any built in function
Code:
x=input('Enter the array');
Y=[];
for i=length(x):-1:1
y=x(i);
Y=[Y y];
end
Built in function:fliplr
x=input('Enter the array');
Y=[];
for i=length(x):-1:1
y=x(i);
Y=[Y y];
end
Built in function:fliplr
No comments