Filter löschen
Filter löschen

How to implement this algorithm?

1 Ansicht (letzte 30 Tage)
Darsana P M
Darsana P M am 19 Sep. 2017
Kommentiert: Darsana P M am 19 Okt. 2017
I have a doubt in the above code. I want to declare x=x1,x2,x3..x8 But i got an error
clc;
clear all;
close all;
x=[0 1 1 0 1 1 0 1];
y=[0 0 0 0 0 0 0 0];
for j=1:8
x[j] = [xj:xj+1];
Yj = (xor(yj-1,xj)*H);
end
Y
The error was: Undefined function or variable 'xj'.
Error in counter1 (line 9) x=[xj:xj+1];
>> counter1 Error: File: counter1.m Line: 9 Column: 8 Unbalanced or unexpected parenthesis or bracket.
  7 Kommentare
John D'Errico
John D'Errico am 19 Okt. 2017
Exactly. The problem here is not with how to do bitwise operations in MATLAB, but that you seem to not understand fundamental ideas in MATLAB, like how to index an array. Learn to use MATLAB first.
Darsana P M
Darsana P M am 19 Okt. 2017
ok.Thanks

Melden Sie sich an, um zu kommentieren.

Antworten (0)

Kategorien

Mehr zu Get Started with MATLAB finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by