x and fx matrix
Show older comments
i need help with building 2 row 10 colum matrix, the first row will present my x values and under every x i want the matrix to show me the value of f(x)
for example, if my f(x) = 2x and 0<x<11
1 2 3 4 5 6 7 8 9 10
2 4 6 8 10 12 14 16 18 20
thanks for the help
Accepted Answer
More Answers (1)
WalterWhite
on 11 Jan 2021
Another way to get the solution
x(1,:) = 1:10; %x
x(2,:) = x(1,:).^x(1,:); %f(x)= x^x
x
Categories
Find more on Creating and Concatenating Matrices 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!