accelerometer/magnetometer

can i get all three angle ( yaw,pitch,roll) by using accelerometer/magnetometer alone ?
thank you

It depends on what you want it to do. Technically, you can do it with just an accelerometer. Or just a gyro if you wanted. Generally, the best way to go for an accurate yaw/pitch/roll measurement you would want all 3, accel, gyro, & mag. Without a magnetmometer, your measurements will be subject to yaw drift. Without a gyro, your yaw/pitch/roll measurements will not be very accurate, especially when the sensor is subjected to bumpiness. Your yaw/pitch/roll readings would only be valid if the accelerometer were rotating smoothly and slowly, or steady-state positioning.

do you mean if i rotate accelerometer slowly and smoothly, i can get 3 angles ?(forget about accuracy)

Your angles depend on the accelerometer being able to determine which way is up ( or down ) from the earth's gravity.

If you device is accelerating in any direction, the effect of gravity cannot be readily distinguished, and the result will
be inaccurate.

Accelerometer will be sufficient if you device is stationary or moving with a constant velocity in some direction and is
not subject to significant vibration.