Matlab fopen rest the arduino?

Hey guys,
I use the following code in matlab:

s = serial('COM3');
disp(['s input buffer size ', num2str(s.InputBufferSize)]);
set(s,'Terminator','LF'); % define the terminator for println
set(s,'Databits',8);
set(s,'Stopbits',1);
set(s,'Parity','none');
set(s, 'BaudRate', 9600);
fopen(s);

and it seems that after the fopen the arduino resets. Because the init is called again. Why does it happen?

Which Arduino are you using ? Most Arduinos reset when the serial port is initialised. That is why the program on the Arduino restarts when you open the Serial monitor.

Arduino Uno. When i think about it, i saw that it reset on serial monitor as well. So it should happen. Thanks for your answer.

Arduino Uno R3 R3 or R2 ? Mynick