matrix - nested loop don't go inside each element c# -


here part of wrote:

    double[,] visualmatrix = new double[3, m_descriptor.visualword.length];      (int i=0; i<3; i++)     {         (int j=0; j<m_descriptor.length; j++)         {           visualmatrix[i, j] = (m_descriptor.visualword[j].tf) * (m_descriptor.visualword[j].idf);           system.diagnostics.debug.writeline(visualmatrix[i, j]);         }         console.writeline();     } 

what want visual matrix in case, fill visualmatrix[0,0] till visualmatrix[2,29] since m_descriptor.length 29. done fills first element of each i: visualmatrix[0,0],visualmatrix[1,0],visualmatrix[2,0].

as consider, have missed .visualword in statement. change j<m_descriptor.length j<m_descriptor.visualword.length

double[,] visualmatrix = new double[3, m_descriptor.visualword.length];  (int i=0; i<3; i++) {     (int j=0; j<m_descriptor.visualword.length; j++)     {       visualmatrix[i, j] = (m_descriptor.visualword[j].tf) * (m_descriptor.visualword[j].idf);       system.diagnostics.debug.writeline(visualmatrix[i, j]);     }     console.writeline(); } 

Comments

Popular posts from this blog

java - Run spring boot application error: Cannot instantiate interface org.springframework.context.ApplicationListener -

reactjs - React router and this.props.children - how to pass state to this.props.children -

Excel VBA "Microsoft Windows Common Controls 6.0 (SP6)" Location Changes -