Syntax help: Linearly spaced vector and simple algebra
Mostrar comentarios más antiguos
How i write this in MATLAB
t=1790 to 2000
p(t)=197,273,000/(1+e-0.0313(t-1913.25)
Respuesta aceptada
Más respuestas (1)
Walter Roberson
el 13 de Jun. de 2011
1 voto
Hints:
- e is coded as exp(1) if you are talking about the base of the natural logarithms.
- you need a multiplication symbol before your final '('
- you need to have the same number of ')' as you have '('
- commas are not permitted as thousand groupings in numbers
- http://www.mathworks.com/help/techdoc/ref/for.html
- are you really using e as a single constant, or does your original formula have e raised to some power? If it does have e raised to a power, see http://www.mathworks.com/help/techdoc/ref/exp.html
Categorías
Más información sobre Mathematics en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!