How can i plot this function? y=0.75/(log10(x)*2).^2
1 回表示 (過去 30 日間)
古いコメントを表示
Lucas Lombao Pascual
2022 年 10 月 31 日
コメント済み: Lucas Lombao Pascual
2022 年 10 月 31 日
Hi, ive been trying differents ways of plotting fuctions such as log, implicit... but i cant manage to plot in 2D the next function in matlab
y= 0.75/(log10(x)*2).^2
0 件のコメント
採用された回答
RAGHUNATHRAJU DASHARATHA
2022 年 10 月 31 日
As per my understanding you want to plot the given function in 2D plot .
It is just that you forgot to add '.' before '/' to do element wise operation.I will explain it with the example below
x=2:10;
y= 0.75./(log10(x)*2).^2
plot(x,y)
その他の回答 (3 件)
Jon
2022 年 10 月 31 日
Something like this?
x = linspace(1,10); % or whatever interval you would like change accordingly
y = 0.75 ./(log10(x).^2).^2 % note .^ for element wise power on log10(x)
figure
plot(x,y)
% Or maybe you want the final power of 2 apply to the numerator and the
% denominator?
y = (0.75 ./(log10(x).^2)).^2
plot(x,y)
0 件のコメント
Mike Croucher
2022 年 10 月 31 日
How about this?
x = linspace(0.01,0.99,100); % Avoid tricky inputs like 1
y = 0.75./(log10(x)*2).^2;
plot(x,y)
0 件のコメント
Torsten
2022 年 10 月 31 日
What do you mean by "in 2D" ? It is a simple function to be plotted y vs. x:
x = 2:0.01:5;
y = 0.75./(log10(x)*2).^2;
plot(x,y)
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!