How to find det in an array for any range array at run time by using powershell script

Narasimha 61 Reputation points
2021-07-13T10:27:58.97+00:00

Input should be given by user

Windows for business Windows Server User experience PowerShell
{count} votes

Accepted answer
  1. Rich Matheisen 47,901 Reputation points
    2021-07-13T15:05:47.967+00:00

    You can use the "Read-Host" cmdlet to solicit input from the user.

    I'm not sure what you mean by "det" though.

    Maybe this is what you're looking for?

    $values = 1,2,3,4,5
    
    $x = Read-Host "Give me a number: "
    if ($values -contains $x){
        Write-Host "Found it!" -ForegroundColor Green
    }
    else{
        Write-Host "Didn't find $x" -ForegroundColor Yellow
    }
    
    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Rich Matheisen 47,901 Reputation points
    2021-07-16T19:47:42.057+00:00

    This may be what you're looking for:

    Determinant_and_permanent

    it (unfortunately) uses recursion, so you may run into difficulties with very large matrices. There are other ways of computing the determinant that don't use recursion if you're willing to code them yourself.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.