Borrar filtros
Borrar filtros

How to make a summation series with a dataset

1 visualización (últimos 30 días)
Thijs Van Dommelen
Thijs Van Dommelen el 18 de Sept. de 2021
Comentada: Thijs Van Dommelen el 24 de Sept. de 2021
Hi, i'd like to know how i can implement a dataset in a summation like this , where x_i is a number out of a 1000x1 table and Vs is known

Respuesta aceptada

Srijith Kasaragod
Srijith Kasaragod el 21 de Sept. de 2021
The following function shows one possible approach to solve this problem . I assume that the dataset contains 1000x1 double values as a table.
function res= f(dataset, Vs)
y=dataset.var; %var is name of the column containing elements
n=length(y);
res= sqrt(sum((y-Vs).^2)./n);
end
The 'sum' function performs the summation of elements in array 'y'.
Refer this link to read more on how to access data in tables.

Más respuestas (0)

Categorías

Más información sobre Mathematics en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by