numerical integration error
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
john birt
am 2 Mär. 2011
Kommentiert: Pavol Namer
am 5 Aug. 2014
How come I get an error? What does this mean?
X = 0:1:100; Y = X^(-1/2)*exp(-0.5*(0.00009996^2/X+34.3713^2*X)); Z = trapz(X,Y)
??? Error using ==> mpower
Inputs must be a scalar and a square matrix.
How can I numerically integrate the function Y?
0 Kommentare
Akzeptierte Antwort
Sean de Wolski
am 2 Mär. 2011
You need a '.' before your '^', i.e:
Y = X.^(...)
2 Kommentare
Pavol Namer
am 5 Aug. 2014
Hi I solving similar problem. I don't realy understand the second comment "And also for the / and * involving the vector X."
What is the righ equstion for Y = X^(-1/2)*exp(-0.5*(0.00009996^2/X+34.3713^2*X)) It is: Y = X.^(-1/2)*exp(-0.5*(0.00009996^2./X+34.3713^2.*X))
I try to type function
and don't know how, because same error appers...
Thank you for your answer.
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Numerical Integration and Differentiation finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!