??? Error using ==> mtimes Inner matrix dimensions must agree.

1 view (last 30 days)
hi I want to draw the graph below. Unfortunately I keep getting the error message:
??? Error using ==> mtimes Inner matrix dimensions must agree. my script is:
close all
clear all
clc
N = 100;
LW11 = [0.3 -.7;-.2 .5];
b1 = [.1 .2];
LW21 = [.1 -.2];
b2 = [.3];
for i = 1:N
q = i * 2 / N;
r = i / N;
p = [q r];
k = p';
a = LW11 * k;
m = a';
b = m + b1;
c = tansig(b);
f = c';
d = LW21 * f;
e = d + b2;
y = purelin(e);
end
mesh(y)
xlabel('x')
ylabel('y')
zlabel('z')
pureline returns matrix, but ??? please help me
  4 Comments
Greg Heath
Greg Heath on 21 Oct 2014
enter the command
whos
to determine the size of all the variables

Sign in to comment.

Answers (0)

Community Treasure Hunt

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

Start Hunting!