How to get sample datasets locally? [Documentation error?]

Now that documentation is offline by default, it seems that the sample datasets mentioned on this documentation page are no longer available locally, either. As a result, those files can no longer be accessed by the method specified on that page. For example,
load fisheriris.mat
will not find that file.
Is there a way to access those sample datasets without downloading the entire documentation? I hope so!
(At the very least, that documentation page should be updated.)

2 件のコメント

Ive J
Ive J 2023 年 7 月 8 日
it still works on my R2023a [academic licence] 🤔
data = load("fisheriris.mat")
data = struct with fields:
species: {150×1 cell} meas: [150×4 double]
the cyclist
the cyclist 2023 年 7 月 8 日
Your institution presumably has the full documentation locally (which is no longer the default configuration).

サインインしてコメントする。

 採用された回答

Cris LaPierre
Cris LaPierre 2023 年 7 月 9 日
編集済み: Cris LaPierre 2023 年 7 月 9 日

1 投票

Beginning in R2023a, the product documentation is no longer installed by default (see here). The side effect of this is that some example datasets are no longer included with the product install.
This means some example datasets are no longer available by default. You can still access them by either installing the documentation, or by finding an example in the online documentation that uses that file, and then use the 'Open in MATLAB Online' or 'Copy Command' workflows to download that example (along with any associated data files) to a local folder and open it in your MATLAB instance.
Here are 3 examples that use fisheriris.mat
The copy command from one of them is openExample('stats/SpecifyVariableSizedArgumentsForCodeGenerationExample')
Here's a screen shot of what it looks like loading an example that uses the ovariancancer.mat dataset.
If it is a file you use often, consider adding the example folder to your MATLAB Path.

3 件のコメント

the cyclist
the cyclist 2023 年 7 月 9 日
@Cris LaPierre, I appreciate your detailed answer. I have it working.
My question may have been a red herring. I was inadvertently using the 2023b Prerelease version, which I think may have been the problem. Using the openExample() method did not work in that version, but it did in 2023a. It seems that the stats sample datasets may even be present in 2023a (obviating the need for all of the above), but now I'm not sure. I don't feel like re-installing 2023a to find out, but when I download 2023b (the real one, not the prerelease), I'll see how everything works, and revisit my question here.
Thanks for your help!
Cris LaPierre
Cris LaPierre 2023 年 7 月 9 日
編集済み: Cris LaPierre 2023 年 7 月 9 日
I also have tested in the prerelease (update 2), and the dataset is present, so no need to use the openExample workflow.
>> which fisheriris.mat
C:\Program Files\MATLAB\R2023b\toolbox\stats\statsdata\fisheriris.mat
the cyclist
the cyclist 2023 年 7 月 9 日
Interesting. I'm running Update 1, for macOS (Apple Silicon). I don't see that I have access to Update 2 yet.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeInstall Products についてさらに検索

製品

リリース

R2023a

タグ

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by