Simulink interpolation using 4 different vectors
2 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
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 comentarios
Respuestas (1)
A Jenkins
el 17 de Feb. de 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 comentarios
Ver también
Categorías
Más información sobre Simulink Functions en Help Center y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!