on-internet
← Community

Matlab 'Sym' is not convertable to 'double'

Stack Overflow ·

Here is my code syms n z NN = [8,16,32]; N_1 = .25*(1-n-z+n*z); N_2 = .25*(1-n+z-n*z); N_3 = .25*(1+n+z+z*n); N_4 = .25*(1+n-z-z*n); for N_t = 1:numel(NN) t_x = 1; t_y = 1; m_x = zeros(1,NN(N_t)); m_y = zeros(1,NN(N_t)); display(m_x) x = linspace(0,1,NN(N_t)); y = linspace(0,1,NN(N_t)); for i_x = 1:numel(x) x_i = x(t_x); x_n = x(t_x+1); display(x_i) display(x_n) N_x = [N_4*x_i + N_3*x_n; N_1*x_i + N_2*x_n]; m_x(t_x,1) = m_x(t_x,1) + N_x; t_x =t_x+1; end When I try to run the code I get the error : Unable to perform assignment because value of type 'sym' is not convertible to 'double'. Error in

Comments

Sign in or sign up to comment and upvote.

No comments yet.