Smart questions
Smart answers
Smart people
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Member Login

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips now!
  • 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!

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

LINK TO THIS FORUM!

Add Stickiness To Your Site By Linking To This Professionally Managed Technical Forum.
Just copy and paste the
code below into your site.

Partner With Us!

"Best Of Breed" Forums Add Stickiness To Your Site
Partner Button
(Download This Button Today!)

Feedback

"...Where have you been all my life! I found the answer I needed in seconds..."

Geography

Where in the world do Eng-Tips members come from?
kinzin (Structural)
29 Mar 12 18:34
I am trying to write a loop in which a formula

(such as: A = b / c ),

in which b and c are both nx1-sized matrices, returns a result by applying the formula one index at a time

(result should be: A = [b1/c1   b2/c2])


instead of performing the operation on the whole matrix.

Thanks.
GregLocock (Automotive)
29 Mar 12 20:08
try

A=b./c

 

Cheers

Greg Locock


New here? Try reading these, they might help FAQ731-376: Eng-Tips.com Forum Policies  http://eng-tips.com/market.cfm?

Helpful Member!  GregLocock (Automotive)
29 Mar 12 20:33
sorry, wrong program

The horrible way is

ii:1;n

A[ii:b[ii /c[ii

but I'm sure there is an element by element command

Cheers

Greg Locock


New here? Try reading these, they might help FAQ731-376: Eng-Tips.com Forum Policies  http://eng-tips.com/market.cfm?

jghrist (Electrical)
29 Mar 12 22:46
Use the vectorize operator (Ctrl+-) on the quotient A/B.   
kinzin (Structural)
30 Mar 12 9:26
@GregLocock,
Thanks so much!
 

Reply To This Thread

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

Click Here to join Eng-Tips and talk with other members!

Back To Forum

Close Box

Join Eng-Tips® Today!

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

Here's Why Members Love Eng-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close