Login

Welcome, Guest. Please login or register.

October 10, 2025, 03:32:57 pm

Author Topic: ENG1060 Computing  (Read 44644 times)  Share 

0 Members and 1 Guest are viewing this topic.

m@tty

  • Victorian
  • ATAR Notes Legend
  • *******
  • Posts: 4324
  • Respect: +33
  • School: Heatherton Christian College
  • School Grad Year: 2010
Re: ENG1060 Computing
« Reply #75 on: April 15, 2011, 06:36:18 pm »
0
lool this week's labs GG

Man, it looks really long. xD

At least I - wait, we, JinXi - don't have to have it finished til Thursday :P

I pity the people who have Monday Labs :(
2009/2010: Mathematical Methods(non-CAS) ; Business Management | English ; Literature - Physics ; Chemistry - Specialist Mathematics ; MUEP Maths

96.85

2011-2015: Bachelor of Aerospace Engineering and Bachelor of Science, Monash University

2015-____: To infinity and beyond.

darkphoenix

  • Victorian
  • Part of the furniture
  • *****
  • Posts: 1564
  • Respect: +3
Re: ENG1060 Computing
« Reply #76 on: April 15, 2011, 11:37:03 pm »
0
lool this week's labs GG

Man, it looks really long. xD

At least I - wait, we, JinXi - don't have to have it finished til Thursday :P

I pity the people who have Monday Labs :(

FKKK LATERSSS
2009: Accounting
2010: English | Methods (CAS) | Specialist Maths | Chemistry | Chinese SL
2011: Bachelor of Commerce/Engineering @ Monash

sajib_mostofa

  • Victorian
  • Forum Leader
  • ****
  • Posts: 829
  • Respect: +6
Re: ENG1060 Computing
« Reply #77 on: April 17, 2011, 10:46:50 pm »
0
For the first question in lab 5, are the 'if' statements meant to be in your function file or when you call on the function in your script file?

xZero

  • Victorian
  • Forum Leader
  • ****
  • Posts: 898
  • Respect: +68
Re: ENG1060 Computing
« Reply #78 on: April 17, 2011, 10:50:51 pm »
0
all the if statements are in the function file
2009: Chinese SLA
2010: English, Maths method[45,A+ A+ A+], Specialist maths[44,A+,A,A+], Physics[40,A,A+,A+], Psychology Atar:94.75
2011-2015: Bachelor of Aerospace Engineering/Science @ Monash

Methods/Spesh/Physics tuition

sajib_mostofa

  • Victorian
  • Forum Leader
  • ****
  • Posts: 829
  • Respect: +6
Re: ENG1060 Computing
« Reply #79 on: April 17, 2011, 10:56:37 pm »
0
Cheers man. Also in your function, how would you write an equation relating the outputs to the inputs n1 and n2? If you can by any chance show me the equation for one of the statements, that would be great.

xZero

  • Victorian
  • Forum Leader
  • ****
  • Posts: 898
  • Respect: +68
Re: ENG1060 Computing
« Reply #80 on: April 17, 2011, 11:17:37 pm »
0
%If both numbers are equal when rounded, are_equal = 1 else are_qual = 0
if round(n1) == round(n2)
    are_equal = 1;
else are_equal = 0;
end

thats the first condition, see if you can work out the rest
2009: Chinese SLA
2010: English, Maths method[45,A+ A+ A+], Specialist maths[44,A+,A,A+], Physics[40,A,A+,A+], Psychology Atar:94.75
2011-2015: Bachelor of Aerospace Engineering/Science @ Monash

Methods/Spesh/Physics tuition

sajib_mostofa

  • Victorian
  • Forum Leader
  • ****
  • Posts: 829
  • Respect: +6
Re: ENG1060 Computing
« Reply #81 on: April 17, 2011, 11:20:23 pm »
0
Thanks for the headstart man.

sajib_mostofa

  • Victorian
  • Forum Leader
  • ****
  • Posts: 829
  • Respect: +6
Re: ENG1060 Computing
« Reply #82 on: April 17, 2011, 11:28:51 pm »
0
Is there any need to use loops for that Q?

xZero

  • Victorian
  • Forum Leader
  • ****
  • Posts: 898
  • Respect: +68
Re: ENG1060 Computing
« Reply #83 on: April 17, 2011, 11:30:35 pm »
0
no, only if statements
2009: Chinese SLA
2010: English, Maths method[45,A+ A+ A+], Specialist maths[44,A+,A,A+], Physics[40,A,A+,A+], Psychology Atar:94.75
2011-2015: Bachelor of Aerospace Engineering/Science @ Monash

Methods/Spesh/Physics tuition

m@tty

  • Victorian
  • ATAR Notes Legend
  • *******
  • Posts: 4324
  • Respect: +33
  • School: Heatherton Christian College
  • School Grad Year: 2010
Re: ENG1060 Computing
« Reply #84 on: April 17, 2011, 11:38:47 pm »
0
^ yeah only if statements..

In one case I used a nested if statement.

ie.

if
..
  if
  ..
  end
end

Overall though I'm finding this lab quite tricky / time consuming =\
2009/2010: Mathematical Methods(non-CAS) ; Business Management | English ; Literature - Physics ; Chemistry - Specialist Mathematics ; MUEP Maths

96.85

2011-2015: Bachelor of Aerospace Engineering and Bachelor of Science, Monash University

2015-____: To infinity and beyond.

xZero

  • Victorian
  • Forum Leader
  • ****
  • Posts: 898
  • Respect: +68
Re: ENG1060 Computing
« Reply #85 on: April 17, 2011, 11:45:04 pm »
0
Yup, took up my entire day to get it done (mostly coz I got distracted by other stuff on the comp :P), also the last question is a bitch!
2009: Chinese SLA
2010: English, Maths method[45,A+ A+ A+], Specialist maths[44,A+,A,A+], Physics[40,A,A+,A+], Psychology Atar:94.75
2011-2015: Bachelor of Aerospace Engineering/Science @ Monash

Methods/Spesh/Physics tuition

sajib_mostofa

  • Victorian
  • Forum Leader
  • ****
  • Posts: 829
  • Respect: +6
Re: ENG1060 Computing
« Reply #86 on: April 17, 2011, 11:46:35 pm »
0
Hmmm having trouble incorporating the last statement.

xZero

  • Victorian
  • Forum Leader
  • ****
  • Posts: 898
  • Respect: +68
Re: ENG1060 Computing
« Reply #87 on: April 17, 2011, 11:49:56 pm »
0
none = 1 if everything else = 0
2009: Chinese SLA
2010: English, Maths method[45,A+ A+ A+], Specialist maths[44,A+,A,A+], Physics[40,A,A+,A+], Psychology Atar:94.75
2011-2015: Bachelor of Aerospace Engineering/Science @ Monash

Methods/Spesh/Physics tuition

sajib_mostofa

  • Victorian
  • Forum Leader
  • ****
  • Posts: 829
  • Respect: +6
Re: ENG1060 Computing
« Reply #88 on: April 17, 2011, 11:54:55 pm »
0
After I've done all those statements, it says my output variables are 'unused'

xZero

  • Victorian
  • Forum Leader
  • ****
  • Posts: 898
  • Respect: +68
Re: ENG1060 Computing
« Reply #89 on: April 17, 2011, 11:57:44 pm »
0
function [are_equal, are_odd, is_neg, is_near1, none] = MyCompare(n1,n2)

you have to use are_equal, are_odd, is_neg, is_near1 and none in your if statements since they are the output of the function
2009: Chinese SLA
2010: English, Maths method[45,A+ A+ A+], Specialist maths[44,A+,A,A+], Physics[40,A,A+,A+], Psychology Atar:94.75
2011-2015: Bachelor of Aerospace Engineering/Science @ Monash

Methods/Spesh/Physics tuition