Thursday, July 30, 2009

Vector Addition in MatLab...?

I'm trying to write a vector addition program in MatLab and can't figure out how to do it. This is the first time I am using MatLab to do anything and it is much different than the C++ programming I am used to. If someone could show me a completed vector addition which I could use as a template I would be very appreciative.

Vector Addition in MatLab...?
MatLab is way easier than c++. You are probably trying to make this harder than it is. If you have defined vector a =[ 1 2 3] and vector b=[2 3 4], than just type a+b to add them. Yes, it's really that simple!





MatLab is short for Matrix Laboratory, and it is very easy to manipulate matrices or vectors in MatLab, once you learn the syntax.
Reply:You Can Do it By treanting the vector one dimentional matrix.


And adding the simpley by + .varibles are defaultly matix in Matlab

cyclamen

No comments:

Post a Comment