Solving an Equation Using a Formula with an Increasing Level of Values
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
There is a matrix, for each section you need to add a value, how can this be done?
v = [1 2 3 4] ;
iwant = repmat(v,6,1)
% formula v+0.5*cos(7)/pi % presented without multiplication by cosine and division by pi
iwant = 6×4
1.5 2.5 3.5 4.5
2 3 4 5
2.5 3.5 4.5 5.5
3 4 5 6
3.5 4.5 5.5 6.5
4 5 6 7
0 commentaires
Réponses (1)
Walter Roberson
le 21 Fév 2022
v = [1 2 3 4] ;
iwant = repmat(v,6,1);
iwant + (1:6).'/2
2 commentaires
Walter Roberson
le 21 Fév 2022
We want to add 1/2 to the first row, 2/2 to the second row, 3/2 to the third row...
Voir également
Catégories
En savoir plus sur Linear Algebra dans Help Center et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!