Sscaling and Rotation

Version 1.0.0 (1.33 KB) by Jash
Sscaling and Rotation
1 Download
Updated 22 Nov 2023

View License

clc
clear all;
rows=input('Enter the number of rows:');
columns=input('Enter the number of columns:');
for i=1:rows
for j=1:columns
A(i,j)=input('Enter the values');
A(i,j+1) = 1 ;
end
end
angle = input('Enter the value of angle');
Xs = input('Enter X-axis Scaling ');
Ys = input('Enter Y-axis Scaling ');
theta = angle*pi/180;
rotation=[cos(theta) sin(theta) 1;-sin(theta) cos(theta) 1;0 0 1];
Z = A*rotation;
Scaling = [Xs 0 0;0 Ys 0;0 0 1] ;
S = A*Scaling;
A;
plot(A(:,1),A(:,2))
hold on
plot(Z(:,1),Z(:,2))
hold on
plot(S(:,1),S(:,2))
title('Rotation & Scaling')
legend('Initial','Rotated','Scaling')
xlabel('X-Axis')
ylabel('Y-Axis')

Cite As

Jash (2026). Sscaling and Rotation (https://www.mathworks.com/matlabcentral/fileexchange/155412-sscaling-and-rotation), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2023b
Compatible with any release
Platform Compatibility
Windows macOS Linux
Tags Add Tags
Version Published Release Notes
1.0.0