What inputs have to be scalar and why cannot we raise an exponential within a square root function please?
3 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Jon Camilleri
am 13 Nov. 2015
Bearbeitet: Walter Roberson
am 13 Nov. 2015
Excuse my lack of experience what is the problem here, please?
diff(1/2*sqrt(2*pi^exp(-1*x)^2))
Error using ^
Inputs must be a scalar and a square matrix.
To compute elementwise POWER, use POWER (.^) instead.
This is a somewhat mistaken interpretation of some formula, but I lost the academic reference to be honest.
0 Kommentare
Akzeptierte Antwort
Stephen23
am 13 Nov. 2015
Bearbeitet: Stephen23
am 13 Nov. 2015
>> x = 1:4;
>> diff(1/2*sqrt(2*pi.^exp(-1*x).^2))
ans =
-0.251803 -0.077017 -0.026488
But this depends on what the formula is supposed to do, which you do not tell us. In any case you should learn about the differences between matrix and element-wise operations:
0 Kommentare
Weitere Antworten (0)
Siehe auch
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!