Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to create a Matlab symbol composition ∆t?

I'd like to create a single symbol which is contains a delta "∆" and a t. For visualisation purposes i use Matlab Live Script.

Combining several latin letters is easy done by:

sym('dt')

dt2

But these either result in an exception or don't do a conversion:

sym('Delta t')
sym('Deltat')

The workaround to multiply two symbols does not work in all cases:

sym('Delta')*sym('t')

deltat

(sym('Delta')*sym('t'))^2

delta2t2

However, if i square the symbol, i'd like to have this behavior:

sym('dt')^2

dt2

But it should contain the delta symbol:

deltat2

like image 561
checkThisOut Avatar asked Jan 26 '26 23:01

checkThisOut


1 Answers

The answer is no, you cant use non-ASCII for variables in MATLAB. This means no \Delta, no \epsilon, or any other non-standard chars.

You can generate the LaTeX representation of the results, and then print them either in text in MATLAB or in your favourite LaTeX editor with the function latex

like image 51
Ander Biguri Avatar answered Jan 28 '26 15:01

Ander Biguri