Question

Make distribution visible in scatter plots

I have two vectors, I3 and D, of the size 1000000x1. They are plotted against each other in a scatter plot (see PIplot1) I want...

27 days ago | 1 answer | 0

Question

Same value in two different matrices with different properties.

I have one matrix A an a matrix B. I want to create matrix C. matrix has the same size of A, but with numbers from B. A=[987 58...

1 month ago | 1 answer | 0

Question

How to use a default color in a graph?

Previous figures in my report has the default color (RGB triplets and Hexadecimal color code) [0 0.4470 0.7410] '#0072BD' My...

1 month ago | 1 answer | 0

Question

Matlab plots in Masters thesis

I have two kinds of plots, a histogram and a dotted plot: histogram(x) plot(x,y,'.') I wonder if there is a standard format...

1 month ago | 1 answer | 0

Question

Size of cell changes when calling it from a function?

I am calling a function like this: for z=1:3 if z==1 [GUD,GUDID]=H1(ID2,HHPerson,nBEV,BEV,x,Hcombos,Hous...

2 months ago | 0 answers | 0

Question

Plotting doubles against cells

I have 36 cells in the cell array AAG(36x1) A cell looks like this: AAG{3,1}=1x923 cell={1x757 double 1x726 double 1x761 doub...

2 months ago | 1 answer | 0

Question

Removing values from plot and applying curve

I want to remove the values situated on y=0 and x=0. How can I do this? Is there a way to translate this into a curve somehow? ...

2 months ago | 1 answer | 0

Question

Problem with vertically Concatenating vectors in a function

I have a cell array ABC containing three cells each cell contains a 1x1000 double. What I want is to put every double on top of ...

2 months ago | 2 answers | 0

Question

Problem - vectors must be the same size

I have a function below that put 36 vectors on top of each other. I do this so I can plot it with another vector I3 from another...

2 months ago | 1 answer | 0

Question

How to make a surface plot with colors for three variables

I want to plot how the increase in power demand AAG of households relates to the number of inhabitants AAI. I have 36 houses and...

2 months ago | 0 answers | 0

Question

Showing actual values in colorbar 2D scatter plot

I make a 2D scatter plot through the code below. However my colorbar only shows values 0 to 1, in reality, my values for the col...

2 months ago | 1 answer | 0

Question

Make a scatter plot bigger and ad legend, axis

I have the following scatter plot, created from for loops. I want to make every staple as thick as possible, like so staple 1 an...

2 months ago | 0 answers | 0

Question

Plotting multiple plots in for loop

I have two sets of cells in the cell array AAG cell 1 has 36x1 cells, everyone of these is a 1000x1 double cell2 has 486x1 cel...

2 months ago | 1 answer | 0

Question

Plot 3 variables on 2D plot

I have three variables that are stored like this: The growth in rated power when adding EVs for the combination of 1,2,3...36 h...

2 months ago | 0 answers | 0

Question

Loading multiple files into matlab

I have 36 different .mat files in a folder: AAG1,AAG2,AAG3...AAG36. Each file only contain one variable called 'GUD' I want to ...

2 months ago | 1 answer | 0

Question

Problem with adding integers

I am running 36 functions. At the 17th I get an error at this part of a loop: INCREASE2{oz}=max(HH2+double(Vehicle1{index(1)}...

2 months ago | 2 answers | 0

Question

Sync cell arrays using unique

I have two cells GUD and GUDID, GUD is containing a 1x1000 double and GUDID contains a cell for every element in GUD. I am calc...

2 months ago | 0 answers | 0

Question

Is the RAM memory limiting the output?

My computer has a 64 GB RAM. I recently adjusted the size of my matrices so calculations withing the function H1 is possible (wh...

2 months ago | 1 answer | 0

Question

Reducing memory of variables

I have a 108x108 cell, each cell contains a double of 525600x1, which represents a value for every minute of the year (the valu...

2 months ago | 1 answer | 0

Question

Help with resolving out of memory

I have a function generatin a value (Vehicle) and ID numbers (VID) for vehicles. function[Vehicle,VID]=race(ID, HHPerson,nBEV,B...

2 months ago | 1 answer | 0

Question

Saving output from function in different categories

I have vehicles BEV, the variable can have the value BEVR, BEVU or BEVA. I have households Household, the variable can have the...

2 months ago | 1 answer | 0

Question

Make if statement more readable

I have an if statement that looks like this if numel(intersect(VID1{index(1)},VID2{index(2)}))||numel(intersect(VID2{index(2)}...

2 months ago | 1 answer | 0

Question

Using intersect to compare more than two values in for loop

I have a function: function [IDCELL]=c2(VID1,VID2,,A) for oz=1:nchoosek(9,2) index= A(oz,:); if numel(intersect(VID1...

2 months ago | 0 answers | 0

Question

Intersect for multiple vectors

I have three vectors in a for loop. A=[1 2 3 7]; B=[2 2 4 6]; C=[1 3 2 5]; D=[]; I want to use intersect so that I will avo...

2 months ago | 1 answer | 0

Question

resampling to avoid limit - nchoosek

I am investigating the combination of vehicles and houses. My equation for this is: i=nchoosek(1:numel(VID1),size(Hcombos,2));...

2 months ago | 1 answer | 0

Question

random sampling of all possible combinations

Hi I am investigating the combination of vehicles and houses. House 1 can have one or two vehicles, House 2 can only have one. ...

2 months ago | 0 answers | 0

Question

Using randperm in a loop

I have a 3x3 cell called VID1. I want to find all possible combinations and store them in a matrix. Currently Im using the code...

2 months ago | 2 answers | 0

Question

How to avoid repetition in for loop that is using randi

I have the following loop where I fill IDCELL with different combinations of ID numbers. However, if a combination of ID numbers...

2 months ago | 1 answer | 0

Question

Selecting element at same position in a matrix

VID1 is a 3x3 cell. I choose a value randomly from the cell like thus. ID1=VID1{ randi([1,size(VID1,1)],1), randi([1,size(VID...

2 months ago | 1 answer | 0