Main Page | Report this Page
 
   
Science Forum Index  »  Image Processing Forum  »  matlab problem!!
Page 1 of 1    
Author Message
kal
Posted: Fri Dec 22, 2006 3:25 pm
Guest
Dear All
I hope that you are doing well and everything is OK.
I have a question, please:
I have a decimal number stored in a matrix. For example,
Matrix subscripts: 1 2 3 5 6 7 8 9
10
Values: 8 9 8 7 7 9 9 2
7
So, the number is: 898779927
My matrix consists of 3000 cells and each cell contains a number from
0-9. I need to get the number of bits for this string in binary.
However, I cannot convert it to binary as the program will give me out
of range.
Thanks and your response will be much appreciated.
Sincerely,
Kal
Guest
Posted: Fri Dec 22, 2006 4:13 pm
dear All
Quote:
So, the number is: 898779927
My matrix consists of 3000 cells and each cell contains a number from
0-9. I need to get the number of bits for this string in binary.
However, I cannot convert it to binary as the program will give me out
of range.
Thanks and your response will be much appreciated.
Sincerely,
azadi velat
kongp
Posted: Fri Dec 22, 2006 5:02 pm
Guest
Matlab (matrix Lab.)
kongp
Posted: Fri Dec 22, 2006 5:02 pm
Guest
Matlab (matrix Lab.) So read linear algebra.
Dave Martindale
Posted: Fri Dec 22, 2006 8:35 pm
Guest
"kal" <khaldoon2300@gmail.com> writes:

Quote:
My matrix consists of 3000 cells and each cell contains a number from
0-9. I need to get the number of bits for this string in binary.
However, I cannot convert it to binary as the program will give me out
of range.

You don't need a program for this, just your brain and perhaps a
calculator or set of math tables (or even a slide rule). It only
requires high-school math.

Hint: break the problem into several steps:
1. What is the largest number you can store in those 3000 cells?
2. How many binary bits does it take to store the number 1? 10? 100?
1000? What is the general formula for "the minimum number of bits
needed to store values from 0 to n"?
3. Apply the formula from #2 to the answer of #1.

Without using any calculating aids at all, I can predict that the answer
is going to be almost 10000 bits. For extra credit: how do I know that?

Dave
Martin Leese
Posted: Sat Dec 23, 2006 12:16 am
Guest
kal wrote:
....
Quote:
I have a decimal number stored in a matrix. For example,
Matrix subscripts: 1 2 3 5 6 7 8 9
10
Values: 8 9 8 7 7 9 9 2
7
So, the number is: 898779927
My matrix consists of 3000 cells and each cell contains a number from
0-9. I need to get the number of bits for this string in binary.
However, I cannot convert it to binary as the program will give me out
of range.

Is this a class assignment? If not, explain
why you want to do this.

--
Regards,
Martin Leese
E-mail: please@see.Web.for.e-mail.INVALID
Web: http://members.tripod.com/martin_leese/
 
Page 1 of 1       All times are GMT - 5 Hours
The time now is Thu Dec 04, 2008 10:35 pm