Simulink interpolation using 4 different vectors
2 views (last 30 days)
Show older comments
HI guys i got a problem about interpolation in simulink.
I got 4 variables( each 200x1) . Lets call tehm A,B,C and D.
A,B,C,D are related with each other. I need to interpolate D for a given set of A,B,C.
I can do it in matlab. ( Dq=griddata(A,B,C,D,Aq,Bq,Cq) ) . But i can not do it in simulink.
I tried to use matlab fuction block but it gives me an error "The function 'griddata' is not supported for standalone code generation. See the documentation for coder.extrinsic to learn how you can use this function in simulation." and "Simulink does not have enough information to determine output sizes for this block. If you think the errors below are inaccurate, try specifying types for the block inputs and/or sizes for the block outputs."
can anyone help me?
0 Comments
Answers (1)
A Jenkins
on 17 Feb 2015
As it says,
(1) use coder.extrinsic to add support for griddata
(2) Specifiy the size of the output data of your block.
.....
function vq = fcn(x,y,v,xq,yq)
coder.extrinsic('griddata'); %(1)
vq = zeros(size(xq)); %(2)
vq = griddata(x,y,v,xq,yq);
0 Comments
See Also
Categories
Find more on Simulink Functions in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!