View License

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video

Highlights from

5.0 | 11 ratings Rate this file 50 Downloads (last 30 days) File Size: 48 KB File ID: #4915 Version: 2.1
image thumbnail



Giampiero Campa (view profile)


12 May 2004 (Updated )

Multitrack 3D Simulink Scope.

| Watch this File

File Information

This block is an enhanced version of the standard XYGraph simulink block.
The standard XYGraph allows to plot the motion of ONE point in the XY plane. This block allows plotting the motion of SEVERAL points in the XYZ space. In other words each point draws a line as it moves, so you end up having several lines in the plot instead of just one. Of course setting the camera position parameter to [0 0 1] reduces the plot to a classic 2D one.

This block is very useful when you have to compare the motion of a point versus a reference trajectory.

Run install_3dscope.m to install the scope. The file M2DScope_new.mdl contains a new version for R2014b and later, which was rewritten taking advantages of new graphic features. The file M2DScope_old.mdl contains the legacy version which is slower, has less features, and i think it's harder to use due to its coordinate input ordering, but should work for any version (5.3 and later).

Read the readme.txt file for more info.



This file inspired 3 D Stem For Simulink Block.

Required Products Simulink
MATLAB release MATLAB 5.3 (R11)
MATLAB Search Path
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (15)
12 Apr 2016 Bao Nguyen

Thanks, Giampi. This is exactly what I am looking for. It works with R2016a.

27 Nov 2015 Giampiero Campa

Giampiero Campa (view profile)

Ok, I think I've found a solution for 2014b and later. I should be able to fully test it and then post it within 2-3 weeks.

Comment only
03 Nov 2015 Andreas

Andreas (view profile)

Hi Giampiero,

a rather sooner than later updated Version would be urgently needed here. We use it, to assume and check lookuptables vor heat exchangers (heat Transfer coefficient dependent from both volume flows).

Comment only
27 Apr 2015 mohammad ali kazemi lari

Hi. Thank you for the file. I'm using 2014b and I get the XYZ Plot without any error, but It is supposed to display both the actual and desired trajectories at the same time, But what I see is just a blue trajectory. Also, I changed i to 1+2*(i-1) but nothing happened. How should I depict the desired trajectories by red and actual trajectories by blue?
Thanks for your prompt response

15 Apr 2015 Giampiero Campa

Giampiero Campa (view profile)

Note that this scope does not work properly for 2014b and later versions. I will try to fix it at some point. If you need it sooner rather than later please let me know.

Comment only
13 May 2014 malek

malek (view profile)

it is useful

08 Apr 2013 Nestor Aguillon

08 Apr 2013 Nestor Aguillon

Excuse my ignorance but.. how do I install this block? It could be helpful to me

30 Sep 2011 Emanuele Ruffaldi

Really useful block. Thanks.

02 Mar 2010 Gönenç

Hi, I put the block on top of my aircraft model. After trimming the aircraft, trimming needs to be terminated. I use the following command bu it doesn't work with the 3d scope.

>> feval(model,[],[],[],'term');

??? Error using ==> feval
--> Error evaluating 'StopFcn' callback of XYZ multiscope block (mask) 'Model/Subsystem/XYZ Graph'. Index exceeds
matrix dimensions.

Error in ==> end_trim at 14

Comment only
12 May 2006 nikhil santosh

This is just too neat!

14 Dec 2005 H jr N

very useful

15 Apr 2005 Richard pfisterer

There is a slight bug if there are more than 6 inputs.
To fix, change the end of line 170 that reads
or to be more general to

12 Jan 2005 Sebas Nani

It's Work

05 Jul 2004 Ridanto poetro

18 May 2004

Removed ugly spaces from description.

14 Dec 2015 1.0

A new S-Function (sfun3d.m) was written for R2014b and later which takes advantages of newer graphics capabilities. The legacy S-Function sfunxyz.m was also rewritten so it can work for R2014b and later.

31 Jan 2017 2.1

Several improvements and minor bug fixes to sfun3d.m

Contact us