Réponse apportée
How to know the slope and intercept of a straight line in a log log plot and how to connect the data in log log scale by a straight line?
If one is not concerned about stastical estimation but simply the coefficients, then just use b=polyfit(log10(x),log10(y),1); ...

presque 4 ans il y a | 0

Réponse apportée
reading data in loop
But they are .. just that cy_sum(Q) is the single element of the array on each pass and the mean of a single number is the numbe...

presque 4 ans il y a | 0

| A accepté

Réponse apportée
Create time matrix with serial date number and sample rate
Well, what is "tick rate"? If you have a sample rate and number of points, then the sample times are just t=[0:1/Fs:(N-1)/FS...

presque 4 ans il y a | 0

| A accepté

Réponse apportée
Plotting hourly data for every month for 'x' number of years
tData=readtable('test.xlsx'); tData=addvars(tData,year(tData.Date_Time),month(tData.Date_Time),'Before','WaterLevel','NewVariab...

presque 4 ans il y a | 1

| A accepté

Réponse apportée
How to split the numerical data using discretize Function
discretize uses bin edges, not bin centers so your seven values define six bins, not seven, annoying as that is as compared to t...

presque 4 ans il y a | 1

| A accepté

Réponse apportée
How do you load an external datafile using uiopen and then rename workspace variable without copying it?
If you want control over the input process beyond the default action, take control... [file,path]=uigetfile('[path to data...]/...

presque 4 ans il y a | 0

Réponse apportée
How can I filter out specific lines of text with textscan?
Piece o' cake -- but use more recent tools than textscan will simplify coding somewhat... filename = 'filename'; termsRemove=[...

presque 4 ans il y a | 0

| A accepté

Réponse apportée
How can I easily extract element from a big matrix?
Yeah, I'd convert to timetable and reorganize -- something like this Time=datetime(2022,1,1,[0:365*24-1].',0,0); % crea...

presque 4 ans il y a | 1

| A accepté

Réponse apportée
Find the days whose maximum temperature does not exceed 0 ° C
Just select with logical indexing -- you didn't give name of the temp variable so spelling may be different, salt to suit... tZ...

presque 4 ans il y a | 0

| A accepté

Réponse apportée
Thickness of Tick mark
There is no such property for the axes ticks to change individual tick marks -- some possible workarounds (not tried any of thes...

presque 4 ans il y a | 0

Réponse apportée
find a cell that corresponds to a range of values
R=0:0.25:1;R=R.'; z=[0.98;0.74;0.34;0.21;0.10].'; >> [~,~,idx]=histcounts(z,R) idx = 4 3 2 1 ...

presque 4 ans il y a | 0

Réponse apportée
Replace values in a matrice
Seems you're going over and over the same plowed ground here...use logical addressing. isR=isfinite(D); R(isR)=RMC; or isD=i...

presque 4 ans il y a | 0

| A accepté

Réponse apportée
Couldn't exploit axis exponent for log scaled axis.
You'll have to fake it -- as @Voss notes, the effect you observe (none) is by design -- whether was right choice or not is diffe...

presque 4 ans il y a | 0

Réponse apportée
Create an array of numbers
[R0,ixR0]=min(distance_matrix(distance_matrix ~= 0)); x=(1:numel(distance_matrix))-ixR0;

presque 4 ans il y a | 0

Réponse apportée
How can one do this calculation?
Assuming you put it into a table as @Steven Lord suggested, then tHi2=maxk(tData.Temperatures,2,2); tHi2=tHi2(:,2); % get t...

presque 4 ans il y a | 0

| A accepté

Réponse apportée
What is the meaning of position in the code? Why position(2) then position (1)
position is just a dummy argument in the various functions -- and the order required by the <rectangle> function they call is t...

presque 4 ans il y a | 0

Réponse apportée
Unequal left and right sides of matrix
Going at it hard way...use MATLAB vector operations -- M=cornerUlLat-[0:tiledimensions-1].'*delta_lat; % create first vecto...

presque 4 ans il y a | 1

| A accepté

Réponse apportée
Why am I not getting a log scale on my x-axis?
Has nothing to do with log or scale but plot(y2,y3,Color="black",LineStyle="-",LineWidth=1.5) is bad syntax -- the error messa...

presque 4 ans il y a | 0

Réponse apportée
How can I import and read a .plt file?
That's essentially trivial since they're just text files -- to upload one, just rename it ".txt" temporarily; what the name is d...

presque 4 ans il y a | 0

| A accepté

Réponse apportée
Interpolation based on three arrays. Problem: entering values for two parameters to get a third gives me the nearest input data values (no interpolation).
You left out the most important part of the response there and didn't pay attention to one of the comments about use of 'nearest...

presque 4 ans il y a | 0

| A accepté

Réponse apportée
How to use logical indexing to return elements of a signal?
>> whos -file signal Name Size Bytes Class Attributes force_y_r 9607x1 768...

presque 4 ans il y a | 1

Réponse apportée
Plotting with small time values in MATLAB
As above notes, there isn't sufficient precision in the time vector to differentiate between roughly 150 consecutive measurement...

presque 4 ans il y a | 1

Réponse apportée
Matlab lookup table interpolation
OK, the first case with some assumptions... commandhistory M1=repmat([10:10:50].',1,3); M2=repmat([35:10:75].',1,3); K=[1:3...

presque 4 ans il y a | 1

| A accepté

Réponse apportée
Calculate mean of numeric column vector based on repeated rows in a string array
First, don't use a string array to hold the numeric data -- you don't show us how you got to the above, but if it's coming from ...

presque 4 ans il y a | 0

| A accepté

Réponse apportée
Plotting with small time values in MATLAB
AM coffee apparently hadn't yet kicked in...dawned upon me later what you're undobutedly looking for is t=TimeValues1-TimeValue...

presque 4 ans il y a | 1

Réponse apportée
How to build a" "for" cycle to concatenate strings
You're overthinking the problem -- >> N=3; >> compose("VAR%d=",[1:N].') ans = 3×1 string array "VAR1=" "VAR2=" ...

presque 4 ans il y a | 0

Réponse apportée
Add multiple x axis in UIAxes object with app designer
After R2019b, TMW suggests using tiledlayout -- although the example isn't there but at <Graph-with-multiple-x-axes-and-y-axes>....

presque 4 ans il y a | 0

| A accepté

Réponse apportée
variable is not saving in a for loop
"... where is the error. (?)" ... xMax3 = doppler3(index3); yMax3 = pks3; ... overwrites/redefines the two variables in...

presque 4 ans il y a | 1

| A accepté

Réponse apportée
How can I extract data from the following Matlab figure, there are multiple lines.
Already you have them in plot(lambda,Fri(lambda)) if you'll just save ... y(:,i)=Fri(lambda); hL(i)=plot(lambda,y(:,i))...

presque 4 ans il y a | 0

| A accepté

Réponse apportée
in a matrix m, how to select the rows after m(m(:,1)==1,2)
Don't try to play MATLAB golf; use a temporary variable to help... ix=find(m); % ~=0 is implied; only the one eleme...

presque 4 ans il y a | 0

| A accepté

Charger plus