Info

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

Help me clarify this

1 Ansicht (letzte 30 Tage)
sarah
sarah am 28 Dez. 2012
Geschlossen: MATLAB Answer Bot am 20 Aug. 2021
Suppose we have
U = [1, 2, 4, 8, 16];
for j=1:length(U);
p(:,j)= 1-((1-exp(-(z))).^N).^U(j);
i don't get the 3rd row.why use p(:,j) on the left side and U(j)on the right side .why not use U(:,j) too?

Antworten (1)

Jan
Jan am 28 Dez. 2012
  • U(j) is the j.th element of the vector U.
  • U(1, j) is the j.th element of the first row of U.
  • U(:, j) is the j.th element of all rows of U.
As long as U is a row vector, these three terms create the same answer.
The indexing is explained exhaustively in the "Getting Started" chapters of the documentation. It is obligatory to read at least these chapters, when you want to work with such a powerful tool as Matlab.

Diese Frage ist geschlossen.

Tags

Noch keine Tags eingegeben.

Community Treasure Hunt

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

Start Hunting!

Translated by