MathGroup Archive 2001

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Fw: FORTRAN style, not OK?

  • To: mathgroup at
  • Subject: [mg26877] Re: Fw: FORTRAN style, not OK?
  • From: Albert Retey <albert.retey at>
  • Date: Fri, 26 Jan 2001 01:27:23 -0500 (EST)
  • Organization: Visual Analysis
  • References: <94m96g$>
  • Sender: owner-wri-mathgroup at

"Toshiyuki (Toshi) Meshii" wrote:
> Hello,
> I found out a case in which I cannot directly use FORTRAN statement in
> Mathematica programming.
> Here is the case good in FORTRAN.
> v=v-c
> However in Mathematica, it seems that I have to use a trick like this.
> temp=v;
> v=temp-c
> Is there more smart way for doing the above?
> Please let me know.
> ___________________________________
> The final goal for me is to do the following.
> Do[
>  Do[
>       v[i][j][k] = v[i][j][k] - va[j]
>       ,{j, 3}]
>     ,{k, 100}];
> -Toshi

One more note: before trying to transfer FORTRAN code to Mathematica you
understand the difference between v[i][j], v[i,j] and v[[i,j]], since
the last form might represent much more what you expect a FORTRAN
"array" to be. On the other hand, using Mathematica lists is still quite
different from FORTRAN arrays, for example when it comes to
"initialization" or "declaration" issues. You will have to create a list
with the desired number of entries before you can reference to these

Probably you should really read some more literature on Mathematica,
that will also protect you from harsh dissappointement about execution

Visual Analysis AG       Internet:
Neumarkter Str. 87       Telefon: 089 / 431 981 36        
D-81673 Muenchen         Telefax: 089 / 431 981 1

  • Prev by Date: Re: triangles in circles
  • Next by Date: Re: Overriding Power
  • Previous by thread: Re: Fw: FORTRAN style, not OK?
  • Next by thread: Re: FORTRAN style, not OK?