Rocksolid Light

Welcome to RetroBBS

mail  files  register  newsreader  groups  login

Message-ID:  

Yes I have a Machintosh, please don't scream at me. -- Larry Blumette on linux-kernel


devel / comp.lang.fortran / Greetings!

SubjectAuthor
* Greetings!Anuj Chaulagain
+- Re: Greetings!FortranFan
`- Re: Greetings!Thomas Koenig

1
Greetings!

<a2169f12-1eff-4230-bc8b-b547a5d1e245n@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=3433&group=comp.lang.fortran#3433

  copy link   Newsgroups: comp.lang.fortran
X-Received: by 2002:a05:622a:180a:b0:3f9:d70f:ff77 with SMTP id t10-20020a05622a180a00b003f9d70fff77mr2333994qtc.11.1686544315830;
Sun, 11 Jun 2023 21:31:55 -0700 (PDT)
X-Received: by 2002:ac8:5905:0:b0:3f0:abe7:24a7 with SMTP id
5-20020ac85905000000b003f0abe724a7mr2621565qty.6.1686544315657; Sun, 11 Jun
2023 21:31:55 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!peer03.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.fortran
Date: Sun, 11 Jun 2023 21:31:55 -0700 (PDT)
Injection-Info: google-groups.googlegroups.com; posting-host=110.44.123.140; posting-account=koBeEwoAAAAPlUn1BujNWOna2KEEVpqz
NNTP-Posting-Host: 110.44.123.140
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <a2169f12-1eff-4230-bc8b-b547a5d1e245n@googlegroups.com>
Subject: Greetings!
From: anujchaulagain.remithydro@gmail.com (Anuj Chaulagain)
Injection-Date: Mon, 12 Jun 2023 04:31:55 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 1729
 by: Anuj Chaulagain - Mon, 12 Jun 2023 04:31 UTC

Hello everyone !
I have started learning FORTRAN using CODEBLOCKS IDE.
I learnt how to multiply two matrices (A and B) using do loops.
Then I learnt how to multiply A X B X A X B (and so on) using subroutines and attributes.

Right now I am learning to make a matrix triangular (upper and lower) and then an identity matrix and then an inverse.
After making multiple attempts I learnt how to make the matrix go
1 a12 a13
0 a22 a23
0 a32 a33

However, I am struggling to make further progress.
I used very simple logic:
R1=R1/a11
then used i and j loops to make the other elements of first column 0.

Can someone please suggest what i should do next?
I am struggling to understand loop within nested loops.
Kindly help !

Re: Greetings!

<182a31af-fc3e-45e2-9825-aa5e06609ce1n@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=3434&group=comp.lang.fortran#3434

  copy link   Newsgroups: comp.lang.fortran
X-Received: by 2002:ae9:e8c9:0:b0:75f:5b1b:5cba with SMTP id a192-20020ae9e8c9000000b0075f5b1b5cbamr1071424qkg.6.1686617740746;
Mon, 12 Jun 2023 17:55:40 -0700 (PDT)
X-Received: by 2002:ac8:5c4e:0:b0:3f8:20a:1c73 with SMTP id
j14-20020ac85c4e000000b003f8020a1c73mr3449473qtj.5.1686617740556; Mon, 12 Jun
2023 17:55:40 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!peer01.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.fortran
Date: Mon, 12 Jun 2023 17:55:40 -0700 (PDT)
In-Reply-To: <a2169f12-1eff-4230-bc8b-b547a5d1e245n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=108.52.103.144; posting-account=ZZXq9AoAAAAQEcA7zKAGm0UFQh4gMBv7
NNTP-Posting-Host: 108.52.103.144
References: <a2169f12-1eff-4230-bc8b-b547a5d1e245n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <182a31af-fc3e-45e2-9825-aa5e06609ce1n@googlegroups.com>
Subject: Re: Greetings!
From: parekhvs@gmail.com (FortranFan)
Injection-Date: Tue, 13 Jun 2023 00:55:40 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Received-Bytes: 1700
 by: FortranFan - Tue, 13 Jun 2023 00:55 UTC

On Monday, June 12, 2023 at 12:31:57 AM UTC-4, Anuj Chaulagain wrote:

> ..
> Can someone please suggest what i should do next?
> I am struggling to understand loop within nested loops.
> Kindly help !

@Anuj Chaulagain,

Did you try the learning resources for Fortran at the link below?
https://fortran-lang.org/learn/

Try posting your code at the Fortran Discourse site which allows syntax highlighting for much easier reading and many readers can guide you with suggestions:
https://fortran-lang.discourse.group/

Re: Greetings!

<u69dnm$2vvk9$1@newsreader4.netcologne.de>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=3435&group=comp.lang.fortran#3435

  copy link   Newsgroups: comp.lang.fortran
Path: i2pn2.org!i2pn.org!usenet.goja.nl.eu.org!3.eu.feeder.erje.net!feeder.erje.net!newsreader4.netcologne.de!news.netcologne.de!.POSTED.2001-4dd7-2d6e-0-7285-c2ff-fe6c-992d.ipv6dyn.netcologne.de!not-for-mail
From: tkoenig@netcologne.de (Thomas Koenig)
Newsgroups: comp.lang.fortran
Subject: Re: Greetings!
Date: Tue, 13 Jun 2023 09:43:18 -0000 (UTC)
Organization: news.netcologne.de
Distribution: world
Message-ID: <u69dnm$2vvk9$1@newsreader4.netcologne.de>
References: <a2169f12-1eff-4230-bc8b-b547a5d1e245n@googlegroups.com>
Injection-Date: Tue, 13 Jun 2023 09:43:18 -0000 (UTC)
Injection-Info: newsreader4.netcologne.de; posting-host="2001-4dd7-2d6e-0-7285-c2ff-fe6c-992d.ipv6dyn.netcologne.de:2001:4dd7:2d6e:0:7285:c2ff:fe6c:992d";
logging-data="3145353"; mail-complaints-to="abuse@netcologne.de"
User-Agent: slrn/1.0.3 (Linux)
 by: Thomas Koenig - Tue, 13 Jun 2023 09:43 UTC

Anuj Chaulagain <anujchaulagain.remithydro@gmail.com> schrieb:
> Hello everyone !
> I have started learning FORTRAN using CODEBLOCKS IDE.
> I learnt how to multiply two matrices (A and B) using do loops.
> Then I learnt how to multiply A X B X A X B (and so on) using subroutines and attributes.

Fortran also has an intrinsic function, MATMUL, to do this.

> Right now I am learning to make a matrix triangular (upper and lower) and then an identity matrix and then an inverse.
> After making multiple attempts I learnt how to make the matrix go
> 1 a12 a13
> 0 a22 a23
> 0 a32 a33
>
> However, I am struggling to make further progress.

You may want to read up on Gaussian elimination,
https://en.wikipedia.org/wiki/Gaussian_elimination . If you Google
"Gaussian Elimination Fortran", there are also multiple hits,
among them from Numerical Recipes, which has sample code and
explanations.

1
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor