Filter löschen
Filter löschen

Info

Diese Frage ist geschlossen. Öffnen Sie sie erneut, um sie zu bearbeiten oder zu beantworten.

problem linking values in loop with symsum

1 Ansicht (letzte 30 Tage)
bus14
bus14 am 2 Mai 2019
Geschlossen: MATLAB Answer Bot am 20 Aug. 2021
Hi community,
I have a normal distribution with mu=100 and sd=10.
I also made a table for this function to compare its values.
pd= makedist('normal','mu',100,'sigma',10)
x = [0:1:200];
y1 = normpdf(x,100,10);
disp('Table using disp command'), disp('x y');
disp([x',y']);
Now I want to create a formula with a summation of k different scenarios. Which should be Sum(p(k)*((l-q)'*z(k)-s'*y(k)) For this I used symsum:
n=200;
k=1:1:n;
Q=y1(k)*((l-q)'*z(k)-s'*y(k))
Q_symsum=symsum(Q,k,1,200)
I have however no idea how I can fix that for example k=64 uses the value of y1 that cooresponds to the x value of 64.
I would like this to work in some sort of loop that it does this for every k from [0 200].
(the values z(k) & y(k) I will later determine using linprog and also some sort of loop

Antworten (0)

Diese Frage ist geschlossen.

Community Treasure Hunt

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

Start Hunting!

Translated by