mikexcohen / AnalyzingNeuralTimeSeries

Code for ANTS book (Cohen, 2012, MIT Press)
170 stars 75 forks source link

ANTS Ch 9 bugs #1

Open hsisti opened 1 year ago

hsisti commented 1 year ago

Your book is fantastic! I've been cruising through it with Matlab open, as suggested. It's been smooth sailing until I reached Chapter 9. I've received a number of error messages, including 'readonly' 'toolbox required' or 'unrecognized function.'

I only have the standard Matlab 2022a for academic use. Can I continue to work through the Matlab exercises without any toolboxes? They cost over 1k, so I'd prefer to not start buying new software add-ons.

mikexcohen commented 1 year ago

Hi Helene. Without knowing which lines or functions were giving errors, I can't offer specific help.

I tried to write the code to be independent of any add-on's, with a few exceptions for the signal-processing and image-processing toolboxes, but I think those are only in later chapters. I do use a few functions from the eeglab toolbox, but that's free to download (you can find it by searching the Web).

hsisti commented 1 year ago

Thanks for your reply. In going back, line by line, I was able to generate the figures.

mikexcohen commented 1 year ago

Ah, yes indeed, that does seem to be a problem with adjusting the figure number. That must be new in MATLAB 2023. I'll fix that in the code, but in the mean time, yes, you can simply remove that option.

As for randsample: Yes, that is contained in the stats toolbox. Please see the lines immediately thereafter for code that does not use that toolbox.

Mike

On Wed, Apr 26, 2023 at 11:58 AM Helene Sisti @.***> wrote:

Hi Mike. In the "chapter09.m" file, I enter lines 1-24 with no issue. When I copy and paste, lines 27-44, I see this message, "Error using matlab.ui.Figure/set Unable to set the 'Number' property of class 'Figure' because it is read-only." To address it, I deleted the " 'Number', 'off' commands in line 28. When I re-enter lines 27-44 with that omission, I then see the following error message, " 'randsample' requires Statistics and Machine Learning Toolbox."

Thanks.

— Reply to this email directly, view it on GitHub https://github.com/mikexcohen/AnalyzingNeuralTimeSeries/issues/1#issuecomment-1523224069, or unsubscribe https://github.com/notifications/unsubscribe-auth/ARKKLIYKJL6RSCCYK4FRBO3XDD5WDANCNFSM6AAAAAAXKZBI5Y . You are receiving this because you commented.Message ID: @.***>

-- Mike X Cohen, PhD Fresh look: mikexcohen.com

hsisti commented 1 year ago

Yes, I did see your comments about the alternative code to the stats toolbox. It worked! Thank you!