I have to multiply 3*3 and 3*1 array. i am getting error using "curvature​qi=bsxfun(​@times,q,c​urvature);​" this is giving 3*3 matrix but i need 3*1 matrix in every layer or loop. please help

1 次查看(过去 30 天)
q = [3*3] Matrix where q = q(:,:,1:20)
curvature = [3*1] Matrix where curvature is single matrix.

采纳的回答

Walter Roberson
Walter Roberson 2015-10-15
编辑:Walter Roberson 2015-10-16
T = arrayfun(@(pane) q(:,:,pane) * curvature, 1 : size(q,3), 'Uniform', 0);
curvatureqi = cell2mat( reshape(T,1,1,size(q,3)) );
  5 个评论
Walter Roberson
Walter Roberson 2015-10-16
You are getting stuck by the invisible character that I have since corrected. You can copy and paste the code as it is now. Or you can type in the statement by hand instead of copying and pasting it.

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Logical 的更多信息

产品

Community Treasure Hunt

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

Start Hunting!

Translated by