Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

A question about notation

A question about notation

A question about notation

Hi guys

I am trying to understand a code from a book (I write few lines).

f(1, :) = Fcn(x, y)
DO i=2, s
w = y + h*MATMUL(a(i, 1:i-1), f(1:i-1, :))
f(i, :) = Fcn(x + c(i)*k, w)

It is clear for me the meaning of a(i, 1:i-1) but i did not find anything for f(1, :), that is, when you have only :

Thanks in advance

RE: A question about notation

The syntax is basically


where the items in [] are optional. So if f has been declared as f(-10:10,-9:9) it means f(1,-9:9)

You can do some pretty complicated stuff with this notation that you can't in any other language. For instance, you could assign all the odd members of an array to all the even elements of another array. It is basically an implied loop


integer::evens(20), odds(19)
evens(2::2) = odds(1::2) 

RE: A question about notation

Thank you very much xwb =)

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close