How to add two different surface curves in a single plot?

Technical Source
2 min readMar 22, 2024

--

I have a bell shaped curve in 3D (generated from curve fitter app) as shown in the figures.

Both are the same curve the only difference is one is without point data and the other has point data.

Problem: I want to add another surface to the same plot for the same data which is at z=1 and parallel to x- and y-axis. Also, is it possible to find the values of major and minor axes of the ellipse formed from the intersection of both the surfaces. Or in other words, the values between the intersection of x and z values of both the curves and the y and z values of both the curves.

I hope I am able to express myself clearly.

NOTE:-

Matlabsolutions.com provide latest MatLab Homework Help,MatLab Assignment Help , Finance Assignment Help for students, engineers and researchers in Multiple Branches like ECE, EEE, CSE, Mechanical, Civil with 100% output.Matlab Code for B.E, B.Tech,M.E,M.Tech, Ph.D. Scholars with 100% privacy guaranteed. Get MATLAB projects with source code for your learning and research.

Try this —

‘I want to add another surface to the same plot for the same data which is at z=1 and parallel to x- and y-axis.’

[X,Y] = ndgrid(-3:0.1:3);
f = @(x,y) exp(-(x.^2+(2*y).^2)*0.5);
Z = f(X,Y)*3;
figure
surf(X, Y, Z)
hold on
surf(X, Y, ones(size(Z)), 'FaceColor','r', 'FaceAlpha',0.5, 'EdgeColor','none')
hold off
colormap(turbo)

‘Also, is it possible to find the values of major and

SEE COMPLETE ANSWER CLICK THE LINK

--

--

Technical Source
Technical Source

Written by Technical Source

Simple! That is me, a simple person. I am passionate about knowledge and reading. That’s why I have decided to write and share a bit of my life and thoughts to.

No responses yet