Issue with fzero command when finding when the 2 curves are first equal.
Show older comments
The 2 pressure curves are:
t = linspace(0, 6, 121);
y1 = 3 * cos(2*t);
y2 = 2 * sin(t)
in the script here is my current code:
function F = h(z);
t = linspace(0, 6, 121);
F(1) = 3/cos(2*t)-2*sin(t);
end
My interval when calling the fzero command will be [0 6].
I know the code is extremely redundant but im getting the error of the indices on the left side are not compatibile with the size of the right side within the function. I was wondering is someone can help me resolve this issue.
Accepted Answer
More Answers (0)
Categories
Find more on Whos in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!