Answered

How to plot a histogram along a curve

Oh. That's much more understandable, thanks. Something like histogram2(x.',y.','Normalization','pdf','FaceColor','flat') col...

How to plot a histogram along a curve

Oh. That's much more understandable, thanks. Something like histogram2(x.',y.','Normalization','pdf','FaceColor','flat') col...

alrededor de 17 horas ago | 1

Answered

Insert value for the last day of the year

May be a neat way with the builtin datetime lookup functions, but first thing that comes to mind is isyrlast=false(size(dates))...

Insert value for the last day of the year

May be a neat way with the builtin datetime lookup functions, but first thing that comes to mind is isyrlast=false(size(dates))...

1 día ago | 1

| accepted

Answered

Summing values together until certain value is reached - then repeat - and plot

Not fully coded, but the idea should work to build loop... t=readtable('tarmo.dat','HeaderLines',1); t.Var1=strrep(t.Var1,''''...

Summing values together until certain value is reached - then repeat - and plot

Not fully coded, but the idea should work to build loop... t=readtable('tarmo.dat','HeaderLines',1); t.Var1=strrep(t.Var1,''''...

4 días ago | 0

Answered

Geomean on returns with negative values?

Use GR=100*(prod(1+R/100)^(1/numel(R))-1); where R is the rate of return for the period. Example: >> R=[9 1 2 3 -1]; ...

Geomean on returns with negative values?

Use GR=100*(prod(1+R/100)^(1/numel(R))-1); where R is the rate of return for the period. Example: >> R=[9 1 2 3 -1]; ...

6 días ago | 1

| accepted

Answered

Linear fit to log x axis scatter and correlation calculation

You forgot to attach the data so made something up... x=1:10; y=sort(lognrnd(10,1,1,10)); b=polyfit(x,log10(y),1); yf=10.^po...

Linear fit to log x axis scatter and correlation calculation

You forgot to attach the data so made something up... x=1:10; y=sort(lognrnd(10,1,1,10)); b=polyfit(x,log10(y),1); yf=10.^po...

6 días ago | 0

Answered

Matlab Number Precision Affects the Results

Use ismembertol instead. And read up on floating point precision at <What Need to Know About Floating Point>

Matlab Number Precision Affects the Results

Use ismembertol instead. And read up on floating point precision at <What Need to Know About Floating Point>

6 días ago | 1

Answered

How to do Table Look-up?

If all observations are extant but just missing some timesteps, then vars=unique(data(:,1),'stable'); % unique variable name...

How to do Table Look-up?

If all observations are extant but just missing some timesteps, then vars=unique(data(:,1),'stable'); % unique variable name...

7 días ago | 0

Answered

how to plot to get four plots of descriptive statistics in one figure

Revised to use the real data and the fitted statistics...as noted above, you can't represent these distributions at all fairly b...

how to plot to get four plots of descriptive statistics in one figure

Revised to use the real data and the fitted statistics...as noted above, you can't represent these distributions at all fairly b...

8 días ago | 0

Answered

Importing data with unequal number of column

The problem is the file has embedded \n in what should be unbroken records. Whether this came from the original creation of the...

Importing data with unequal number of column

The problem is the file has embedded \n in what should be unbroken records. Whether this came from the original creation of the...

8 días ago | 0

Answered

How do i get my code to read the updated csv table instead of the old table?

It would be better to follow IA's suggestion of fixing the grades in memory and updating the file, but... Your logic error here...

How do i get my code to read the updated csv table instead of the old table?

It would be better to follow IA's suggestion of fixing the grades in memory and updating the file, but... Your logic error here...

8 días ago | 0

Answered

Extracting second number after comma within parenthesis

Slightly modified version following IA's direction using newer string parsing functions that can do much of what regexp expressi...

Extracting second number after comma within parenthesis

Slightly modified version following IA's direction using newer string parsing functions that can do much of what regexp expressi...

8 días ago | 1

Answered

Make entries of first row and column of matrix all equal to zero.

Modestly different approach...instead of having to clear row/column, just don't write into them to start with: N=10; ...

Make entries of first row and column of matrix all equal to zero.

Modestly different approach...instead of having to clear row/column, just don't write into them to start with: N=10; ...

9 días ago | 0

Answered

how to plot to get four plots of descriptive statistics in one figure

You haven't kep the underlying data in the summary statistics so can't do the histogram from those statistics alone. It's simpl...

how to plot to get four plots of descriptive statistics in one figure

You haven't kep the underlying data in the summary statistics so can't do the histogram from those statistics alone. It's simpl...

9 días ago | 0

| accepted

Answered

Create an Array with zeroes and sevens

function charge=chargeprofile(start,chargetime,kW) % return charging profile for half hour increments over 24-hr day % given s...

Create an Array with zeroes and sevens

function charge=chargeprofile(start,chargetime,kW) % return charging profile for half hour increments over 24-hr day % given s...

9 días ago | 0

Answered

Performing operations on non-uniform data

t=timetable(datetime(final_data(:,1),'ConvertFrom','posixtime'),final_data(:,2)); % build timetable t20=retime(t,'regular','ne...

Performing operations on non-uniform data

t=timetable(datetime(final_data(:,1),'ConvertFrom','posixtime'),final_data(:,2)); % build timetable t20=retime(t,'regular','ne...

10 días ago | 1

Answered

Changing properties of several lines in a plot containing hundreds of lines

Save the line handles when you plot... [T,X]=odexx(...) hL=plot(T,X); ix=find(X(end,:)>0.01); set(hL(ix),'LineWidth',2) ...

Changing properties of several lines in a plot containing hundreds of lines

Save the line handles when you plot... [T,X]=odexx(...) hL=plot(T,X); ix=find(X(end,:)>0.01); set(hL(ix),'LineWidth',2) ...

10 días ago | 1

| accepted

Answered

How to read a binary file with below description?

Well, one can take a stab at it assuming is compatible w/ most common desktop architecture at the moment and see if it works or ...

How to read a binary file with below description?

Well, one can take a stab at it assuming is compatible w/ most common desktop architecture at the moment and see if it works or ...

11 días ago | 0

Question

Save Open State in Editor???

Is there no preferences option to have editor reload previous state w/o having to open each and every file again? Very rude beh...

11 días ago | 1 answer | 0

Answered

How to convert each row in a cell array to a (1*n ) double matrix?

Use the dual representation of char() data as numeric that MATLAB will cast silently... c=[{'0011'}, {[ ]}, {'1010'}, {[ ]}, {[...

How to convert each row in a cell array to a (1*n ) double matrix?

Use the dual representation of char() data as numeric that MATLAB will cast silently... c=[{'0011'}, {[ ]}, {'1010'}, {[ ]}, {[...

11 días ago | 0

Answered

How to use hold command with Plotyy and Subplot?

Ver 2 [y,t]=xlsread('Sample Data.xlsx'); t=datetime(t(2:end,1),'inputformat','MM/dd/uuuu','format','MMM yy'); mos=(year(t(end...

How to use hold command with Plotyy and Subplot?

Ver 2 [y,t]=xlsread('Sample Data.xlsx'); t=datetime(t(2:end,1),'inputformat','MM/dd/uuuu','format','MMM yy'); mos=(year(t(end...

12 días ago | 0

| accepted

Answered

How to use hold command with Plotyy and Subplot?

Using the features TMW has given us more recently...in particular, datetime and yyaxis along with using some data organization b...

How to use hold command with Plotyy and Subplot?

Using the features TMW has given us more recently...in particular, datetime and yyaxis along with using some data organization b...

13 días ago | 0

Answered

Is it possible to create x tick labels with a fixed width

AFAIK, no, that's an amenity TMW hasn't yet provided with the ticklabel property. It's a very simple text string with formattin...

Is it possible to create x tick labels with a fixed width

AFAIK, no, that's an amenity TMW hasn't yet provided with the ticklabel property. It's a very simple text string with formattin...

13 días ago | 0

Answered

How to select the part of the tables in a cell?

N1=98; C=cellfun(@(t) t(N1:end,:),C,'uni',0);

How to select the part of the tables in a cell?

N1=98; C=cellfun(@(t) t(N1:end,:),C,'uni',0);

14 días ago | 1

| accepted

Answered

how to create a numeric tick label offset

x=[384230 384231 284232 ...]; X0=384200; % offset value -- uses arbitrary origin hL=plot(x-X0,y); ...

how to create a numeric tick label offset

x=[384230 384231 284232 ...]; X0=384200; % offset value -- uses arbitrary origin hL=plot(x-X0,y); ...

16 días ago | 0

| accepted

Answered

Save .xls in certain folder

You saved the variable app.Pedobarography_Values in the file 'Pedobarography_Values.xslx' but by the documentation for xlswrite ...

Save .xls in certain folder

You saved the variable app.Pedobarography_Values in the file 'Pedobarography_Values.xslx' but by the documentation for xlswrite ...

17 días ago | 0

Answered

How to delete axes and tick in figure?

Precisely. As your question says, you're trying to mess with axis properties, not those of the figure. Substitute hAx=gca; ...

How to delete axes and tick in figure?

Precisely. As your question says, you're trying to mess with axis properties, not those of the figure. Substitute hAx=gca; ...

18 días ago | 0

| accepted

Answered

How do you make individual points in a loglog graph appear? I am looking for the slope.

hLL=loglog(melting,temperature,'x-'); % Save line handles; line + marker 'x'

How do you make individual points in a loglog graph appear? I am looking for the slope.

hLL=loglog(melting,temperature,'x-'); % Save line handles; line + marker 'x'

18 días ago | 0

| accepted

Answered

How to read rows of data in .csv file and turn them into arrays?

textscan is record oriented. Your file has sections; you have to read a section, rinse and repeat. Something like fmt1='delay...

How to read rows of data in .csv file and turn them into arrays?

textscan is record oriented. Your file has sections; you have to read a section, rinse and repeat. Something like fmt1='delay...

20 días ago | 0

Answered

error only showing up with one for loop -- can't figure out what the problem is? going crazy?

Unable to perform assignment because the size of the left side is 1-by-1 and the size of the right side is 257-by-1. Error in...

error only showing up with one for loop -- can't figure out what the problem is? going crazy?

Unable to perform assignment because the size of the left side is 1-by-1 and the size of the right side is 257-by-1. Error in...

20 días ago | 0

| accepted

Answered

Minimize cmd.exe window launched from MATLAB?

Use a batch file or multiple command on the executable and START yourbatch /MIN to create the process minimized. Kick this o...

Minimize cmd.exe window launched from MATLAB?

Use a batch file or multiple command on the executable and START yourbatch /MIN to create the process minimized. Kick this o...

21 días ago | 0