필터 지우기
필터 지우기

Combination and surface plot

조회 수: 2 (최근 30일)
Damilola
Damilola 2015년 4월 14일
답변: pfb 2015년 4월 14일
Please I need help on code for getting combination of the attached energy use schedule, each schedule has an equivalent energy cost and consumption and the practicality of each schedule ranges from 1 to 10, i.e. each schedule could have a practicality of 1, 2, 3, ...,10. I want to use the results to then obtain a surface plot that has Cost, consumption and practicality on each the axes. I will be glad if someone can help me out or lead me on how to go about writing a code for this. Thanks
  댓글 수: 3
John D'Errico
John D'Errico 2015년 4월 14일
편집: John D'Errico 2015년 4월 14일
The data that you give in that worksheet has 6 sets of numbers, for 6 possible schedules. No practicality is even shown.
So the answer is, given the information you have provided, no such plot can be generated. Magic only works for Harry Potter.
Even if you did improve the data, so that you had actually told us the practicality for each such schedule, you would still almost certainly not be able to generate a complete surface. At least, any such surface would be a terribly poor guess. Your data is simply inadequate to generate a surface. You have 6 data points that are not at all well scattered. What did I say about magic? It still won't work.
Damilola
Damilola 2015년 4월 14일
Thanks for your comments, an example of what I need to plot is cost = [0.056;0.0399;0.0398;0.0334;0.052;0.0502] consumption = [0.6111;0.6111;0.6181;0.5451;0.5475;0.611] practicality = [1;6;7;9;5;4]
Thanks once again

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

답변 (1개)

pfb
pfb 2015년 4월 14일
You could try "trisurf". But I agree with John d'Errico that your have too few data.
tri=delaunay(cost,consumption);
trisurf(tri,cost,consumption,practicality);
You actually get a surface...

카테고리

Help CenterFile Exchange에서 Animation에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by