I encountered an 'invalid use of operator' error message.
51 ビュー (過去 30 日間)
古いコメントを表示
I encountered an 'invalid use of operator' error message when excuted this below.
load(fullfile(E:\charite\Data\EGCG_Round3\MRE\MouseAtlasReg\ProcessedShort\20241024_sl_MRE_Day18_Cage1_3505_MRE\mreCubes1,'ventricles.mat'));
0 件のコメント
採用された回答
Harald
2024 年 11 月 11 日 15:06
Hi,
you need to place single or double quotes around the path. With single quotes:
load(fullfile('E:\charite\Data\EGCG_Round3\MRE\MouseAtlasReg\ProcessedShort\20241024_sl_MRE_Day18_Cage1_3505_MRE\mreCubes1','ventricles.mat'));
Best wishes,
Harald
6 件のコメント
Harald
2024 年 11 月 12 日 10:43
Hi,
you should not work with the .mat files in that line, but with the variables that you have imported from them:
If the variables are named the same as the .mat files, this would be
WholeBrain_115cut_noVentricle = and(WholeBrain_115cut, ~ventricles);
like you have shown in an earlier version.
In general, it will be
varC = and(varA, ~varB);
Best wishes,
Harald
その他の回答 (2 件)
dpb
2024 年 11 月 11 日 15:06
load(fullfile('E:\charite\Data\EGCG_Round3\MRE\MouseAtlasReg\ProcessedShort\20241024_sl_MRE_Day18_Cage1_3505_MRE\mreCubes1','ventricles.mat'));
You forgot the tic marks around the folder string; MATLAB tried to evaluate the \ as the ldivide, .\ operator.
1 件のコメント
Image Analyst
2024 年 11 月 11 日 15:07
You forgot quotes. Corrected:
load(fullfile('E:\charite\Data\EGCG_Round3\MRE\MouseAtlasReg\ProcessedShort\20241024_sl_MRE_Day18_Cage1_3505_MRE\mreCubes1','ventricles.mat'));
or simply don't use fullfile(), unless you need to change the folder or basefilename and are using variables for that:
load('E:\charite\Data\EGCG_Round3\MRE\MouseAtlasReg\ProcessedShort\20241024_sl_MRE_Day18_Cage1_3505_MRE\mreCubes1\ventricles.mat');
参考
カテゴリ
Help Center および File Exchange で Entering Commands についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!