Skip to content

Commit d5377ed

Browse files
authored
Update sin_gen.m
1 parent ca679fd commit d5377ed

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

top/sin_gen.m

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
clc
22
clear
3+
34
x = [0:2*pi/256:2*pi-2*pi/256];
45
y1 = sin(x) + 1;
56
y2 = y1./max(y1);
@@ -26,7 +27,7 @@
2627
end
2728

2829
for i = 1:256
29-
fprintf(fid1, '%s\n', dec2bin(y6(i), 12));
30+
fprintf(fid2, '%s\n', dec2bin(y6(i), 12));
3031
end
3132

3233
fclose(fid2);

0 commit comments

Comments
 (0)