Error: Invalid parameter/value pair arguments.
Show older comments
Hi there, this code return (Invalid parameter/value pair arguments ) error. Is there any problem with using 'color'? how can I fix it?
clc
clear
close all
format long g
%% read
fid = xlsread('WINT.csv');
f = fid(:, 1);
for i = 1:size(north)
for j=1
t(i,j)=i;
end
end
Y = fft(f) ;
dt = mean(diff(t)) ;
fs = 1./(dt*24) ;
L = length(f) ;
ft = fs*(0:L/2)/L ;
P2 = abs(Y/L) ;
P1 = P2(1:L/2+1) ;
P1(2:end-1) = 2*P1(2:end-1) ;
P1 = P1.^2 ;
period = (1./ft)/24 ;
freq = 600 ;
figure
plot(ft*1e9, P1, 'color','b')
xlabel('Frequency [nHz]')
ylabel('PSD')
title('Fourier spectrum')
set(gca, 'XScale', 'log')
xline((1/(freq*24*60*60))*1e9,'color',[125,0,251]/255 , [num2str(freq), ' days'])
set(gca, 'YLim', [0, 40])
Accepted Answer
More Answers (0)
Categories
Find more on Graph and Network Algorithms in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!