MATLAB: How to put automaticaly values to “Mutual inductance block”

change values from matlab to simulinkmutual inductance block

I´m using the example "power_cable" simulink model for create my own model, but that produces an error, I would like that the mask recive my values at least for the first time, and then if is posible to use my code that changes the value each time step.
<<
<<
>>
>>

Best Answer

Your matrices may appear to be symmetrical, but they may not be. An explanation is here: Why is 0.3 - 0.2 - 0.1 (or similar) not equal to zero? (link) dealing with floating-point approximation error.
A solution would be to use the round function to round them to a specific number of decimal places. (In your code, 10 or 11 would probably work, but it is best to experiment to get the best result.) Recent versions of the round function will do that. If you do not have that version of round, this anonymous function will do the same thing:
roundn = @(x,n) round(x .* 10.^n)./10.^n; % Round ‘x’ To ‘n’ Digits, Emulates Latest ‘round’ Function