Hi there,
I am trying to append field value of a structure from a different script file than the structure was created in. But unfortunately its not working. Following is the code that I am trying with. Any suggestion is appriciated. Thanks!
- First script
clc;clear all;network.node = zeros(5);network.node(1,:) = 7;mode = zeros(5,1);for i = 2:5 mode(i,:) = app(network,i);end
2. Second Script
function mode = app(network,i) mode = i; nod = network.node; nod(i,:) = i; network.node = nod;end
Best Answer