How do I plot the surface so its connecting the points rather that passing though them? (3D Plot)

조회 수: 1 (최근 30일)
Hi there,
Im relatively new to Matlab so please bear in mind.
I want my plot (left image) too look similar to the reference plot (right image).
I have my data in an excel file and i have tried a 3D plot to replicate this. I've used the code help guidance to obtain the following image on the left however as you can see the surface isnt connecting the dots like the reference image has. In which case how do i do this? Any help is appreciated.
My code is as follows:
clc
clear all
dataset1 = xlsread('Optimum Parameters.xlsx','3D Plot Data','D5:F200');
rin = dataset1 (:,1);
Thick = dataset1 (:,2);
Temp = dataset1 (:,3);
figure
sf = fit([Thick,rin],Temp,'poly55');
plot(sf,[Thick,rin],Temp)
xlabel('Thickness, mm')
ylabel('r_i_n, mm')
zlabel('Temperature increase, °C')
Thank you
  댓글 수: 2
Ameer Hamza
Ameer Hamza 2020년 4월 22일
Can you share the data? Also, are you sure that the surface on the right is also made using poly55?
Harry Cornell
Harry Cornell 2020년 4월 22일
Hi Ameer,
Thank you for your reply. Im not sure how that plot was made. Im not even sure if I am meant to use the ploy function, it is just what I saw in one of the help files. So I could be completely wrong.
The data is relatively long but here it is. I have attached the excel file.

댓글을 달려면 로그인하십시오.

채택된 답변

Ameer Hamza
Ameer Hamza 2020년 4월 22일
Without knowing the equation of the surface, it is quite difficult to recreate the result in the image. For example, you can try cubicinterp. It fits all the points, but still, it does not looks the same.
clc
clear all
dataset1 = xlsread('Optimum Parameters.xlsx','3D Plot Data','D5:F200');
rin = dataset1 (:,1);
Thick = dataset1 (:,2);
Temp = dataset1 (:,3);
figure
sf = fit([Thick,rin],Temp,'cubicinterp');
plot(sf,[Thick,rin],Temp)
xlabel('Thickness, mm')
ylabel('r_i_n, mm')
zlabel('Temperature increase, °C')
See if the equation of that surface is mentioned in that book.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Creating, Deleting, and Querying Graphics Objects에 대해 자세히 알아보기

태그

제품


릴리스

R2017a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by