Ask your own question, for FREE!
Mathematics 10 Online
OpenStudy (anonymous):

could someone please help me with my matlab code

OpenStudy (usukidoll):

I feel your pain. I had to do matlab last semester T_T oh oh! I know who can help >:D @dan815

OpenStudy (anonymous):

ok thanks! @UsukiDoll

OpenStudy (anonymous):

could u help me please @dan815

OpenStudy (anonymous):

OpenStudy (ybarrap):

What's the problem? Syntax or logic? You are trying to pick out statistics from you reduced matrix - are you not getting the values you want?

OpenStudy (ybarrap):

In line 4 of your code -- what does pivot=[pA] do? There is not matrix pA defined

OpenStudy (anonymous):

no yes my code is fine and works well i just have to do something else with it and i dont knw how to do it

OpenStudy (anonymous):

let me show you

OpenStudy (ybarrap):

ok

OpenStudy (anonymous):

OpenStudy (anonymous):

my original code that works does not have pivot=[pA] nor xp=zeros;

OpenStudy (anonymous):

it just has pivot=[ ]

OpenStudy (ybarrap):

So initializing pivot makes sense like that but I don't see where you are using xp in your code. I would expect pivot=[pA] to fail.

OpenStudy (anonymous):

this is what my answer is supposed to be

OpenStudy (anonymous):

so then how to i initialize xp to be the zero column vector ?

OpenStudy (ybarrap):

zeros(m,n) should do it because the particular solutions won't span more than n columns or m rows

OpenStudy (anonymous):

oh ok thanks

OpenStudy (ybarrap):

Is that it?

OpenStudy (anonymous):

yes the rest seems pretty straight forward right?

OpenStudy (ybarrap):

It does if you understand pivots, free variables, particular solutions, the null space, rank etc, and of course Matlab

OpenStudy (anonymous):

ok its just that im new to this and struggle quite a bit

OpenStudy (ybarrap):

Have you taken a Linear Algebra class where you studied column spaces and free variables, where n > m ?

OpenStudy (anonymous):

yes i did

OpenStudy (ybarrap):

then you have a good leg up then - sounds like a good exercise - let me know if I can help any -- I loved Matlab -- used it for my thesis in EE a while ago

OpenStudy (ybarrap):

I use Octave now -- open source Matlab

OpenStudy (anonymous):

oh ok i will thanks a lot for your help!!

OpenStudy (ybarrap):

You're welcome. Good luck my friend!

OpenStudy (anonymous):

loved matlab. But i moved on to c++ tho. SOrry :(

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!