How to use imagesc command?

14 Ansichten (letzte 30 Tage)
Ankit Shukla
Ankit Shukla am 4 Apr. 2016
Kommentiert: Walter Roberson am 5 Apr. 2016
Hello.
I am working on a program through which i want to show my power through imagesc command but i don't know how to use imagesc command.This is the programme i am working on and i want to plot the power through imagesc. Help me.
clc; clear;
[hdf,record]=edfread('Vikram-Maze_with-16.12.15.11.50.57.edf');
d=record(3:16,:);
r=d';
c=record';
mrkrs=record(36,:);
m=mrkrs';
n_start=find(m==5);
c_start=find(m==6)-1000;
c_ends=find(m==7);
n_ends=find(m==8);
n1=r(n_start:n_ends,:);
[b,a]=butter(4,[4 12]/64);
d_theta=filter(b,a,r);
power=100*(norm(d_theta(:,1)).^2)/(length(d_theta));
After this i want imagesc graph thorugh which power is to be shown in graph limited in x and y axis. help me ASAP.

Antworten (1)

Walter Roberson
Walter Roberson am 4 Apr. 2016
norm(d_theta(:,1)) is going to be a scalar, so you are calculating power as a scalar.
It looks to me as if d_theta might have 14 columns, so you could potentially create one power per column, but that would only get you a 1 x 14 vector, which does not seem worth using imagesc() for that. But if you want...
d_power = 100 * sum(d_theta.^2) / size(d_theta,1);
imagesc(d_power)
  5 Kommentare
Ankit Shukla
Ankit Shukla am 5 Apr. 2016
this command doesn't works. shows a black figure.
Walter Roberson
Walter Roberson am 5 Apr. 2016
Which of the "this" shows a black figure?
You might need
pcolor(t, f, 10*log10(p), 'edgecolor', 'none')

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu Line Plots finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by