Login

Welcome, Guest. Please login or register.

November 05, 2025, 09:57:41 am

Author Topic: ENG1060 Computing  (Read 45430 times)  Share 

0 Members and 1 Guest are viewing this topic.

JinXi

  • Victorian
  • Forum Leader
  • ****
  • Posts: 818
  • Respect: +90
  • School: Camberwell High School
  • School Grad Year: 2010
Re: ENG1060 Computing
« Reply #180 on: May 16, 2011, 08:28:59 pm »
0
Yup got that for 2e:) and yeah for 2b the values are way off. Also m@tty how did you get that image? I just found the error between the estimated z value and the average z value, any hints? :D

don't use the average z value lol.... just sub x raw data from part a into your left wall equation for your predicted z values, then use that and raw z values for the error.
Monash B.Aero Eng/Sci Discontinued in Sem2 2012 [2011-2015]

"I will always choose a lazy person to do a difficult job… because, he will find an easy way to do it." ~ Bill Gates
^ SNORLAX, I chooosee You!!!

moekamo

  • Victorian
  • Forum Obsessive
  • ***
  • Posts: 275
  • Respect: +4
Re: ENG1060 Computing
« Reply #181 on: May 16, 2011, 08:30:45 pm »
0
Yup got that for 2e:) and yeah for 2b the values are way off. Also m@tty how did you get that image? I just found the error between the estimated z value and the average z value, any hints? :D

you have to get the error for EVERY row of z data(i did it in a loop), then, using imshow() on this this will give you the image m@tty has.

For Q1b, can anyone tell me what average we are trying to plot? Is it the average of the data that has had the last 8 columns removed, the raw data with all the noise or the data that with every 10th point addressed?

its the average of the data with last 8 columns removed, you dont need to do it for every tenth point either, it should be for every point.

bleh Im quite sure I did 2b right but My value for 1993 is off the ssa line from part a by about 10km^2... thats the nearest i can get it with the threshold value's given..

Anyway for part 2e, anyone get the ssa hits 0 during 2014 for polynomial and during 2021 for ODE?

hmm, i got 2013 for the polynomial and 2021 for the ode, my polynomial function was
SSA= -0.01122276*y^2 + 43.44451115*y -41976.03590168
did you guys use floor() on your root so that you get the year where it goes to zero? not the closest year that it goes to zero?
2nd Year BSc/BEng @ Monash

m@tty

  • Victorian
  • ATAR Notes Legend
  • *******
  • Posts: 4324
  • Respect: +33
  • School: Heatherton Christian College
  • School Grad Year: 2010
Re: ENG1060 Computing
« Reply #182 on: May 16, 2011, 08:41:02 pm »
0
For Q1b, can anyone tell me what average we are trying to plot? Is it the average of the data that has had the last 8 columns removed, the raw data with all the noise or the data that with every 10th point addressed?

hmm, it doesn't say

I'm confident that we should use the data with noise removed. All we were asked to do with every tenth point is plot, so I doubt they want us to use that.

Yup got that for 2e:) and yeah for 2b the values are way off. Also m@tty how did you get that image? I just found the error between the estimated z value and the average z value, any hints? :D

I took the difference between the estimated z-value (from polyfit) and the actual value, rather than the average. (then squared it, of course.) As others have now said.

Why'd you use a loop, moekamo? you can input a matrix in polyval, so you can get the predictions in a single matrix and then you only need one line, not a loop. And it runs faster.

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.

moekamo

  • Victorian
  • Forum Obsessive
  • ***
  • Posts: 275
  • Respect: +4
Re: ENG1060 Computing
« Reply #183 on: May 16, 2011, 08:57:24 pm »
0
@ m@tty: i was talking about getting the error^2, i looped so that the error^2 was calculated for every row of the z data
i got the predictions for the polynomial model using polyval and a single line as you said.

but did you guys get the same polynomial model as me? if so then why are our years different by one?
2nd Year BSc/BEng @ Monash

xZero

  • Victorian
  • Forum Leader
  • ****
  • Posts: 898
  • Respect: +68
Re: ENG1060 Computing
« Reply #184 on: May 16, 2011, 09:01:48 pm »
0
ohhh haha I used the average value coz i ceebs working out the error for every row in the raw data :P
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 #185 on: May 16, 2011, 09:08:37 pm »
0
So for the error, do we use the actual z values with noise or without noise?

m@tty

  • Victorian
  • ATAR Notes Legend
  • *******
  • Posts: 4324
  • Respect: +33
  • School: Heatherton Christian College
  • School Grad Year: 2010
Re: ENG1060 Computing
« Reply #186 on: May 16, 2011, 09:10:35 pm »
0
the error is only needed for the left wall (specified in question)

@ m@tty: i was talking about getting the error^2, i looped so that the error^2 was calculated for every row of the z data
i got the predictions for the polynomial model using polyval and a single line as you said.

I didn't have a loop at all..

this is my code for it

Code: [Select]
left_x = x( :, 1:532);
left_z = z( :, 1:532);

z_line_1 = polyval(line_1, left_x);


residual = (left_z - z_line_1).^2;

imshow(residual, [0 0.01])

(the reason I'm interested in this is that the question said "every row" but I don't see the point of a loop...)
« Last Edit: May 16, 2011, 09:21:51 pm by m@tty »
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 #187 on: May 16, 2011, 09:37:05 pm »
0
but then you're not comparing to the raw data like the question asked, rather you're comparing to the estimated z value using x as raw data.
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 #188 on: May 16, 2011, 09:43:10 pm »
0
?

left_z is raw data, z_line_1 is the predicted z value for each x value.

What's your alternative?
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.

sajib_mostofa

  • Victorian
  • Forum Leader
  • ****
  • Posts: 829
  • Respect: +6
Re: ENG1060 Computing
« Reply #189 on: May 16, 2011, 09:50:54 pm »
0
Wait, is it (raw data - estimate).^2 or the other way around?

m@tty

  • Victorian
  • ATAR Notes Legend
  • *******
  • Posts: 4324
  • Respect: +33
  • School: Heatherton Christian College
  • School Grad Year: 2010
Re: ENG1060 Computing
« Reply #190 on: May 16, 2011, 09:52:13 pm »
0
It doesn't make a difference since it is squared.
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 #191 on: May 16, 2011, 10:07:53 pm »
0
Ahhh right I see, sweet thanks
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

moekamo

  • Victorian
  • Forum Obsessive
  • ***
  • Posts: 275
  • Respect: +4
Re: ENG1060 Computing
« Reply #192 on: May 16, 2011, 10:41:55 pm »
0
the error is only needed for the left wall (specified in question)

@ m@tty: i was talking about getting the error^2, i looped so that the error^2 was calculated for every row of the z data
i got the predictions for the polynomial model using polyval and a single line as you said.


I didn't have a loop at all..

this is my code for it

Code: [Select]
left_x = x( :, 1:532);
left_z = z( :, 1:532);

z_line_1 = polyval(line_1, left_x);


residual = (left_z - z_line_1).^2;

imshow(residual, [0 0.01])

(the reason I'm interested in this is that the question said "every row" but I don't see the point of a loop...)

ahh, i see what you did, nice, makes sense. But your z_line_1 should be the values used to plot the line(part c) shouldn't they? not ones re-evaluated using all the x data again with polyval...

thats why i looped, so i could use the same row vector of predicted z data over and over again, hence avoiding recalculation of z data again using polyval for a massive matrix.

I dunno which would be preffered, how did wai ho do the thing that times two m-files? maybe we could compare to find the most efficient one?
2nd Year BSc/BEng @ Monash

moekamo

  • Victorian
  • Forum Obsessive
  • ***
  • Posts: 275
  • Respect: +4
Re: ENG1060 Computing
« Reply #193 on: May 16, 2011, 10:51:37 pm »
0
wait yea, go desktop -> profiler -> start profiling then run your m-files, then go stop profiling and it tells you the time for each
2nd Year BSc/BEng @ Monash

m@tty

  • Victorian
  • ATAR Notes Legend
  • *******
  • Posts: 4324
  • Respect: +33
  • School: Heatherton Christian College
  • School Grad Year: 2010
Re: ENG1060 Computing
« Reply #194 on: May 16, 2011, 11:02:57 pm »
0
Hey just did it (ran run_all.m) q1d is 0.547 total time or self-time 0.312
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.