Community header

Forum

plotting results in ELV

Hermjan Barneveld, modified 4 Years ago.

plotting results in ELV

Rookie Crystal gazer Posts: 10 Join Date: 6/24/20 Recent Posts
when running main_plot I get this message>> main_plot
Unable to perform assignment because the size of the left side is 0-by-400 and the size of the right side is 1-by-400.Error in fig_patch (line 152)
M_all(1:nf-1,:,1    )=output_m.Mak(:,:,:,kt);Error in main_plot (line 24)
fig_patch(dire_in,fig_input)
Any suggestions on what goes wrong and in which input file??
Victor Chavarrias, modified 4 Years ago.

RE: plotting results in ELV

Famous Fortune teller Posts: 97 Join Date: 4/24/20 Recent Posts
Hi, 

The function fig_patch generates a longitudinal profile showing the volume fraction content or mean grain size. This only makes sense in a mixed-size sediment simulation. Your simulation is unisize and hence the error. 

Do not run the script main_plot completely. This scripts shows all the possibilities. Run the section you are interested. In your case, you are interested in fig_level, I pressume. 
Hermjan Barneveld, modified 4 Years ago.

RE: plotting results in ELV

Rookie Crystal gazer Posts: 10 Join Date: 6/24/20 Recent Posts
Thanks, but also if I run only fig_level the same error message appears.
However, I get one chart of bed and water level at t=0.
Victor Chavarrias, modified 4 Years ago.

RE: plotting results in ELV

Famous Fortune teller Posts: 97 Join Date: 4/24/20 Recent Posts
I do not think that is possible, there is not call to variable `Mak` in function `fig_level`. Check that you are not seeing the previous error. 

Anyhow, you can use the functions to see how data is structured and how to get the data and then create your preferred function to plot things in the way you like. Look at the following lines in `fig_level`.

---fig_input.mdv.output_var={'etab','h','time_l'};
output_m=extract_output(path_fold_main,fig_input);
etab=output_m.etab(:,:,:,kt)*unity;
input=struct();
path_file_input=fullfile(path_fold_main,'input.mat');
load(path_file_input); 
v2struct(input.mdv,{'fieldnames','xcen'});
x=xcen*unitx;
plot(x,etab)
---You can also simply load the whole output and input mat-files if they are not too large.