Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
cs251_group04
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
SHAH DEVANSH
cs251_group04
Commits
0e58c547
You need to sign in or sign up before continuing.
Commit
0e58c547
authored
Aug 23, 2016
by
ARCHIT GUPTA
Browse files
Options
Browse Files
Download
Plain Diff
Merge git.cse.iitb.ac.in:devansh/cs251_group04
parents
2dfb3cae
cce7f2dc
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
38 additions
and
0 deletions
+38
-0
final_state_3.m
final_state_3.m
+38
-0
No files found.
final_state_3.m
0 → 100644
View file @
0e58c547
global
A
=
eye
(
9
,
9
);
% initialising an identity matrix
for
i
=
1
:
9
for
j
=
i
:
9
if
(
j
-
i
==
1
|
j
-
i
==
3
)
A
([
i
],[
j
])
=
1
;
A
([
j
],[
i
])
=
1
;
endif
endfor
endfor
A
([
4
],[
3
])
=
A
([
3
],[
4
])
=
A
([
7
],[
6
])
=
A
([
6
],[
7
])
=
0
;
%We observed that all the elements with |i-j|=1 except 3,4,6,7 satisfied the neighbour criteria.
%function to make answer=(Ax+b)mod2
function
answer
=
state
(
b
,
x
)
global
A
;
final
=
(
A
*
x
)
+
b
;
%according to the formula
for
i
=
1
:
9
final
([
i
])
=
mod
(
final
([
i
]),
2
);
endfor
answer
=
zeros
(
3
,
3
);
for
i
=
1
:
3
answer
([
1
],[
i
])
=
final
([
i
]);
endfor
for
j
=
4
:
6
answer
([
2
],[
j
-
3
])
=
final
([
j
]);
endfor
for
k
=
7
:
9
answer
([
3
],[
k
-
6
])
=
final
([
k
]);
endfor
endfunction
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment