figure, hold on, plot3(rand(1,3),rand(1,3),rand(1,3));
The code is supposed to give you a 3D view, however, it gives you a 2D graph (2D view) instead. The reason is the call of 'hold on' freezes the view as 2D. To solve this issue, one way is to add 'view(3)' at the end, that is:
figure, hold on, plot3(rand(1,3),rand(1,3),rand(1,3)); view(3)
Alternatively, call 'hold on' after you use the 3D plot function:
figure, plot3(rand(1,3),rand(1,3),rand(1,3)); hold on;
These two methods will generate same results.
It is in fact 3D, try rotating the figure
ReplyDeleteYes, it is 3D, the hold freezes the view angle, and makes it look like 2D. That's why when view(3) is used, it is shown 3D again.
ReplyDeleteUsually I do not read post on blogs, but I would like to say that this write-up very forced me to try and do it! Your writing style has been surprised me. Great work admin.Keep update more blog.
ReplyDeleteMatlab Training in Chennai
Usually I do not read post on blogs, but I would like to say that this write-up very forced me to try and do it! Your writing style has been surprised me. Great work admin.Keep update more blog.
ReplyDeleteMatlab Training in Chennai
These are very useful to lead our websites in top position Thank you very much
ReplyDeleteOEM Training Institute In Bangalore
Oracle Fusion Cloud HCM Online Coaching In Australia
Business Analysis Training
IBM Websphere MQ Admin Training from Pune
Project Management Professional Online Training Coaching