how to get values of a square matrix at an degree from center & how to get end points of y
3 ビュー (過去 30 日間)
古いコメントを表示
shubham kumar gupta
2021 年 5 月 12 日
編集済み: shubham kumar gupta
2021 年 5 月 12 日
I have a matrix i.e 400x400
I am at 200,200 now I want to take all values of matrix at an angle
I can think of this but not for any degree? how to do this?
h_180=h(200:400,200);
h_0=h(1:200,200);
h_90=h(200,200:400);
h_270=h(200,200:-1:1);
for phi=0:359
x=[200,200+199*cosd(phi)];
y=[200,200+199*sind(phi)]; % Y how to get end points? as its a square
c(:,phi)=improfile(h,x,y)
end
How to get value of y at the end?
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/616240/image.png)
0 件のコメント
採用された回答
Walter Roberson
2021 年 5 月 12 日
improfile() if you have the Image Procesing Toolbox.
If not, then the code for improfile() is based upon interp2()
0 件のコメント
その他の回答 (0 件)
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!