Display codes from different computing languages on WordPress

I came across a post on how to display codes from different languages on WordPress.

Basically, WordPress utilises a feature to turn a piece of, say MATLAB, code from this:

t = 0:dt:10;                       % Time vector
a = 2*sin(2*pi*2*t);            
plot(t,a,'k')			
xlabel('Time [s]')		
ylabel('Signal [-]')

to this:

t = 0:dt:10;                    % Time vector
a = 2*sin(2*pi*2*t);
plot(t,a,'k')
xlabel('Time [s]')
ylabel('Signal [-]')

Putting this way, the syntax will be highlighted, along with the row number.

Advertisement

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: