{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

# ML12 - 1 Matlab 12 Queen Function Tian Gu Code 815 Team...

This preview shows pages 1–2. Sign up to view the full content.

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: 1 Matlab 12 Queen Function Tian Gu Code: 815 Team partner: Tielong Su Introduction Last week I finished the rook function, but the bishop part did not work perfectly. I thought I was using the brief way, but the only thing I couldn’t figure out were the ranges. This lab was about the queen function. We can say it is just a combination the rook function and the bishop function. Before we solved this, we must make sure the bishop part can work well. So with my partner, I focused on the rest part of the bishop (about the ranges). And finally we got it perfectly and it was very brief. Then we used the queen function in a program to let users play. Queen Function Last time I got this questionable bishop function below, function [chessBoard] = Bishop(c,d); [chessBoard] = ones(8) for x=-2:2 (the part we should fix) chessBoard(c+x,d+x)=0; (we should also these parts because it affect what the range is) end for y=-2:2 (the part we should fix) chessBoard(c-y,d+y)=0; end chessBoard(c,d)=3 end I mentioned I couldn’t get the right ranges, here I just put a small range here to make sure it can work. Now we should think about the right ranges which could make it run anytime. We thought about maybe we could do some adjustments to make the function in four quadrants, so this makes ranges much easier to get. Now we should use four “for ” sentences....
View Full Document

{[ snackBarMessage ]}

### Page1 / 6

ML12 - 1 Matlab 12 Queen Function Tian Gu Code 815 Team...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online