why error is coming "undefined function or variable"?

6 次查看(过去 30 天)
i am trying to declare one qudratic equation but getting this error in R2017b and R2020b also
M1=bit3xor(u2,w2,bitxor(bit3xor(bitand(v2,d2))));
Error: Undefined function or variable 'bit3xor'.
Please someone help me in removing this error.

回答(1 个)

KALYAN ACHARJYA
KALYAN ACHARJYA 2020-11-21
编辑:KALYAN ACHARJYA 2020-11-21
There is no such "bit3xor" inbuilt function in MATLAB. It might be custom function, if so please keep the bit3xor.m file in the same working directory.
  1 个评论
Dhruv Bhatnagar
Dhruv Bhatnagar 2020-11-21
Thank You Sir.
But Sir I made change and used like this for f10 equation but still operation is not working What is going wrong in this.
f10 = 1 + v2 + x2 + x2v2 + x2v3 + x3v2 + x2w2 + x2w3 + x3w2
This qudratic equation I want to evaluate using Matlab so I wrote like this.
Z=quad(0,1,1,0,1,0,1,1);
function F10 = quad(u2,v2,w2,x2,u3,v3,w3,x3)
F10=bitxor(1,v2,x2,bitxor(bitxor(bitand(x2,v2),bitand(x2,v3),bitand(x3,v2)),bitxor(bitand(x2,w2),bitand(x2,w3),bitand(x3,w2))));
end

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Adding custom doc 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by