question

Narasimha-5266 avatar image
0 Votes"
Narasimha-5266 asked RichMatheisen-8856 answered

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

Input should be given by user

windows-server-powershell
· 5
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi,

What do you mean by "det"? Could you explain it in detail?

0 Votes 0 ·

Det means determinant and we have to give values at run time

0 Votes 0 ·

I'm still not sure what you mean by "determinant in an array". Do you store a square matrix in an array and want to get the determinant of that?

0 Votes 0 ·

Yeah it's correct

0 Votes 0 ·
Show more comments
RichMatheisen-8856 avatar image
0 Votes"
RichMatheisen-8856 answered

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
 }
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

RichMatheisen-8856 avatar image
0 Votes"
RichMatheisen-8856 answered

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.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.