How to write in Matlab a matrix whose coefficients depend on a real alpha parameter
Show older comments
A(i,j) = (1+alpha*x(i)*y(j))*exp(x(i)*y(j))
where almpha is a real parameter, x(i) and y(j) points in [0 , 1] with i , j = 1, ..., N
Accepted Answer
More Answers (1)
Here's an example:
alpha = 0.4;
N = 9;
x = linspace(0,1,N);
y = linspace(0,1,N);
xy = x(:).*y(:).' % column x * row y
A = (1+alpha.*xy).*exp(xy)
Categories
Find more on MATLAB in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
