Multiplying spreadsheet column by variable

1 visualizzazione (ultimi 30 giorni)
Hello can a spreadsheet column be multiplied by a variable of a function to generate a new column?
g.

Risposta accettata

Azzi Abdelmalek
Azzi Abdelmalek il 30 Lug 2016
Modificato: Azzi Abdelmalek il 30 Lug 2016
A=randi(10,4,3) % Example
Cst=10
A=[1;2;3]
B=A(:,2)*Cst %Multiply column 2 by constant Cst
  5 Commenti
Azzi Abdelmalek
Azzi Abdelmalek il 30 Lug 2016
Modificato: Azzi Abdelmalek il 30 Lug 2016
  1. You need to import your excell file using the Matlab function xlsread
  2. Use Matlab functions and operators to do the calculations you need, there are several Matlab functions, allowing you to do many kind of calculation and processing
  3. you can also link Excel to Matlab and use Matlab functions in Excel spreedsheet.
Gavin Seddon
Gavin Seddon il 1 Ago 2016
Thanks for this, I will use the xlsread/write because I use Mac. Do you have a URL for these operators?

Accedi per commentare.

Più risposte (0)

Community Treasure Hunt

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

Start Hunting!

Translated by