|
On Oct 18, 12:45 pm, nordmoon <ariana...@gmail.com> wrote:
> Hi,
>
> I have a question about plotting. Can you somehow set the x-axis to the interval that you want it to show?
>
> Like its calculating from x = 1e11 x = 1e28, but you want it to only show result (when plotting) with x = 1e14 x 1e15.
>
> When I plot my result I have zero in y for above x = 1e15
> but something happens in x = 1e15 range when zooming in that I want to display.
>
> I tried to only calculate between this range but I got the same figure with almost zero and at the beginning something happens when zoming in. What is this so?
>
> My x matrix (I have commented out some parts):
>
> n = [%1e+008;2e+008;3e+008;4e+008;8e+008;6e+008;7e+008;8e+008;9e+008;
> % 1e+009;2e+009;3e+009;4e+009;5e+009;6e+009;7e+009;8e+009;9e+009;
> % 1e+010;2e+010;3e+010;4e+010;5e+010;6e+010;7e+010;8e+010;9e+010
> % 1e+011;2e+011;3e+011;4e+011;5e+011;6e+011;7e+011;8e+011;9e+011;
> % 1e+012;2e+012;3e+012;4e+012;5e+012;6e+012;7e+012;8e+012;9e+012;
> 1e+013;2e+013;3e+013;4e+013;5e+013;6e+013;7e+013;8e+013;9e+013;
> 1e+014;2e+014;3e+014;4e+014;5e+014;6e+014;7e+014;8e+014;9e+014;
> 1e+015;2e+015;3e+015;4e+015;5e+015;6e+015;7e+015;8e+015;9e+015;
> 1e+016;2e+016;3e+016;4e+016;5e+016;6e+016;7e+016;8e+016;9e+016;
> 1e+017;2e+017;3e+017;4e+017;5e+017;6e+017;7e+017;8e+017;9e+017 ];
> % 1e+018;2e+018;3e+018;4e+018;5e+018;6e+018;7e+018;8e+018;9e+018;
> % 1e+019;2e+019;3e+019;4e+019;5e+019;6e+019;7e+019;8e+019;9e+019;
> % 1e+020;2e+021;3e+021;4e+021;5e+021;6e+021;7e+021;8e+021;9e+021;
> % 1e+022;2e+022;3e+022;4e+022;5e+022;6e+022;7e+022;8e+022;9e+022;
> % 1e+023;2e+023;3e+023;4e+023;5e+023;6e+023;7e+023;8e+023;9e+023;
> % 1e+024;2e+024;3e+024;4e+024;5e+024;6e+024;7e+024;8e+024;9e+024;
> % 1e+025;2e+025;3e+025;4e+025;5e+025;6e+025;7e+025;8e+025;9e+025;
> % 1e+026;2e+026;3e+026;4e+026;5e+026;6e+026;7e+026;8e+026;9e+026;
> % 1e+027;2e+027;3e+027;4e+027;5e+027;6e+027;7e+027;8e+027;9e+027;
> % 1e+028;2e+028;3e+028;4e+028;5e+028;6e+028;7e+028;8e+028;9e+028];
------------------------------------------------------
Where's your "y" array? Where's your zooming code?
Can't you just plot the part of the array where x>=1e15?
x = [
1e+013;2e+013;3e+013;4e+013;5e+013;6e+013;7e+013;8e+013;9e+013;
1e+014;2e+014;3e+014;4e+014;5e+014;6e+014;7e+014;8e+014;9e+014;
1e+015;2e+015;3e+015;4e+015;5e+015;6e+015;7e+015;8e+015;9e+015;
1e+016;2e+016;3e+016;4e+016;5e+016;6e+016;7e+016;8e+016;9e+016;
1e+017;2e+017;3e+017;4e+017;5e+017;6e+017;7e+017;8e+017;9e
+017 ];
y = rand(size(x, 1), 1);
subplot(2,1,1);
loglog(x(1:end), y(1:end))
title('All x');
subplot(2,1,2);
firstX = find(x>=1e15, 1, 'first')
loglog(x(firstX:end), y(firstX:end))
title('Only x >= 1e15');
|