[Solved] how to write transfer function is s-plane of single bridge rectifier?

Yaakov Asks: how to write transfer function is s-plane of single bridge rectifier?
I am trying to write a transfer function of single phase rectifier so I can use in matlab to look for phase margin and gain margin: here an example I took from Circuitlab
enter image description here

I could write the transfer function in positve sinewave and negative sinewave but together I am not sure how to proceed.

circuit during positive sinewave:
enter image description here

circuit during negative sinewave:


enter image description here

I am bit sceptical if the this method is correct ?

Ten-tools.com may not be responsible for the answers or solutions given to any question asked by the users. All Answers or responses are user generated answers and we do not have proof of its validity or correctness. Please vote for the answer that helped you in order to help others find out which is the most helpful answer. Questions labeled as solved may be solved or may not be solved depending on the type of question and the date posted for some posts may be scheduled to be deleted periodically. Do not hesitate to share your response here to help other visitors like you. Thank you, Ten-tools.