change specific col and row in a matrix
Mostra commenti meno recenti
Hi, let say i have matrix A=[20 40 60 70; 10 20 30 40; 60 50 20 10]. I want to change value in these location (e.g (2,2),(3,2),(1,4)) to 5 without having typing one by one to change the value.. how i can do that?
1 Commento
Tiasa Ghosh
il 27 Ago 2018
do you have a pattern for the specific locations?
Risposta accettata
Più risposte (1)
Rita Barnabé
il 1 Nov 2021
Modificato: Walter Roberson
il 1 Nov 2021
Hi, how do I change all the values in a specific column ?
%Original values
ecg = Data (:,6);
n = 9; % Number of bits of the channel (?)
VCC = 3; % Operating voltage
Gecg = 1000; % Sensor gain
ecg_volts = (ecg/(2^n)-1/2)*VCC/Gecg;
and now i want to change ecg to ecg_volts value
1 Commento
Walter Roberson
il 1 Nov 2021
Data(:,6) = ecg_volts;
Categorie
Scopri di più su Resizing and Reshaping Matrices in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!