フィルターのクリア

Plot intersections on a question I was given.

1 回表示 (過去 30 日間)
James Harrison
James Harrison 2020 年 11 月 2 日
回答済み: Gouri Chennuru 2020 年 11 月 6 日
Question 1.
Write z=peaks followed by lines of code in a script file, that plots row and column cross sections through z where the minimum and maximum values of z are.
I was given this question. I have got myself an answer, but I am not 100% sure if i've actually done what the question asked. I previously worked out the minimum value of z to be located at (27,12) and the maximum at (25,38). I then proceeded to do this:
z = peaks
hold on
plot(z(:,27));
plot(z(12,:));
plot(z(:,25));
plot(z(38,:));
hold off
This created me a 4 graphs which to my knowledge are the intersects of z.
Any help would be great, many thanks.

回答 (1 件)

Gouri Chennuru
Gouri Chennuru 2020 年 11 月 6 日
Hi,
As per my understanding,
Z= peaks returns a 49*49 double array,
Using the minimum and maximum values provided, you have created a 2-D plot from the Z array.
hold on
plot(z(:,27));
plot(z(12,:));
plot(z(:,25));
plot(z(38,:));
hold off
From the 2-D plot you can obtain the intersects of Z.

カテゴリ

Help Center および File ExchangeFilter Analysis についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by