Turn on thread page Beta

Matlab: Product of a column vector using a for loop watch

    • Thread Starter
    Offline

    5
    ReputationRep:
    Using matlab how could you find the product of the column vector Z=[1;2;3;4;5] to give 120 as the answer using a for loop?
    • Very Important Poster
    Offline

    21
    ReputationRep:
    Very Important Poster
    (Original post by jlf98)
    Using matlab how could you find the product of the column vector Z=[1;2;3;4;5] to give 120 as the answer using a for loop?
    How do you think you can do it? First solve the problem on paper, then worry about coding it. By solve on paper I mean very similar to pseudo code, but no need to start off with pseudo code. Helps to end with it but not necessary.


    Any ideas on how to start it?

    Hint: may want to extract the elements of the column in a particular way and use them..
 
 
 
Reply
Submit reply
Turn on thread page Beta
Updated: October 25, 2017
The home of Results and Clearing

2,444

people online now

1,567,000

students helped last year

University open days

  1. Keele University
    General Open Day Undergraduate
    Sun, 19 Aug '18
  2. University of Melbourne
    Open Day Undergraduate
    Sun, 19 Aug '18
  3. Sheffield Hallam University
    City Campus Undergraduate
    Tue, 21 Aug '18
Poll
A-level students - how do you feel about your results?
Useful resources

Make your revision easier

Maths

Maths Forum posting guidelines

Not sure where to post? Read the updated guidelines here

Equations

How to use LaTex

Writing equations the easy way

Student revising

Study habits of A* students

Top tips from students who have already aced their exams

Study Planner

Create your own Study Planner

Never miss a deadline again

Polling station sign

Thinking about a maths degree?

Chat with other maths applicants

Can you help? Study help unanswered threads

Groups associated with this forum:

View associated groups

The Student Room, Get Revising and Marked by Teachers are trading names of The Student Room Group Ltd.

Register Number: 04666380 (England and Wales), VAT No. 806 8067 22 Registered Office: International House, Queens Road, Brighton, BN1 3XE

Write a reply...
Reply
Hide
Reputation gems: You get these gems as you gain rep from other members for making good contributions and giving helpful advice.