0
$\begingroup$

I am trying to sum the all numbers in each row of matrix and divide them by the max value of the row. My output has the following terms that has not been computed yet (example, the second element in the list)

{0.274667, 6.70453 (0.0361427 + 0.00173611 ""), 1., 0.497337, 0.329659, 0.330391, 0.532257, 0.385172, 0.0139678, 0.403161, 0.0507919, 0.520617, 0.385253,    0.0902533, 6.70453 (0.0629163 + 0.0014881 ""), 0.478209,6.70453 (0.0268595 + 0.00189394 ""), 0.486349, 0., 6.70453 (0.0399427 + 0.00173611 ""), 0

when I copied the uncomputed term and pasted in a new notebook, it looked like this

6.70452801227936` (0.03614267676767676` + 0.001736111111111111` "")

Can anyone tell me what is the special character after the number ' ` 'doing here ?

$\endgroup$
  • $\begingroup$ Re: backtick, see this. For "sum the all numbers in each row of matrix and divide them by the max value of the row": Total[#]/Max[#] & /@ matrix. $\endgroup$ – J. M. will be back soon Jul 2 '16 at 3:20
  • 2
    $\begingroup$ And it looks like there are hidden Strings (i.e. "") in your code somewhere. $\endgroup$ – march Jul 2 '16 at 3:48
  • $\begingroup$ @J.M.: Thank you for that, I am going to recode my program $\endgroup$ – kpnane Jul 2 '16 at 4:15
  • $\begingroup$ @march: how do I remove the hidden strings? the data is from csv file $\endgroup$ – kpnane Jul 2 '16 at 4:17
  • 1
    $\begingroup$ expression /. ""->Sequence[] turns all the "" in expression into nothing. $\endgroup$ – Bill Jul 2 '16 at 4:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.