How to multiply arrays in struct file with a variable?
Show older comments
I have four variables that are known to me, i.e. 'high', 'low' and 'a' and 'b'. I have a mat file, which contains a lot of arrays. I successfully load the array I want. But I want to multiply the arrays with variable 'a' and 'b'.
filename1 = sprintf('Zy%d', low);
c = a * load('Z.mat', filename1);
filename2 = sprintf('Zy%d', high);
d = b * load('Z.mat', filename2);
But I get this answer:
Undefined operator '*' for input arguments of type 'struct'.
How do I multiply the variable with these loaded arrays?
Accepted Answer
More Answers (1)
Ahmad Hasnain
on 1 Oct 2018
0 votes
Categories
Find more on Structures 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!