function y = symbolicFunction(x0,x1,x2,x3,x4,x5) syms z y = vpa(root(z^6 - z^4*(- 300*x2*x5 + 450*x2^2 + 450*x5^2) - z^3*(7200*x2*x1 + 4800*x2*x4 - 4800*x5*x1 - 7200*x5*x4) - z^2*(18000*x2*x0 - 18000*x2*x3 - 18000*x5*x0 + 18000*x5*x3 + 50400*x1*x4 + 28800*x1^2 + 28800*x4^2) - z*(144000*x1*x0 - 144000*x1*x3 + 144000*x4*x0 - 144000*x4*x3) + 360000*x0*x3 - 180000*x3^2 - 180000*x0^2, z, 1)); end
I want to implement this solution in a simulink model, but I cannot directly add this function in simulink. The most important error states
Function 'syms' not supported for code generation.
function output = symbolicFunctionSimulink(x0,x1,x2,x3,x4,x5) coder.extrinsic('symbolicFunction'); output = 0; % initializing output output = symbolicFunction(x0,x1,x2,x3,x4,x5); end
and had to alter my symbolicFunction.m such that simulink recognized it to be numeric
function y = symbolicFunction(x0,x1,x2,x3,x4,x5) syms z y = double(vpa(root(z^6 - z^4*(- 300*x2*x5 + 450*x2^2 + 450*x5^2) - z^3*(7200*x2*x1 + 4800*x2*x4 - 4800*x5*x1 - 7200*x5*x4) - z^2*(18000*x2*x0 - 18000*x2*x3 - 18000*x5*x0 + 18000*x5*x3 + 50400*x1*x4 + 28800*x1^2 + 28800*x4^2) - z*(144000*x1*x0 - 144000*x1*x3 + 144000*x4*x0 - 144000*x4*x3) + 360000*x0*x3 - 180000*x3^2 - 180000*x0^2, z, 1))); end
Matlabsolutions.com provides guaranteed satisfaction with a
commitment to complete the work within time. Combined with our meticulous work ethics and extensive domain
experience, We are the ideal partner for all your homework/assignment needs. We pledge to provide 24*7 support
to dissolve all your academic doubts. We are composed of 300+ esteemed Matlab and other experts who have been
empanelled after extensive research and quality check.
Matlabsolutions.com provides undivided attention to each Matlab
assignment order with a methodical approach to solution. Our network span is not restricted to US, UK and Australia rather extends to countries like Singapore, Canada and UAE. Our Matlab assignment help services
include Image Processing Assignments, Electrical Engineering Assignments, Matlab homework help, Matlab Research Paper help, Matlab Simulink help. Get your work
done at the best price in industry.