Matlab set param from array
In Matlab, in order to change the value of a block I do
set_param('model/V','Amplitude','100')
and the value of V is 100. But if I do
for i=1:10
set_param('model/V','Amplitude','P(i)')
...
end
The it stores the value of V as P(i). But in order to access the i-th
element of the 20-by-1 P matrix, I need to refer to it by P(i). What is my
error?
No comments:
Post a Comment