Skip to content
Advertisement

Java Markov chain

I created a program to calculate Markov chain and I have some issue anyone can help me why after the application prints out asking the user for value for the row and column till row 3 it stops and it didn’t ask the user for value P. It straight print “Markov Chain Invalid Row not Equal to 1” and end. Anyone can help me to fix this, please. Thank u in advance.

JavaScript

Advertisement

Answer

You have problem with this code:

JavaScript

This is not matrix 3×3 but 1×9

Change code to this:

JavaScript
User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement