Combination and surface plot

2 views (last 30 days)
Damilola
Damilola on 14 Apr 2015
Answered: pfb on 14 Apr 2015
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 Comments
John D'Errico
John D'Errico on 14 Apr 2015
Edited: John D'Errico on 14 Apr 2015
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 on 14 Apr 2015
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

Sign in to comment.

Answers (1)

pfb
pfb on 14 Apr 2015
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...

Categories

Find more on Animation in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!