MATLAB Answers

0

Matlab program to draw cubes.

Asked by Suman Maity on 18 Jan 2019
Latest activity Commented on by Luna
on 18 Jan 2019
In a presentation I want to draw three cubes with different side. Only sides of the cube will be visible. Can any one help me?

  0 Comments

Sign in to comment.

Tags

2 Answers

Luna
Answer by Luna
on 18 Jan 2019
Edited by Luna
on 18 Jan 2019

Have you ever checked the file exchange? This link might help you: plotcube
Try to put alpha variable 1, and it only shows the sides of the cube as it is given in the example:
hold on;
plotcube([5 5 5],[2 2 2],1,[1 0 0]);
plotcube([5 5 5],[10 10 10],1,[0 1 0]);
plotcube([5 5 5],[20 20 20],1,[0 0 1]);

  1 Comment

Luna
on 18 Jan 2019
Please move your comments to your comments section.
You should download the plotcube function above link I mentioned in the answer. from the file exchange and save it first to call that function from your command window.
LINK: plotcube

Sign in to comment.


Answer by Suman Maity on 18 Jan 2019

sir, above program did not run correctly. Command window gives the follwing massage
Undefined function 'plotcube' for input arguments of type 'double'.
Error in Untitled2 (line 2)
plotcube([5 5 5],[2 2 2],1,[1 0 0]);
sir kindly send me the full program.
I want to draw four cubes of radius 5,7, 8 ,10 respectively.

  0 Comments

Sign in to comment.