I get an error when I run a function on mac, but it works when run in Windows

9 visualizaciones (últimos 30 días)
Hi Everyone. I'm running a script using 'ischange'. This function works when run on my friend's Windows laptop but when I run the same script on my Mac, I get errors.
For example, when I just try the example of implementing the function from MATLAB's documentation I get an error.
Here is a demonstration.
Change in Mean
Create a vector of noisy data, and compute the abrupt changes in the mean of the data.
A = [ones(1,5) 25*ones(1,5) 50*ones(1,5)] + rand(1,15);
TF = ischange(A)
When I run the above two lines I get this error;
Error using var
Too many input arguments.
Error in ischange>cpnochange(line 260)
cost = n*var(a,1);
Error in ischange>cpmanual(line 239)
cost0 = cpnochange(a,statistic,x);
Error in ischange>ischangeArrayColumn(line 212)
cp = cpmanual(a,statistic,Lmin,penalty,x);
Error in ischange>ischangeArray(line 170)
TF(:,k) = ischangeArrayColumn(B(:,k),args{:});
Error in ischange(line 89)
[varargout{1:nargout}] = ischangeArray(A,method,x,numchanges,separation,threshold,dim);
Please help. Thanks.

Respuesta aceptada

Steven Lord
Steven Lord el 3 de Jul. de 2020
Make sure you haven't written or downloaded your own var.m that's taking precedence over the var.m included in MATLAB. You can check this using:
which -all var

Más respuestas (1)

betul
betul el 27 de Oct. de 2023
Hi,
I have a similar problem. When I run loadbv function on windows it works but not in mac computer. It reports unsupported function. We prepared the script in windows. Path seems to be fine. We also tried with another alternative function, readbv, the error reporting persists. How can I fix it? Appreaciate your help!
  8 comentarios
betul
betul el 1 de Nov. de 2023
The full exact message is that the function is not reported. I'll also attach a screenshot in case there'll be others who might face the same problem. My computer is silicon based Mac, so I should probably contact the developers. Thank you so much Steven!
Walter Roberson
Walter Roberson el 1 de Nov. de 2023
You have a pop_loadbw.m script in /Users/betul/ that is interfering with eeglab trying to use the plugin function .
The master copy of the plugin should not be in your MATLAB path. You should either use the eeglab plugin manager to install it, or else you should uncompress the downloaded plugin file in the main EEGLAB “plugins” sub-directory .

Iniciar sesión para comentar.

Categorías

Más información sobre Introduction to Installation and Licensing en Help Center y File Exchange.

Productos


Versión

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by