You are Here: Home >< Maths

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

1. 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?
2. (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..

### Related university courses

TSR Support Team

We have a brilliant team of more than 60 Support Team members looking after discussions on The Student Room, helping to make it a fun, safe and useful place to hang out.

This forum is supported by:
Updated: October 25, 2017
The home of Results and Clearing

### 2,444

people online now

### 1,567,000

students helped last year
Today on TSR

### University open days

1. Keele University
Sun, 19 Aug '18
2. University of Melbourne
Sun, 19 Aug '18
3. Sheffield Hallam University
Tue, 21 Aug '18
Poll
Useful resources

### Maths Forum posting guidelines

Not sure where to post? Read the updated guidelines here

### How to use LaTex

Writing equations the easy way

### Study habits of A* students

Top tips from students who have already aced their exams