Lline Transformation

Version 1.0.0 (1.34 KB) by Jash
Lline Transformation
0 Downloads
Updated 22 Nov 2023

View License

X1 = input('Enter value of x1'); %Input points for line
Y1 = input('Enter value of y1'); %Input points for line
X2 = input('Enter value of x2'); %Input points for line
Y2 = input('Enter value of y2'); %Input points for line
X3 = input('Enter value of x3'); %Input points for translation
Y3 = input('Enter value of y3'); %Input points for translation
matrixinput = [X1 Y1 1;X2 Y2 1;0 0 1]; %Input Matrix
translation = [1 0 0;0 1 0;X3 Y3 1] %Translation Matrix
z=matrixinput*translation
plot(matrixinput(:,1),matrixinput(:,2)) %Plotting initial points
hold on
plot(z(:,1),z(:,2)) %Plotting final points
title('2-D Translation') % Title
legend('Initial','Final') % Legend
xlabel('X-Axis')
ylabel('Y-Axis')

Cite As

Jash (2024). Lline Transformation (https://www.mathworks.com/matlabcentral/fileexchange/155407-lline-transformation), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2023b
Compatible with any release
Platform Compatibility
Windows macOS Linux
Tags Add Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Version Published Release Notes
1.0.0