build address for using in structure

2 views (last 30 days)
Amir amini
Amir amini on 22 Apr 2020
Edited: Amir amini on 22 Apr 2020
hello
I have a engineering software and linked its with MATLAB by actxserver as following command:
A=actxserver('apwn.document');
A.InitFromFile2('D:\process\calculation of pipe line\exampl\2apw.apwn');
To get data from this software, I need to generate various addresses that these addresses are for any parameters. for example in getting diameter from engineering software to MATLAB, I must use following address that '___' is various for any address and need to change always.
A.Application.Tree.FindNode('\Data\PIPES\DOWN\INPUT\FDV\GYML\MIXED\TOTAL').value;
so I used the following command to generate these:
for i=1:14;
equip_adrs(i)=fullfile('\Data','Blocks',equip(i),'Input','MODEL_TYPE');
full_adrs(i)=strcat('A.Application.Tree.FindNode(','''',equip_adrs(i),'''',').value');
end
since parts of addresses are various, I put parts, side by side by "fullfile" command. also "strcat" can concatenate strings (any address includes 4 parts). but I can't use strcat output because this is a string and doesn't readable for structure A (engineering software).
How can I generate an address look like above( second command)?
thank's

Answers (0)

Categories

Find more on Embedded Coder in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!