I have a table of phase and amplitude in a excel sheet...i want to plot a graph of phase vs amplitude......... can anyone tell me how i do it ?

1 Ansicht (letzte 30 Tage)
PLease anyone?
  4 Kommentare
KSSV
KSSV am 2 Sep. 2016
Are you expecting the plot like the picture attached from the xls data given?
L K
L K am 2 Sep. 2016
No,for the database which i will be getting , i want some thing like this.
I have attached the file.

Melden Sie sich an, um zu kommentieren.

Akzeptierte Antwort

KSSV
KSSV am 2 Sep. 2016
I don't about the last attached image...but with your phase amp.png and attached xl file. Run the below code.
clc; clear all
file = 'example_alumi.xlsx' ;
[num,txt,raw] = xlsread(file) ;
phase = num(:,1) ;
amp = num(:,2) ;
loop = linspace(-10,10,length(num));
figure
subplot(211)
plot(loop,amp,'r')
ylabel('Aplitude')
subplot(212)
plot(loop,phase,'b')
ylabel('Phase Shift')
xlabel('loop')

Weitere Antworten (0)

Kategorien

Mehr zu 2-D and 3-D 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