Réponse apportée
How to Delete certain rows in a Matrix
Use indexing expressions... N1=15; % number to save N2=90; ...

plus de 6 ans il y a | 1

| A accepté

Réponse apportée
How to customize the subplots?
Just make the additional adjustments to axes/line properties in each subplot as you create it. As you've written it, that means...

plus de 6 ans il y a | 1

| A accepté

Réponse apportée
Updating a matrix through a loop
>> nR=sum(m~=0,2); % the number by row nonzero entries >> m(:,any(m(nR==max(nR),:),1))=[] % remove colu...

plus de 6 ans il y a | 0

Réponse apportée
How do I make text color black when using the function insertText
Read the rest of the documentation... 'BoxColor' — Text box color 'yellow' (default) | character vector | cell array of chara...

plus de 6 ans il y a | 1

| A accepté

Réponse apportée
MATLAB showing two equal numbers as not equal to each other
Not remembering floating point rounding. Try principal_stress(1,1) - principal_stress(2,1) and see what the result is. You'l...

plus de 6 ans il y a | 0

Réponse apportée
converts a point in cartesian to cylindrical and spherical cooridantes(error:getting same answer in cylindrical & spherical coordinates)
if x,y > 0 phi = atan(y/x); elseif x,y < 0 phi = atan(y/x)+pi; elseif x>0 && y<0 The if statements are bad syntax ...

plus de 6 ans il y a | 0

| A accepté

Réponse apportée
Indexing dates yearly and quarterly.
Use a timetable and retime with a custom method function.

plus de 6 ans il y a | 1

Réponse apportée
How to plot a histogram along a curve
Well, your data is rather unique (so to speak :) ): I was trying to figure out how you did the opacity thing in knowing the rel...

plus de 6 ans il y a | 0

Réponse apportée
SOLVED: Summing values together until certain value is reached - then repeat - and plot
OK, a working script...I set the setpoint to 250 so would have more than one condition satisfied for testing... tt.Level=zeros(...

plus de 6 ans il y a | 1

| A accepté

Réponse apportée
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...

plus de 6 ans il y a | 1

Réponse apportée
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))...

plus de 6 ans il y a | 1

| A accepté

Réponse apportée
SOLVED: 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,''''...

plus de 6 ans il y a | 1

Réponse apportée
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]; ...

plus de 6 ans il y a | 1

| A accepté

Réponse apportée
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...

plus de 6 ans il y a | 0

Réponse apportée
Matlab Number Precision Affects the Results
Use ismembertol instead. And read up on floating point precision at <What Need to Know About Floating Point>

plus de 6 ans il y a | 1

Réponse apportée
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...

plus de 6 ans il y a | 0

Réponse apportée
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...

plus de 6 ans il y a | 0

Réponse apportée
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...

plus de 6 ans il y a | 0

Réponse apportée
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...

plus de 6 ans il y a | 0

Réponse apportée
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...

plus de 6 ans il y a | 1

Réponse apportée
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; ...

plus de 6 ans il y a | 0

Réponse apportée
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...

plus de 6 ans il y a | 0

| A accepté

Réponse apportée
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...

plus de 6 ans il y a | 0

Réponse apportée
Performing operations on non-uniform data
t=timetable(datetime(final_data(:,1),'ConvertFrom','posixtime'),final_data(:,2)); % build timetable t20=retime(t,'regular','ne...

plus de 6 ans il y a | 1

Réponse apportée
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) ...

plus de 6 ans il y a | 1

| A accepté

Réponse apportée
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 ...

plus de 6 ans il y a | 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...

plus de 6 ans il y a | 1 réponse | 0

1

réponse

Réponse apportée
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'}, {[ ]}, {[...

plus de 6 ans il y a | 0

Réponse apportée
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...

plus de 6 ans il y a | 0

| A accepté

Réponse apportée
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...

plus de 6 ans il y a | 0

Charger plus