generating an uncertain matrix by using 'ureal' in a loop

Hi there,
I am looking for some help in generating an uncertain Stiffness matrix (K). The elements of my matrix are determined during the loop. So there is no way I can know the elements of the K before execution of the code. However as I understand while using Matlab's 'ureal' command we need to specify the nominal value of the element.
Is there anyway I can extract the nominal value during execution of the codes. If not is there anyway to generate a known percentage of uncertainty in matrix K other than using 'ureal'. My codes are as below:
s=1;
for i= 1:m
for j=1:n
Kmn=0.25*lx*ly*D_pzt*((((i*pi)/lx)^2+((j*pi)/ly)^2)^2);
uncertain_K(s,s)=ureal('Kmn',Kmn,'Percentage',10) %_ <---ERROR HERE since Kmn (nominal) is not specified
s=s+1;
end
end
Thanks

Answers (0)

Asked:

on 4 Jun 2013

Community Treasure Hunt

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

Start Hunting!