Info

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

Filtered by matrix columns

3 Ansichten (letzte 30 Tage)
Lev Mihailov
Lev Mihailov am 5 Jul. 2019
Geschlossen: Jan am 5 Jul. 2019
a = this is my maximum
r = is his position
c = new variable if r is validfor
[a,r]=max(FF);
or i = 1:length(a)-1
f(i)=0;
if (r(i) >= r(i+1))
c(i)=r(i);
else (r(i) <= r(i+2))
c(i)=r(i);
end
end
I already asked a similar question, but my task became somewhat more complicated.
The essence of the problem, as I know, is that the first position is correct r (1) = 200, but all the others need to be checked, r (1) is more or less r (2) +50, r (2) = 240, the test passes, then r (2) with r (3), etc. r(3)=700
  2 Kommentare
KALYAN ACHARJYA
KALYAN ACHARJYA am 5 Jul. 2019
A Problem Well-stated is Half-solved
Guillaume
Guillaume am 5 Jul. 2019
For reference this is the previous question: comparison of columns in the matrix.
Once again, you've given us code that makes no s, this time it's not even valid. Rather tha explaining what you want with nonsensical code, explain in words and with examples.
What are you trying to do? An example of input and desired output would really help.

Antworten (0)

Diese Frage ist geschlossen.

Tags

Produkte

Community Treasure Hunt

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

Start Hunting!

Translated by