Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Typecasting Concept

Status
Not open for further replies.

uranyumx

Advanced Member level 4
Full Member level 1
Joined
Mar 5, 2011
Messages
102
Helped
1
Reputation
2
Reaction score
0
Trophy points
1,296
Activity points
2,098
Hello,

I am casting 16 bit value to 8 bit values with typecast(uint16(app.X.Value), 'uint8');

While I was printing uint16(app.X.Value), I got 10 which is my input value. Then, after casting with typecast(uint16(app.X.Value), 'uint8');, I got 103 0 values. So, how does the program generate these numbers that I want to address?

Thank you,
 

typecast() is a MATLAB function. Why are you posting in microcontrollers section?

It would be helpful if you tell the full context, preferably post a code example that demonstrates the observed effect.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top