As per my understanding, you want guidance to plot a “polarplot” function that can be tracked in real-time using a “MATLAB function block” inside Simulink. One possible solution is to use the “polarplot” function in MATLAB.
I have provided an example file “sample_polarplot_realtime_final.slx.” Execute this file and see plotting of the “polar axes” in real time.
Please refer to the following description for further understanding of the attached Simulink file:
The Simulink Model has two input blocks. “theta” is input for angle values and “rho” for the radius. I have provided such inputs to plot a circle.
The “updatePolarPlot” MATLAB Function Block contains the logic behind plotting the figure in real time.
function updatePolarPlot(theta, rho)
if isempty(h) || isempty(ax)
polarplot(ax, theta(1:i), rho(1:i));
title('Real-Time Polar Plot');
After executing, you will be able to see the figure plotting a complete circle in real time.
For further readings about the various functions and tools I have used, refer to the links below:
I hope this helps you get started!