Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / May 2006

Tip: Looking for answers? Try searching our database.

Counting number of zeros in an array

Thread view: 
Nish - 18 May 2006 17:12 GMT
Hi all,
        i want to find a mat lab algorithm in order to count number of
zeros in any given matrix

for eg

Given Matrix A:

1 0 1 1
0 0 1 1
2 2 3 3
2 2 4 0

the required  code should give me the no of zeros as 4

Please post your views on the topic.

thanks

Nishant

nishantxl@rediffmail.com
Oliver Wong - 18 May 2006 17:14 GMT
> Hi all,
>         i want to find a mat lab algorithm in order to count number of
[quoted text clipped - 12 lines]
>
> Please post your views on the topic.

   My view is that Matlab isn't Java, and so this sounds like it's off
topic here.

   - Oliver
Rhino - 18 May 2006 17:48 GMT
> Hi all,
>         i want to find a mat lab algorithm in order to count number of
[quoted text clipped - 12 lines]
>
> Please post your views on the topic.

This isn't a matter of "views" (opinions), it's a matter of knowing enough
basic Java to count the zero values in an array. Are you saying that you
don't know how to do this? That sounds like a homework question, in which
case it is better asked at comp.lang.java.help. When you post there, please
provide code so that we know what datatype the array is, how, many
dimensions it has, and how big each dimension can be. Or is it a collection?
Or a collection of arrays? Or an array of collections?

--
Rhino
Patricia Shanahan - 18 May 2006 20:22 GMT
> Hi all,
>          i want to find a mat lab algorithm in order to count number of
[quoted text clipped - 18 lines]
>
> nishantxl@rediffmail.com

My view of the topic is that it would be much more appropriate for a
Matlab group than here. However, even in a Matlab newsgroup it might be
considered to look a bit too much like homework to be a really
appropriate question.

I have written enough Matlab to know that a good Matlab solution is
unlikely to have much resemblance to any Java solution. Many
participants in this newsgroup will not even know that much.

Patricia


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.