davyzhu
Advanced Member level 1
matlab inline function
Hi all,
I write a inline function.
Code:
%%---------------------
function test
x=uint8(7);
y=sub_test(x)
function [y]=sub_test(x)
bitclr=inline('bitset(x,bit,0)','x','bit');
y=bitclr(x,1);
%%--------------------
But the code below seems not right:
%%---------------------
function test
bitclr=inline('bitset(x,bit,0)','x','bit');
x=uint8(7);
y=sub_test(x)
function [y]=sub_test(x)
y=bitclr(x,1);
%%--------------------
How to write global inline function that can be called by all function and sub-functions?
Thanks!
BTW, I use Matlab 5.3.
Any suggestions will be appreciated!
Best regards,
Davy
Hi all,
I write a inline function.
Code:
%%---------------------
function test
x=uint8(7);
y=sub_test(x)
function [y]=sub_test(x)
bitclr=inline('bitset(x,bit,0)','x','bit');
y=bitclr(x,1);
%%--------------------
But the code below seems not right:
%%---------------------
function test
bitclr=inline('bitset(x,bit,0)','x','bit');
x=uint8(7);
y=sub_test(x)
function [y]=sub_test(x)
y=bitclr(x,1);
%%--------------------
How to write global inline function that can be called by all function and sub-functions?
Thanks!
BTW, I use Matlab 5.3.
Any suggestions will be appreciated!
Best regards,
Davy