How do I go about coding a matrix with entries being the outcome on an equation. for example 5 x 10 with Akj= ksin(kj)+jcos(kj)

1 view (last 30 days)
for example 5 x 10 with Akj= ksin(kj)+jcos(kj)

Answers (1)

Chunru
Chunru on 4 May 2023
k = (1:5)';
j = (1:10);
A= k.*sin(k*j)+j.*cos(k*j)
A = 5×10
1.3818 0.0770 -2.8289 -3.3714 0.4594 5.4816 5.9343 -0.1746 -7.7881 -8.9347 1.4024 -2.8209 2.3217 1.3967 -5.2834 3.9900 2.9384 -8.2371 4.4409 5.9067 -0.5666 1.0821 -1.4970 1.7657 -1.8476 1.7089 -1.3241 0.6767 0.2399 -1.4216 -3.6809 3.6664 0.3853 -4.9823 5.6922 -1.0772 -5.6546 8.8795 -5.1188 -3.6889 -4.5110 -4.3982 0.9724 6.1971 4.2943 -4.0146 -8.4668 -1.6099 8.9824 8.3378

Categories

Find more on Programming in Help Center and File Exchange

Tags

Products

Community Treasure Hunt

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

Start Hunting!