How do I get the values of x at y=0.67 and y=0.87
1 次查看(过去 30 天)
显示 更早的评论
x=linspace(0,4,100);
y=zeros(size(x));
p=0.275;
figure
k=2.031;
for i=1:numel(x)
y(i)=(exp(-(p*(x(i)))^k));
end
axis([0 4 0 1.8])
plot(x,y,'--')
xlabel('x')
ylabel('y')
How do I calculate the corresponding x value for any given y value.
0 个评论
回答(2 个)
Rik
2018-2-5
You can reverse the formula with pen and paper (and maybe some Wolfram-Aplha), interpolate with a function like interp1, or solve the equation with solve. The first method doesn't really involve Matlab, and for the latter two the documentation should be self-explanatory. Nonetheless, if you have questions, you should of course feel free to post a comment here.
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Annotations 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!