MATLAB: How to use fprintf

displayfprintfprint

For example if I have seven variable x=[a;b;c;d;e;f;g]
and I have y=[1;2;3;4;5;6;7]
how can I use fprintf to assign each number from y to its variable in x
I'm so confused, please help!

Best Answer

fprintf('a= %g; b= %g; c= %g ',y(1),y(2),y(3)) % extend it until y(6)