linear algebra - MATLAB input it not a double error -


My file is not working and I do not know why when I run y = test (A, X) Then I have the following:

A = floor (rand (8,100));

x = floor (rand

  function [100,1]); >    I undefined function 'test' for the input argument of 'double' Output_args] = unchecked 2 (~) function y = test (A, X)% Function matrix A's vector calculates the Pro Corps according to x line-wise%, here the number of rows defines M so that the loop [i, na] = size (a); [Mx, nx] = size (x); If the statement is used to check the appropriate dimensions if (n == MX & NX == 1) y = zero (ma, 1); % N = 1 for the initial y vector: ma y (n) = a (n, :) * x; % End and disp ('Matrix dimensions do not match') y = []; End of end end  

As Ben Voigat correctly tells you in your comment that your problem is that Test is defined in Untitled 2

There is no need to do any such thing for the code you posted, so you can just do the external < Em> without title 2 can be solved by declaring the test. So just create a test.m file, just use this part of this code

  function y = test (a, x)% this function matrix A's product vector x line-wise % Defines the number of rows here to feed for loop m [ma, na] = size (a); [Mx, nx] = size (x); If the statement is used to check the appropriate dimensions if (n == MX & NX == 1) y = zero (ma, 1); % N = 1 for the initial y vector: ma y (n) = a (n, :) * x; End and disp ('matrix dimension does not match') y = []; End and end  

and then call the function again


Comments

Popular posts from this blog

ios - How do I use CFArrayRef in Swift? -

eclipse plugin - Run java code error: Workspace is closed -

c - Error on building source code in VC 6 -