Filter löschen
Filter löschen

Needing an algebra equation for the following code

1 Ansicht (letzte 30 Tage)
Ali Noori
Ali Noori am 1 Mär. 2016
Kommentiert: Walter Roberson am 1 Mär. 2016
matrix=[ 0 0 0 0 0 0 1 1 1 0 0 0 0 0 1 1 1 1 1 0 0 0 0 0 1 1 1 1 1 0 0 0 0 0];
D=diff(find(diff([0 matrix])>0))-1
ans: D= 7 9
  4 Kommentare
Image Analyst
Image Analyst am 1 Mär. 2016
There is none. It's computed numerically. There is no equation where you can plug in matrix and get out D without doing it numerically like you did. Why do you think you need one? What are you going to do with the result? What would you do with the equation, if you had one?
Walter Roberson
Walter Roberson am 1 Mär. 2016
What operations are permitted in your algebraic equation?
For example, some people permit Dirac Delta in "algebraic equations" and other people say "No, Dirac Delta is a distribution not a function so it is improper to include it in an equation!"

Melden Sie sich an, um zu kommentieren.

Antworten (0)

Community Treasure Hunt

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

Start Hunting!

Translated by