converting points on cell array
Mostrar comentarios más antiguos
Hi I want to display points as cell. but it gives error at t
for i=0:n-1
t=(find({Y2}=={(X(i+1))}));
if (~isempty(t))
temp=[ones(1,length(t)).*i; t-1];
.
.
error at
t=(find({Y2}=={(X(i+1))}));
Undefined operator '==' for input arguments of type 'cell'
Can anyone tell me whats wrong here
6 comentarios
madhan ravi
el 17 de Ag. de 2019
{Y2} why? Instead of Y2 ??, upload the missing datas.
Walter Roberson
el 17 de Ag. de 2019
What is your expectation for how {Y2}=={(X(i+1))} would work? Is there a reason you are not using Y2==(X(i+1)) ?
sadiqa ilyas
el 17 de Ag. de 2019
sadiqa ilyas
el 17 de Ag. de 2019
Are Mjaavatten
el 19 de Ag. de 2019
What do you mean by points? And why use cell arrays?
I have modified your code so that it runs, but this may not be what you want. Could you explain in more detail what you are attempting to do?
n = 4;a = 1; b = 3;
Y2 = cell(n,1);X=cell(n,1);
for x=1:n
Y2{x} = powermod(x,2,n);
X{x} = mod(x^3+a*x+b,n);
end
E=[];
for i=0:n-1
t=find(cell2mat(Y2)==X{i+1});
if (~isempty(t))
temp=[ones(length(t),1)*i; t-1];
E=[E temp];
end
end
sadiqa ilyas
el 19 de Ag. de 2019
Respuestas (0)
Categorías
Más información sobre Triangular Distribution en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!