How to use imagesc command?
조회 수: 11 (최근 30일)
이전 댓글 표시
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.
댓글 수: 0
답변 (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
Walter Roberson
2016년 4월 5일
Which of the "this" shows a black figure?
You might need
pcolor(t, f, 10*log10(p), 'edgecolor', 'none')
참고 항목
카테고리
Help Center 및 File Exchange에서 Line Plots에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

