Turn on thread page Beta
    • Thread Starter
    Offline

    1
    ReputationRep:
    This is the code i am using the object it plots the shape of a house. From scaling3y to shear2y I can't get the code to work. I have been told the I have to change the matrices coordinates like [2 0;0 1] for scaling2x. Can you help complete the code so it worls in matlab.

    % Linear Transformations
    clc,close all,clear;
    % Object to be transformed is a house
    obj=[0 0;0 1;1 2;2 1;2 0;3 0;7/4 0;7/4 1/2;5/4 1/2;5/4 0;-1 0]'
    I=eye(2);
    %Transformation Matrices
    scaling2x=[2 0;0 1];

    scaling3y
    rotate45
    reflectx-axis
    reflecty-axis
    reflecty=x
    reflecty=-x
    shear3x
    shear2y

    %Call to function lintr2 to print output
    lintr2(obj,scaling2x)
    hold on
 
 
 
Reply
Submit reply
Turn on thread page Beta
Updated: February 9, 2017
Poll
Favourite type of bread
Useful resources

Make your revision easier

Maths

Maths Forum posting guidelines

Not sure where to post? Read the updated guidelines here

Equations

How to use LaTex

Writing equations the easy way

Student revising

Study habits of A* students

Top tips from students who have already aced their exams

Study Planner

Create your own Study Planner

Never miss a deadline again

Polling station sign

Thinking about a maths degree?

Chat with other maths applicants

Can you help? Study help unanswered threads

Groups associated with this forum:

View associated groups

The Student Room, Get Revising and Marked by Teachers are trading names of The Student Room Group Ltd.

Register Number: 04666380 (England and Wales), VAT No. 806 8067 22 Registered Office: International House, Queens Road, Brighton, BN1 3XE

Write a reply...
Reply
Hide
Reputation gems: You get these gems as you gain rep from other members for making good contributions and giving helpful advice.