Dividing two arrays in Java

Page 1 of 1

1 Replies - 405 Views - Last Post: 11 July 2012 - 01:10 PM Rate Topic: -----

#1 mhunck   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 3
  • Joined: 10-July 12

Dividing two arrays in Java

Posted 11 July 2012 - 01:09 PM

I have created two arrays in the Java code I am writing in ImageJ.

  setRGBWeights(1,0,0); r=getProfile();
  setRGBWeights(0,1,0); g=getProfile();

Both r and g variables are then defined as arrays of length 219.
In the Debug window, the value of both r and g are array[219].

I then want to plot the ratio of the two arrays, but I can't figure out how to divide the two arrays by each other.
I tried this, but I keep getting an error when trying to plot rg because it is looking for an array.
  for (i=0; i<219; i++)

Thanks in advance for the help.

Is This A Good Question/Topic? 0
  • +

Replies To: Dividing two arrays in Java

#2 macosxnerd101   User is online

  • Games, Graphs, and Auctions
  • member icon

Reputation: 12300
  • View blog
  • Posts: 45,400
  • Joined: 27-December 08

Re: Dividing two arrays in Java

Posted 11 July 2012 - 01:10 PM

Please avoid duplicate posting. We also established that you aren't using Java, because in your other thread, you insist your code compiles, yet you try and use a function keyword, which does not exist in Java.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1