problem with tbl,xvar,yvar form of plot()
Greetings, as per title i have a problem with tbl,xvar,yvar form of plot().
I have an array with history of the evolution of the parameters of a function during parameter optimization.
num_iterations = size(param_history, 1);
num_chains = size(param_history, 2);
num_dimensions = size(param_history, 3);
param_at_step = zeros(num_iterations, num_chains * num_dimensions);
The array is of the form 10000×8 – 10k iterations by 2 parameters for each of the 4 independent optimization chains. I expected:
for iteration = 1 : num_iterations
for chain_id = 1 : num_chains
for param = 1 : num_dimensions
column = ((chain_id-1) * 2) + param;
param_at_step(iteration, column) = param_history(iteration, chain_id, param);
end
end
end
plot( param_at_step, [1 3 5 7], [2 4 6 8] );
to plot the evolution of the parameters in the parameter space, but i get an error:
Error using plot
Specify the coordinates as vectors or matrices of the same size, or as a vector and a matrix that share the same length in at least one dimension.
I am confused, what am I doing wrong?Greetings, as per title i have a problem with tbl,xvar,yvar form of plot().
I have an array with history of the evolution of the parameters of a function during parameter optimization.
num_iterations = size(param_history, 1);
num_chains = size(param_history, 2);
num_dimensions = size(param_history, 3);
param_at_step = zeros(num_iterations, num_chains * num_dimensions);
The array is of the form 10000×8 – 10k iterations by 2 parameters for each of the 4 independent optimization chains. I expected:
for iteration = 1 : num_iterations
for chain_id = 1 : num_chains
for param = 1 : num_dimensions
column = ((chain_id-1) * 2) + param;
param_at_step(iteration, column) = param_history(iteration, chain_id, param);
end
end
end
plot( param_at_step, [1 3 5 7], [2 4 6 8] );
to plot the evolution of the parameters in the parameter space, but i get an error:
Error using plot
Specify the coordinates as vectors or matrices of the same size, or as a vector and a matrix that share the same length in at least one dimension.
I am confused, what am I doing wrong? Greetings, as per title i have a problem with tbl,xvar,yvar form of plot().
I have an array with history of the evolution of the parameters of a function during parameter optimization.
num_iterations = size(param_history, 1);
num_chains = size(param_history, 2);
num_dimensions = size(param_history, 3);
param_at_step = zeros(num_iterations, num_chains * num_dimensions);
The array is of the form 10000×8 – 10k iterations by 2 parameters for each of the 4 independent optimization chains. I expected:
for iteration = 1 : num_iterations
for chain_id = 1 : num_chains
for param = 1 : num_dimensions
column = ((chain_id-1) * 2) + param;
param_at_step(iteration, column) = param_history(iteration, chain_id, param);
end
end
end
plot( param_at_step, [1 3 5 7], [2 4 6 8] );
to plot the evolution of the parameters in the parameter space, but i get an error:
Error using plot
Specify the coordinates as vectors or matrices of the same size, or as a vector and a matrix that share the same length in at least one dimension.
I am confused, what am I doing wrong? plot, array MATLAB Answers — New Questions