what is wrong with the directory path?

13 ビュー (過去 30 日間)
Brigid Maloney
Brigid Maloney 2018 年 10 月 22 日
回答済み: Steven Lord 2018 年 10 月 22 日
this line of code
function [savePath, parameters] = SetFigureSavePath('C:\Users\Brigid\Documents\Github\MERFISH_analysis\newPath', varargin)
returns the error
Invalid expression. Check for missing multiplication operator, missing or unbalanced delimiters, or other syntax error. To construct matrices, use brackets instead of parentheses.
but I am not sure how to properly set the path

回答 (1 件)

Steven Lord
Steven Lord 2018 年 10 月 22 日
If you are trying to define the function SetFigureSavePath, the first input specified in the definition must be the name of a variable into which the first input argument with which the user calls it will be stored in the function's workspace. You're specifying an expression.
If you are trying to call the function SetFigureSavePath, remove the function keyword at the start of the call. In this case, passing varargin on its own may not do what you expect. You may want to turn it into a comma-separated list.
P = 'C:\Users\Brigid\Documents\Github\MERFISH_analysis\newPath';
[savePath, parameters] = SetFigureSavePath(P, varargin{:})

カテゴリ

Help Center および File ExchangeEnvironment and Settings についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by