フィルターのクリア

how to write equation in matlab ??

146 ビュー (過去 30 日間)
ajeet verma
ajeet verma 2017 年 8 月 7 日
回答済み: Meghan van Rooyen 2021 年 11 月 30 日
equations and corresponding graph is given in attached file and i am trying like this but unable to find second graph where is wrong,, please help
%reflection function
s = @(x) (1-0.4*(cos(x/100))).*(0<=x & x<=511);
x = linspace(0, 500);
R = s(x);
figure(1)
plot(x,R)
axis([xlim 0 1.5])
% intensity function
f=1/20;
x = linspace(0, 500);
I=@(x) (R(x).*sin(2*pi*f*x));
plot(x,I)
axis([xlim 0 1.5])
  1 件のコメント
Pari Bajalan
Pari Bajalan 2020 年 3 月 21 日
∑3k

サインインしてコメントする。

採用された回答

Torsten
Torsten 2017 年 8 月 7 日
I=@(x) s(x).*sin(2*pi*f*x);
plot(x,I(x))
Best wishes
Torsten.
  8 件のコメント
ajeet verma
ajeet verma 2017 年 8 月 14 日
編集済み: Torsten 2017 年 8 月 14 日
why am i not getting color fringe pattern where am i wrong ?, please help my code is here;
%%trapezoidal color fringes (vertical)
clc;
clear all;
f1=10; % No. of vertical fringes
f2=0; % No. of horizontal fringes
m=1000;
n=1000;
a1 = zeros(m,n) ;
a2 = zeros(m,n) ;
a3 = zeros(m,n) ;
% trapezoidal fringe
imx=8;
imn=2;
T = 20;
s1= @(x) (imx+imn).*((0<=x & x<=T/6)|(x>=5*T/6 & x<=T))...
+(imx+imn*(2-6*x/T)).*(T/6<=x & x<=T/3)...
+(imx).*(T/3<=x & x<=2*T/3)...
+(imx+imn*(6*x/T-4)).*(2*T/3<=x & x<=5*T/6);
s2= @(x) (imx+imn*(6*x/T)).*(0<=x & x<=T/6)...
+(imx+imn).*(T/6<=x & x<=T/2)...
+(imx+imn*(4-6*x/T)).*(T/2<=x & x<=2*T/3)...
+(imx).*(2*T/3<=x & x<=T);
s3= @(x) (imx).*(0<=x & x<=T/3)...
+(imx+imn*(6*x/T-2)).*(T/3<=x & x<=T/2)...
+(imx+imn).*(T/2<=x & x<=5*T/6)...
+(imx+imn*(6-6*x/T)).*(5*T/6<=x & x<=T);
x = linspace(0,20,50);
X = repmat(x, 1000, 20);
I1 = s1(X);
I2 = s2(X);
I3 = s3(X);
% figure(1)
% subplot(131),imshow(I1,[])
% subplot(132),imshow(I2,[])
% subplot(133),imshow(I3,[])
a1=exp(1i*I1);
a2=exp(1i*I2);
a3=exp(1i*I3);
subplot(131),imshow(a1,[]),impixelinfo;
subplot(132),imshow(a2,[]),impixelinfo;
subplot(133),imshow(a3,[]),impixelinfo;
Color=zeros(m,n,3);
Color(:,:,1)=a1;
Color(:,:,2)=a2;
Color(:,:,3)=a3;
figure(2)
imshow(Color),title('vertical fringes'),impixelinfo;
Stephen23
Stephen23 2017 年 8 月 14 日

サインインしてコメントする。

その他の回答 (4 件)

Al Hossain
Al Hossain 2019 年 7 月 13 日
f.JPG
can any one write this form in mat lab

Valerie Cando
Valerie Cando 2021 年 1 月 14 日
For Sheet 1, Creating Formulas:
1. 10 (A1) + 2 (B1) = __ (C1)
2. 10 (A2) - 2 (B2) = __ (C2)
3. 10 (A3) x 2 (B3) = __ (C3)
4. 10 (A4) / 2 (B4) = __ (C4)
5. 10 (A5) ^ 2 (B5) = __ (C5)

Meghan van Rooyen
Meghan van Rooyen 2021 年 11 月 30 日
-2xsin(x^2)+cos(x^2)-((e^sqrt(x))/2sqrt(x))+3x^2-8x=0

Meghan van Rooyen
Meghan van Rooyen 2021 年 11 月 30 日
-2x^2sin(x^2)+cos(x^2)-((e^sqrt(x))/2sqrt(x))+3x^2-8x=0

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by