| Embedded IDE Link™ MU | ![]() |
a=address(id,'symbolstring')
a=address(id,'symbolstring','scope')
a=address(id,'symbolstring') returns the address and memory type values for the symbol identified by symbolstring. address returns the variable in the current (or local) scope. For address to work, symbolstring must be a symbol in the symbol table for your active project. There must be a linker command file (lcf) in your project. If address does not find the specified symbol, a is empty and MATLAB® software returns a warning message. You can use address only after you load the program file.
a is a two-element array composed of the symbol address offset and page—a(1) is the address offset and a(2) is the page. read and write accept a as address inputs.
a=address(id,'symbolstring','scope') adds the input argument scope that tells the address method whether the symbol is local or global. Scope accepts one of the following strings:
| string | Description |
|---|---|
| global | Indicates that symbolstring represents a global variable |
| local | Indicates that symbolstring represents a local variable |
Use local when the current program scope is the desired scope of the function.
Use address to return the address and page of an array named coef.
a=address(id,'coef')
You can use address as input for read and write. This example uses read to access the first five elements of the array stored at the address of the global variable coef. Use write in a similar way.
coefvalues=read(id,address(id,'coef','global'),'int32,5)
![]() | add | build | ![]() |
| © 1984-2008- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |