how create cross product in fcn simulink matlab?
3 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
stack programer
el 21 de Mzo. de 2016
Respondida: stack programer
el 27 de Mzo. de 2016
hi,i want to simulate a system physical in simulink matlab rs2015. i read from website mathworks cross product i.e. using this:
t1 = [2,3,1];
t2 = [3,1,2];
C = A(:,t1).*B(:,t2)-A(:,t2).*B(:,t1);
fcn function is defined:
function C = fcn(A, B)
t1 = [2,3,1];
t2 = [3,1,2];
C = A(:,t1).*B(:,t2)-A(:,t2).*B(:,t1);
now wehn i run it:it returns this errors:
Attempted to access index 2 of data A.
MATLAB function eML_blk_kernel in MATLAB Function MATLAB Function: C = A(:,t1).*B(:,t2)-A(:,t2).*B(:,t1);
^^
The valid index range is 1 to 1.
This error will stop the simulation.
Component: MATLAB Function | Category: Runtime error
An error occurred while running the simulation and the simulation was terminated
Simulation stopped because of a runtime error: out of bounds.
Component: Simulink | Category: Block error
how we can defined a function that is can operate with vector concatenate
thanks for attention
0 comentarios
Respuesta aceptada
Más respuestas (0)
Ver también
Categorías
Más información sobre Computer Vision with Simulink 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!