From: abdu on
i am using matlab in mac os x and the disp function works differently,
look at the code and the result i am getting. is there a fix for this
problem, why disp('') actually being displayed in the result.

a=1.55;
t=[1:1:10];

v=a.*t;

d=0.5*a*t.^2;

Table = [t' , d' , v'];

disp('')

disp('time distance velocity')
disp(' (s) (m) (m/s)')
disp('')
disp (Table)
disp('')

-----------------------------------------------------------------------------------
RESULT

v=a.*t;

d=0.5*a*t.^2;

Table = [t' , d' , v'];

disp('')

disp('time distance velocity')
time distance velocity
disp(' (s) (m) (m/s)')
(s) (m) (m/s)
disp('')
disp (Table)
1.0000 0.7750 1.5500
2.0000 3.1000 3.1000
3.0000 6.9750 4.6500
4.0000 12.4000 6.2000
5.0000 19.3750 7.7500
6.0000 27.9000 9.3000
7.0000 37.9750 10.8500
8.0000 49.6000 12.4000
9.0000 62.7750 13.9500
10.0000 77.5000 15.5000

disp('')
From: Jos on
abdu <iabdurahman(a)gmail.com> wrote in message <e45435d8-2270-44f3-a468-a1c482d6fa60(a)l31g2000vbp.googlegroups.com>...
> i am using matlab in mac os x and the disp function works differently,
> look at the code and the result i am getting. is there a fix for this
> problem, why disp('') actually being displayed in the result.
>
> a=1.55;
> t=[1:1:10];
>
> v=a.*t;
>
> d=0.5*a*t.^2;
>
> Table = [t' , d' , v'];
>
> disp('')
>
> disp('time distance velocity')
> disp(' (s) (m) (m/s)')
> disp('')
> disp (Table)
> disp('')
>
> -----------------------------------------------------------------------------------
> RESULT
>
> v=a.*t;
>
> d=0.5*a*t.^2;
>
> Table = [t' , d' , v'];
>
> disp('')
>
> disp('time distance velocity')
> time distance velocity
> disp(' (s) (m) (m/s)')
> (s) (m) (m/s)
> disp('')
> disp (Table)
> 1.0000 0.7750 1.5500
> 2.0000 3.1000 3.1000
> 3.0000 6.9750 4.6500
> 4.0000 12.4000 6.2000
> 5.0000 19.3750 7.7500
> 6.0000 27.9000 9.3000
> 7.0000 37.9750 10.8500
> 8.0000 49.6000 12.4000
> 9.0000 62.7750 13.9500
> 10.0000 77.5000 15.5000
>
> disp('')

Perhaps ECHO is on ?

help echo

Jos