davyzhu
Advanced Member level 1
matlab inline-macro
Hi all,
I write a inline function.
Code:
%%---------
x=uint8(5);
bit=3;
% clear the bit
bitclr=inline('bitset(x,bit,0)');
c=bitclr(x,bit)
%%---------
But the output seems to be wrong.
Is there any other method to write something like C language's Micro?
And I want the inline function or Macro can be used by sub-function.
Thanks!
BTW, I use Matlab 5.3.
Any suggestions will be appreciated!
Best regards,
Davy
Hi all,
I write a inline function.
Code:
%%---------
x=uint8(5);
bit=3;
% clear the bit
bitclr=inline('bitset(x,bit,0)');
c=bitclr(x,bit)
%%---------
But the output seems to be wrong.
Is there any other method to write something like C language's Micro?
And I want the inline function or Macro can be used by sub-function.
Thanks!
BTW, I use Matlab 5.3.
Any suggestions will be appreciated!
Best regards,
Davy