Hello !(adsbygoogle = window.adsbygoogle || []).push({});

I was wondering if somebody could possibly help me.

I am looking to create a vector of variables. [v1 v2 v3 v4 etc...]

I dont want to assign the value to any of them.

Then I want to multiply this vector by another, so the final answer will be:

z=3v1 + 4v2 + 6v3 etc....

However, the amount of v1 v2 v3 can change each time the user runs the function. So i need the number of v's to be the number of rows in my other vector.

I hope this is clear, and that somebody is able to help.

Thank you !

**Physics Forums | Science Articles, Homework Help, Discussion**

Dismiss Notice

Join Physics Forums Today!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

# MATLAB vector variables

**Physics Forums | Science Articles, Homework Help, Discussion**