How to use imagesc command?
显示 更早的评论
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.
回答(1 个)
Walter Roberson
2016-4-4
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 个评论
Ankit Shukla
2016-4-4
编辑:Walter Roberson
2016-4-4
Walter Roberson
2016-4-4
pcolor(t, f, 10*log10(p))
or, keep your current plotting code and add
view(2)
Ankit Shukla
2016-4-5
Walter Roberson
2016-4-5
Which of the "this" shows a black figure?
You might need
pcolor(t, f, 10*log10(p), 'edgecolor', 'none')
类别
在 帮助中心 和 File Exchange 中查找有关 Line Plots 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

