what is wrong with the directory path?

13 views (last 30 days)
Brigid Maloney
Brigid Maloney on 22 Oct 2018
Answered: Steven Lord on 22 Oct 2018
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

Answers (1)

Steven Lord
Steven Lord on 22 Oct 2018
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{:})

Categories

Find more on Environment and Settings in Help Center and File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!