Plotting Only Purely Real Sections of function with fimplicit
显示 更早的评论
I am plotting an implicit function that only contains values within a very specific range of values. For better or worse, MatLab is also able to calculate this function in regions where it is complex, however, I am not interested in any of these solutions. I understand if instead of using fimplicit I instead can create an array of values which I know solutions should be in, then use those to find the other variables and just use plot, but I was wondering if anyone knew of anyways to plot only the purely real portions of the function.
Note: Currently MatLab is plotting all the real components of the function, but this means that there are sections where there are also imaginary components that are being ignored, I would just like to plot the parts of the function that are purely real.
I appreciate any help, thanks!
2 个评论
Currently MatLab is plotting all the real components of the function, but this means that there are sections where there are also imaginary components that are being ignored
I'm skeptical of that, based on the following example. In this example, f(x,y) has a zero real component and non-zero imaginary component for all y=x<=0, but fimplicit does not include that region in the plot.
f=@(x,y) (y-x) +1i*(x<=0).*x.^2;
f(-1,-1)
fimplicit(f,[-2,2])
Andrew
2023-9-19
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Logical 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
