필터 지우기
필터 지우기

scan elements one-by-one

조회 수: 2 (최근 30일)
Kugen Raj
Kugen Raj 2012년 3월 6일
댓글: Image Analyst 2022년 12월 5일
lets say i have a data:
p1=34 35 36 37 38 75 76 77 78 79 80. p2=42 43 44 45 46 47 82 83 84 85 86
i now have to do (75-38) in p1 set and (82-47) in p2 set. how can I do this not by using just the vector subtraction.

답변 (5개)

Sean de Wolski
Sean de Wolski 2012년 3월 6일

Thomas
Thomas 2012년 3월 6일
a1=max(diff(p1));
a2=max(diff(p2));

Image Analyst
Image Analyst 2012년 3월 6일
Answering you as directly as possible:
answerForP1 = p1(6) - p1(5);
answerForP2 = p2(7) - p2(6);
Not sure why you asked about those elements only, or how that relates to your subject line about scanning, so you might want to clarify.
  댓글 수: 1
Kugen Raj
Kugen Raj 2012년 3월 6일
actually i need to calculate the 3db beamwidth for a beam pattern. I have the value for p(1,360). im looping the beamwidth calculation for 100 times. so, i will have to find the -3db value in each round of loop and calculate the beamwidth. for each round of loop, i will get some velue for P:
p=20*log10(YY/max(YY));normalized power
xx=round(p);rounding the p value
P=find(xx==-3);find the -3db value
P=44 45 46 74 75 287 288 316 317 318.
so, now i need to do the (74-46) for the 1st peak and (316-288) for the 2nd peak. this is why i need a way to do the calculation to perform the subtraction.

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


Pruthvirajsinh
Pruthvirajsinh 2022년 12월 5일
Please write a Matlab function to print the following Table. Your function should reproduce this table with exactly the same format, including of space length and word alignment.
Day Monday Tuesday Wednesday Thursday Friday Temp 78 80 84 73 56 Wind 8.6 7.9 5.2 3.6 8.2 Pressure 1.01e5 1.03e5 1.12e5 1.25e5 1.09e5
  댓글 수: 1
Image Analyst
Image Analyst 2022년 12월 5일
You posted your homework as an "Answer" to a totally unrelated question. I'll give you a few minutes to create your own answer then I will delete this post that you posted in error.
This looks like a homework problem. If you have any questions ask your instructor or read the link below to get started:
Obviously we can't give you the full solution because you're not allowed to turn in our code as your own.

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


Pruthvirajsinh
Pruthvirajsinh 2022년 12월 5일
Day Monday Tuesday Wednesday Thursday Friday Temp 78 80 84 73 56 Wind 8.6 7.9 5.2 3.6 8.2 Pressure 1.01e5 1.03e5 1.12e5 1.25e5 1.09e5

카테고리

Help CenterFile Exchange에서 Multidimensional Arrays에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by