d = 10;
f=linspace(0,10^9);
k = 0 : 0.01 : 10;
x={cos(k.*d)+((111.0)./(2.*k))}*{(sin(k.*d))};
Y=ceil(x);
subplot(121),
xlabel({'frequency','(in GHz)'})
ylabel({'RHS of the equation','([cos(k*d)+(111.11/2k)*sin(k*d)])'})
plot(f,Y);

댓글 수: 1

ashish nehra
ashish nehra 2014년 11월 19일
편집: ashish nehra 2014년 11월 19일
@ per isakson:---> I am getting an error showing:-
Undefined function 'mtimes' for input arguments of type 'cell'.

댓글을 달려면 로그인하십시오.

 채택된 답변

the cyclist
the cyclist 2014년 11월 19일

0 개 추천

That error is due to the fact that you enclosed the expression for x in {}, which makes it into a cell array. (It is not just like an extra set of parentheses.)
You also missed a spot using ".*" instead of "*'.
Finally, you were plotting against f against Y, which were different length vectors. I plotted k against Y instead, and the whole code runs now, but I am not sure it is what you intended.
d = 10;
f=linspace(0,10^9);
k = 0 : 0.01 : 10;
x=(cos(k.*d)+((111.0)./(2.*k))).*((sin(k.*d)));
Y=ceil(x);
subplot(121),
xlabel({'frequency','(in GHz)'})
ylabel({'RHS of the equation','([cos(k*d)+(111.11/2k)*sin(k*d)])'})
plot(k,Y);

댓글 수: 2

ashish nehra
ashish nehra 2014년 11월 19일
Heyy now how do i find the cos inverse of the RHS of the above plot ??
ashish nehra
ashish nehra 2014년 11월 19일
how to find the cos inverse of (x) in the question..??

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

태그

질문:

2014년 11월 19일

댓글:

2014년 11월 19일

Community Treasure Hunt

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

Start Hunting!

Translated by