Borrar filtros
Borrar filtros

I am attempting to use the MATLAB Function block in my simulink model; however evrytime i run it, the following errors occur; "Please change your current directory to a writable directory preferably outside of MATLAB installation area."

1 visualización (últimos 30 días)
function [mean,stdev] = stats(vals)
%#codegen
%calculates the statistical mean
%and s.d for the values in vals
len = length(vals);
mean = avg(vals,len);
stdev = sqrt(sum(((vals-avg(vals,len)).^2))/len);
coder.extrinsic('plot');
plot(vals,'-+');
function mean = avg(array,size)
mean = sum(array)/size;

Respuesta aceptada

Ruben
Ruben el 17 de Abr. de 2013
You should move your models and codes to a folder which is not the installation folder of MATLAB. Your desktop or 'my documents' should work.
  1 comentario
Zabu Zed
Zabu Zed el 26 de Abr. de 2013
Oh! thank you, I managed to change the directory and things worked just fine. The trick was to leave the default display windows of MATLAB so as to be able to change to the directories of origin easily. THank you though.

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Simulink Environment Customization en Help Center y File Exchange.

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by