Posts

How to differentiate an expression in MatLab? - diff -- MatLab

 How to differentiate an expression in MatLab? - diff -- MatLab How to differentiate an expression in MatLab? [Ans]  diff  [description] diff(f,x) differentiation f of x by d x.  i.e. f(x)/dx  more details on: Create Symbolic Functions - MATLAB & Simulink (mathworks.com) code: clear clc syms f(x) ; f(x)=3*x^2+5*x; dfx=diff(f,x) dfx(5) result: dfx(x) = 6*x + 5 ans = 35

How to find all divisors of a number or expression in MatLab? - divisors -- MatLab

 How to find all divisors of a number or expression in MatLab? - divisors -- MatLab How to find all divisors of a number or expression in MatLab? [Ans] divisors [description] Find all divisors of a number or expression. more details on: Divisors of integer or expression - MATLAB divisors (mathworks.com) code: clear clc fprintf( "divisors function.\n" ) fprintf( "divisor of 42.\n" ) divisors(42) fprintf( "divisor of -42.\n" ) divisors(-42) fprintf( "divisor of 1.\n" ) divisors(1) fprintf( "divisor of -1.\n" ) divisors(-1) fprintf( "divisor of 0.\n" ) divisors(0) fprintf( "divisor of sym(42).\n" ) divisors(sym(42)) syms x ; %equivalent fprintf( "divisor of (x^4-1).\n" ) divisors(x^4 - 1, x) fprintf( "divisor of (x^4-1).\n" ) divisors(x^4 - 1) syms a u v fprintf( "divisor of a*u^2*v^3 where v are symbolic variables.\n" ) divisors(a*u^2*v^3, v) fprintf( "divisor of a*u^2*v^3 where [u,v]...

How to Find numerator and denominator in MatLab? - numden -- MatLab

How to Find numerator and denominator in MatLab? - numden -- MatLab [Ans] numden [description] num is abbreviate  from numerator. den is abbreviate from denominator. numden function can find numerator and denomiator of an expression. more details on: Extract numerator and denominator - MATLAB numden (mathworks.com)

simplify v.s. simplifyFraction in MatLab. -- MatLab

 simplify v.s. simplifyFraction in MatLab. -- MatLab [description] simplify can simplify any expressions. But simplifyFraction only can simplify expressions about fraction. more details on: Simplify symbolic rational expressions - MATLAB simplifyFraction (mathworks.com)

How to simplify an algebraic formula in MatLab? - simplify -- MatLab

How to simplify an algebraic formula in MatLab? - simplify -- MatLab [Ans] simplify command [Description] S  = simplify( expr )  performs algebraic simplification of  expr . If  expr  is a symbolic vector or matrix, this function simplifies each element of  expr . example S  = simplify( expr , Name,Value )  performs algebraic simplification of  expr  using additional options specified by one or more  Name,Value  pair arguments. [Syntax] S = simplify(expr) S = simplify(expr,Name,Value) more details on   Algebraic simplification - MATLAB simplify (mathworks.com) [Useful Tips] sin(x)^2+cos(x)^2==1 log(exp(a))==a [Code] clear clc syms x c alpha beta %one formula of triangular function simplify(sin(x)^2 + cos(x)^2) %1 %formula of exponent function simplify(exp(c*log(sqrt(alpha+beta)))) %(alpha + beta)^(c/2) simplify(sqrt(x^2)) %sqrt(x^2) simplify(sqrt(x^2), 'IgnoreAnalyticConstraints' ,true) %x u = symunit; simplify(u.m+u.m...