How can I create this function on MATLAB?
显示 更早的评论

How can I write this function for the variable "n"? Assuming that I already specified the value of the constant theta.
18 个评论
Star Strider
2019-3-30
The LHS seems to be missing ...
Pablo Arboleya
2019-3-30
编辑:Pablo Arboleya
2019-3-30
Star Strider
2019-3-30
What is θ?
Pablo Arboleya
2019-3-30
Guillaume
2019-3-30
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
2019-3-30
Guillaume
2019-3-30
The theta you wrote has 1000 digits. Can you measure an angle with that precison?
Pablo Arboleya
2019-3-30
Walter Roberson
2019-3-30
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
2019-3-30
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
2019-3-30
编辑:Pablo Arboleya
2019-3-30
Pablo Arboleya
2019-3-30
Walter Roberson
2019-3-30
What is known about the range of n ? Is it integer? Is it positive? Is it real-valued ?
Pablo Arboleya
2019-3-30
Walter Roberson
2019-3-30
Interesting, I make it that the result is
theta^(3^n) - arccot(cot(theta^(3^n)*pi))/pi
Pablo Arboleya
2019-3-30
Walter Roberson
2019-3-30
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
2019-3-30
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Matrix Indexing 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!