Azzera filtri
Azzera filtri

How to wrote theta as a matlab code

22 visualizzazioni (ultimi 30 giorni)
How to wrote theta as matlab code
for example 2sintheta

Risposta accettata

Birdman
Birdman il 19 Ott 2017
syms theta
2*sin(theta)
Then by substituting theta with any numeric variable, you can calculate 2*sin(theta)
  3 Commenti
Courtney Jacks
Courtney Jacks il 20 Feb 2018
When I input this in matlab it does not run.
Jan
Jan il 20 Feb 2018
@Courtney: "It does not run" does not allow to help you. Please post, what happens instead - perhaps an error message because you do not have the Symbolic Toolbox?

Accedi per commentare.

Più risposte (2)

James Tursa
James Tursa il 19 Ott 2017
Modificato: James Tursa il 19 Ott 2017
E.g.,
theta = pi/4;
result = 2*sin(theta); % <-- if theta is in radians
theta = 45;
result = 2*sind(theta); % <-- if theta is in degrees

RAVI Kumar
RAVI Kumar il 26 Gen 2021
Thetha=pi/4

Tag

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by