How can I create this function on MATLAB?
Mostrar comentarios más antiguos

How can I write this function for the variable "n"? Assuming that I already specified the value of the constant theta.
18 comentarios
Star Strider
el 30 de Mzo. de 2019
The LHS seems to be missing ...
Pablo Arboleya
el 30 de Mzo. de 2019
Editada: Pablo Arboleya
el 30 de Mzo. de 2019
Star Strider
el 30 de Mzo. de 2019
What is θ?
Pablo Arboleya
el 30 de Mzo. de 2019
Guillaume
el 30 de Mzo. de 2019
And what precision do you want on your infinite sum? Also a 1000 digits of precision? Can you measure and angle with anywhere near that precision?
Pablo Arboleya
el 30 de Mzo. de 2019
Guillaume
el 30 de Mzo. de 2019
The theta you wrote has 1000 digits. Can you measure an angle with that precison?
Pablo Arboleya
el 30 de Mzo. de 2019
Walter Roberson
el 30 de Mzo. de 2019
However, you are taking sin() of an expression involving theta, so it is acting as a rotation measurement.
In any case, you have theta to 1000 digits. How many digits do you need your formula to be accurate to?
John D'Errico
el 30 de Mzo. de 2019
With only 1/k in the denominator, that sum will take forever to give you any degree of precisionin the sum. So that degree of precision theta is sort of wasted, because you would need literally trillions of terms to get even double precision accuracy.
Pablo Arboleya
el 30 de Mzo. de 2019
Editada: Pablo Arboleya
el 30 de Mzo. de 2019
Pablo Arboleya
el 30 de Mzo. de 2019
Walter Roberson
el 30 de Mzo. de 2019
What is known about the range of n ? Is it integer? Is it positive? Is it real-valued ?
Pablo Arboleya
el 30 de Mzo. de 2019
Walter Roberson
el 30 de Mzo. de 2019
Interesting, I make it that the result is
theta^(3^n) - arccot(cot(theta^(3^n)*pi))/pi
Pablo Arboleya
el 30 de Mzo. de 2019
Walter Roberson
el 30 de Mzo. de 2019
Using the intepretation that theta^3^n is theta^(3^n) then
theta = sym('1306377883863080690468614492602605712916784585156713644368053759966434053766826598821501403701197395707296960938103086882238861447816353486887133922146194353457871100331881405093575355831932648017213832361522359062218601610856679057215197976095161992952797079925631721527841237130765849112456317518426331056521535131866841550790793723859233522084218420405320517689026025793443008695290636205698968726212274997876664385157661914387728449820775905648255609150041237885247936260880466881540643744253401310736114409413765036437930126767211713103026522838661546668804874760951441079075406984172603473107746775740640078109350834214374426542040853111654904209930908557470583487937577695233363648583054929273872814934167412502732669268404681540626763113223748823800118041206286013841914438857151609189388944789912125543384749359092744422082802260203323027106375022288131064778444817003723336406042118742608383328221769687812353049623008802672211104016065088809718347778314022490821844106377494000232824192701')/sym(10)^1000;
syms n positive
syms pi
result = theta^(3^n) - acot(cot(theta^(3^n)*pi))/pi
Pablo Arboleya
el 30 de Mzo. de 2019
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Matrix Indexing 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!