Borrar filtros
Borrar filtros

Info

La pregunta está cerrada. Vuélvala a abrir para editarla o responderla.

how do I write a function with cell input from matlab to c code?

1 visualización (últimos 30 días)
UTA
UTA el 8 de Sept. de 2013
Cerrada: MATLAB Answer Bot el 20 de Ag. de 2021
Hi everyone: my matlab code as follow:
function [ XP ] = seqRe_ali( test_cut, model_cut,P )
for i = 1 : size(P,1)
c = P(i,3);
t = P(i,2);
m = P(i,1);
reTest_ali{i} = test_cut{t}(c,:);
reModel_ali{i} = model_cut{m};
end
for i = 1 : size(reTest_ali,2)
reTest_matrix(i,:) = reTest_ali{i};
end
for i = 1 : size(reModel_ali,2)
reModel_matrix(i,:) = reModel_ali{i};
end
% Xs is like Xi*Wi' and Yi*Wi'.
XP{1} = reTest_matrix';
XP{2} = reModel_matrix';
end
where the input test_cut, model_cut is two cell with size 1*n, 1*m and in each cell is a matrix with size r*c; p is the matrix with size t*3; How do I switch these matlab code c code, because I want use cmex to call the c code in matlab to accelerate the run speed. Thank you so much.

Respuestas (0)

La pregunta está cerrada.

Etiquetas

Aún no se han introducido etiquetas.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by