0

Hi, I'm having problems with this assignment. First off a Markov matrix is simply a 3x3 matrix that when the rows are added always equal 1. I am suppose to write a program to prompt the user to enter a matrix and then it is determined wether or not that matrix is a markov matrix.

This is where im at:

import java.util.*;  
public class MarkovMatrix
{
    public static void main (String args [])
    {
        int [][] matrix = new int [3][3];
        Scanner input = new Scanner (System.in);
        System.out.println("Enter" + matrix.length + "rows and " + matrix[0].length + "columns");
        for (int i=0 ; i < matrix.length; i++){
            for(int j=0 ; j < matrix[i].length; i++) 
            {
                matrix[i][j] = input.nextInt();
            }

        }


    }

   public static boolean isMarkovMatrix(double [][]m)
   {
      for() 
   }
}

any help is mucho appreciated

1
Contributor
1
Reply
2
Views
4 Years
Discussion Span
Last Post by Hharla
0

solved it, but still lemme know what yall think. also some errors in the code above but i figured that out

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.