Help accessing a function block parameter in Simulink

조회 수: 10 (최근 30일)
Eric Turner
Eric Turner 2016년 4월 25일
답변: Guillaume 2016년 4월 25일
I need to access a function block parameter within a Simulink model hierarchy that contains a forward slash in the name [e.g. function block parameter: (xxxx/yyyy)]. How can I use such a directory name in the location path without Matlab trying to access xxxx then yyyy as two different function block parameters?
  댓글 수: 2
Guillaume
Guillaume 2016년 4월 25일
편집: Guillaume 2016년 4월 25일
Which OS are you on?
'/' is not a valid character for directories or filenames on Windows and Linux.
Is the character maybe some other unicode character that renders (nearly) the same?
Note that '/' is a forward slash, not a backslash. The backslash ('\') is allowed on Linux but not windows.
Eric Turner
Eric Turner 2016년 4월 25일
편집: Eric Turner 2016년 4월 25일
Yes, my mistake it is a forward slash. The OS is Windows, and it is within a simulink model. I am trying to access a function block parameter within the model hierarchy

댓글을 달려면 로그인하십시오.

답변 (1개)

Guillaume
Guillaume 2016년 4월 25일
I know nothing about simulink, but as I've said you can't have a forward slash in any part of a directory name or file name (or even URI for that matter).
So, you cannot use any function that works on directory or file names (or even URL) in combination with your block name. The best thing if possible would be to rename that block so that it does not have a slash.

카테고리

Help CenterFile Exchange에서 Modeling에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by