Fig2plotly available for MATLAB's fmesh functionality

MATLAB can also plot 3-D mesh by simply typing a mathematical expression, z = f(x,y). We can access this through MATLAB’s fmesh function.

Now, depending on the mathematical expression we pass as the input argument in fmesh , MATLAB will show us really interesting 3-D mesh. Personally, I am very curious and excited to know what this would be like with fig2plotly :boom: :male_detective:

To address the fmesh functionality, you just need to invoke fig2plotly at the end of your MATLAB code and set the optional 'offline' parameter to true or false , depending on the offline/online mode you want to use. Let’s see the following example

r = @(s,t) 2 + sin(7.*s + 5.*t);
x = @(s,t) r(s,t).*cos(s).*sin(t);
y = @(s,t) r(s,t).*sin(s).*sin(t);
z = @(s,t) r(s,t).*cos(t);
fmesh(x,y,z,[0 2*pi 0 pi]);

fig2plotly(gcf, 'offline', false);    % online mode

After executing the above code, the charts generated by MATLAB and fig2plotly are shown in the following image.

As we can see, on the left of the screenshot above appears the surface plotted by MATLAB, but on the right we delight with Plotly! It is really beautiful! :star_struck:

Following this link, you will be able to experience this directly in Chart-Studio.

Here you can find more examples using fmesh , which you can recreate using fig2plotly . Please try to do it! I did it and was fascinated again! :laughing: I attach below screenshots with my results