Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
Pretty function

Subject: Pretty function

From: Mario Fatafehi

Date: 29 Mar, 2010 03:14:06

Message: 1 of 3

syms a b c;
a=11/19;
b=3/17;
c=1/7;
G=a + b +c;
pretty(G)

Error says ??? Undefined command/function 'pretty'. Any help?

Subject: Pretty function

From: Mario Fatafehi

Date: 29 Mar, 2010 03:27:06

Message: 2 of 3

"Mario Fatafehi" <coruba9@hotmail.com> wrote in message <hop5tt$b0o$1@fred.mathworks.com>...
> syms a b c;
> a=11/19;
> b=3/17;
> c=1/7;
> G=a + b +c;
> pretty(G)
>
> Error says ??? Undefined command/function 'pretty'. Any help?

Its okay, I solved it.
G=sym(11/19)+sym(3/17)+sym(1/7)
 
 pretty(G)

Subject: Pretty function

From: Steven Lord

Date: 29 Mar, 2010 13:52:26

Message: 3 of 3


"Mario Fatafehi" <coruba9@hotmail.com> wrote in message
news:hop5tt$b0o$1@fred.mathworks.com...
> syms a b c;
> a=11/19;
> b=3/17;
> c=1/7;
> G=a + b +c;
> pretty(G)
>
> Error says ??? Undefined command/function 'pretty'. Any help?
>

PRETTY is a method for sym objects, and you are calling it withOUT any sym
objects as input. Therefore, the method cannot be called, and there is no
PRETTY function or pretty method for double arrays that can be called, so
you receive that error.

--
Steve Lord
slord@mathworks.com
comp.soft-sys.matlab (CSSM) FAQ: http://matlabwiki.mathworks.com/MATLAB_FAQ

Tags for this Thread

No tags are associated with this thread.

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us