Is there a bug in MATLAB siderealTime function?
    6 Ansichten (letzte 30 Tage)
  
       Ältere Kommentare anzeigen
    
    Jae-Hee Park
 am 29 Jun. 2022
  
    
    
    
    
    Beantwortet: Collin Russo
    
 am 5 Jul. 2022
             Hey!
I want to use siderealTime function in MATLAB but the value is different in the code below.
I think thGMST(1) and thGMSTfirst are the same also thGMST(end) and thGMSTend are the same too.
But values are different.
How does this occur?
In my computer the values are like this.
thGMSTfirst = 284.3031
thGMSTend =  313.8725
thGMST(1) =  26.2954
thGAST(end)  = 55.8647 
dates = datetime([2019 1 4 12 0 0]);
dates = dates + days(0:30)';
jdJan = juliandate(dates);
[thGMST, thGAST] = siderealTime(jdJan);
thGMSTfirst = siderealTime(jdJan(1));
thGMSTend = siderealTime(jdJan(end));
0 Kommentare
Akzeptierte Antwort
  Collin Russo
    
 am 5 Jul. 2022
        Hi Jae-Hee,
Thank you for flagging this issue.
The output of the calls to siderealTime with scalar inputs is correct:
thGMSTfirst = siderealTime(jdJan(1));
thGMSTend = siderealTime(jdJan(end));
There is a bug in the vectorization code for the function - I have created an internal bug report to resolve this issue.
In the meantime, please continue to call siderealTime with scalar inputs.  To calculate multiple values, use a for-loop or arrayfun.
In the future, please contact Tech Support if you feel you have found a bug in the software to ensure we are notified as quickly as possible and can address the issue in a timely fashion.
Thanks,
Collin
0 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
				Mehr zu Robust Control Toolbox finden Sie in Help Center und File Exchange
			
	Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
