does plotting work on large no of values

1 Ansicht (letzte 30 Tage)
ali hassan
ali hassan am 3 Dez. 2020
Beantwortet: KSSV am 3 Dez. 2020
actually plotting is not working on large number of values. need any expert
code:
t=linspace(0.0000000000000001,0.0000000000001,100000000);
[minval ind]=min(t)
[maxval ind1]=max(t)
size(t)
xs=randn(1,100000000);
subplot(3,1,1)
plot(t,xs)

Akzeptierte Antwort

KSSV
KSSV am 3 Dez. 2020
Why it will not work? First try with less number of points. You ave taken a huge number of points.
clc; clear all ;
m = 100 ; % change this number
t=linspace(0.0000000000000001,0.0000000000001,m);
[minval ind]=min(t) % This is not required. This is nothing but t(1)
minval = 1.0000e-16
ind = 1
[maxval ind1]=max(t) % this is not required. This is nothing but t(end)
maxval = 1.0000e-13
ind1 = 100
size(t) % this would be 1*m
ans = 1×2
1 100
xs=randn(1,m);
% subplot(3,1,1) % why subplot?
plot(t,xs)

Weitere Antworten (0)

Kategorien

Mehr zu Historical Contests 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