error in writing an equation
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Kentman
am 25 Jul. 2014
Beantwortet: Wayne King
am 25 Jul. 2014
Hello,
I was writing this equation in matlab:
y=(3sin(x)cos(x))/(sin3(x)+cos3(x)) % of course 3 means power)
so i wrote it normally like:
y= (3*sin(x)*cos(x))/((sin(x)^3)+(cos(x))^3)
and i got the error: error using m times..Inner matrix dimensions must agree.
although i changed the way of writing it like adding dot and changing parentheses. Where x=0:pi/100:pi/2
I hope you can help me with this.
Thank you.
0 Kommentare
Akzeptierte Antwort
Wayne King
am 25 Jul. 2014
x = 0:.01:5;
y = (3*sin(x).*cos(x))./((sin(x).^3)+(cos(x)).^3);
0 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Matrix Indexing 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!