octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #45298] Error when using a plot command inside


From: anonymous
Subject: [Octave-bug-tracker] [bug #45298] Error when using a plot command inside a for cycle
Date: Wed, 10 Jun 2015 21:32:25 +0000
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Firefox/38.0

URL:
  <http://savannah.gnu.org/bugs/?45298>

                 Summary: Error when using a plot command inside a for cycle
                 Project: GNU Octave
            Submitted by: None
            Submitted on: mer 10 giu 2015 21:32:24 UTC
                Category: Plotting
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: Crash
                  Status: None
             Assigned to: None
         Originator Name: Mario
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
                 Release: 4.0.0
        Operating System: Microsoft Windows

    _______________________________________________________

Details:


The following issue will disappear if the entire program is running in debug
mode. After the error description you can find the script:

error: octave_base_value::convert_to_str_internal (): wrong type argument
'<unknown type>'
error: called from
    __line__ at line 117 column 21
    line at line 56 column 8
    __plt__>__plt2vv__ at line 500 column 10
    __plt__>__plt2__ at line 246 column 14
    __plt__>__plt1__ at line 205 column 10
    __plt__ at line 119 column 17
    plot at line 220 column 10
    Check_fase at line 25 column 8
error: octave_base_value::convert_to_str_internal (): wrong type argument
'<unknown type>'
error: called from
    __line__ at line 117 column 21
    line at line 56 column 8
    __plt__>__plt2vv__ at line 500 column 10
    __plt__>__plt2__ at line 246 column 14
    __plt__>__plt1__ at line 205 column 10
    __plt__ at line 119 column 17
    plot at line 220 column 10
    Check_fase at line 25 column 8
error: octave_base_value::convert_to_str_internal (): wrong type argument
'<unknown type>'
error: octave_base_value::convert_to_str_internal (): wrong type argument
'<unknown type>'
error: octave_base_value::matrix_value(): wrong type argument '<unknown
type>'
error: drawnow: A(I,J): row index out of bounds; value 1 out of bound 0


----------------------------------------------------------------
script:

f = 50; %Hz 
w = 2*pi *f;
num_of_samples = 30;
time_d = ([1 : num_of_samples]/num_of_samples*0.01)';

theta_d = w*time_d;
theta_p_120_d = theta_d +2/3*pi;
theta_m_120_d = theta_d -2/3*pi;

ab_sin_b_d = abs(sin(theta_d));
ab_sin_p_120_d = abs(sin(theta_p_120_d));
ab_sin_m_120_d = abs(sin(theta_m_120_d));
plot (time_d,[ab_sin_b_d, ab_sin_p_120_d, ab_sin_m_120_d])

f1_d = ab_sin_b_d;
f2_d = ab_sin_p_120_d;
f3_d = ab_sin_m_120_d;

f_v_d= [ f1_d,f2_d,f3_d];

for idx_1 = 1:3
    for idx_2 = 1:3
       %cross_var (idx_1, idx_2) = trapz(f_v(:,idx_1) .* f_v(:,idx_2));
       figure
       plot(f_v_d(:,idx_1) .* f_v_d(:,idx_2))
       hold on
       plot(f_v_d(:,idx_1))
       plot(f_v_d(:,idx_2))
       mean_var_d (idx_1, idx_2) = mean( f_v_d(:,idx_1) .* f_v_d(:,idx_2));
    end
end

mean_var_d
mean_var_d_pu = mean_var_d /max(max(mean_var_d))







    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?45298>

_______________________________________________
  Messaggio inviato con/da Savannah
  http://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]