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 (최근 30일)
이전 댓글 표시
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;
채택된 답변
Ruben
2013년 4월 17일
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.
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Simulink Environment Customization에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!