Réponse apportée
When I use App Designer writetable I include VarNames and RowNames but the A1 cell says "row" when I would want it to say "distance"
global LineNumber filename=sprintf(InputFile,LineNumber); x=round(3.5:3:60.5,1); Names = sprintfc('%.1f In.',x); RNames = ...

environ 4 ans il y a | 0

| A accepté

Réponse apportée
How to plot the mean value of each year in one point only ( EACH 1st july ) ?
Looks like a lot of extra work going on here--without the actual file we can't tell for sure, but one would presume the dates ar...

environ 4 ans il y a | 0

| A accepté

Réponse apportée
Merge Rows in Table with One Categorical Variable and One Numeric; Average the Numeric
S=categorical([["A", "B"];["A", "B"];["C", "B"];["W", "T"]]); V=[52;65;35;25]; tT=table(S,V); [~,~,ia]=unique(tT.S,'rows'); ...

environ 4 ans il y a | 0

Réponse apportée
Using fscanf to correctly store them in a struct and go to the next patient
My approach would begin something like P=readlines('Patients_Data.txt'); % read the file as string array ixN...

environ 4 ans il y a | 0

Réponse apportée
How to plot each row of a MxN array as one value
Looks like hL=stairs(z*2.^(2:-1:0).'); yticks([0:2:6]) yticklabels(dec2bin(yticks,3)) otta' do it... That plots against ord...

environ 4 ans il y a | 0

| A accepté

Réponse apportée
Replace Duplicate Row Value in Matrix with other value of the matrix to create unique combination row wise
There doesn't seem any reason to pick one possibility over another other than arbitrarily so one approach would be something lik...

environ 4 ans il y a | 0

Réponse apportée
Replacing Specific Elements in an Array
I'd suggest it's not good practice to create four separate named variables; use a cell array or a 3D array instead. But, to cre...

environ 4 ans il y a | 0

Réponse apportée
My column and row names are not transferring to Excel when I use writetable on App Designer
Read the writetable doc -- writetable(t,filename,'writevariablenames',1) There are many other options available as well, see t...

environ 4 ans il y a | 0

| A accepté

Réponse apportée
how to decimate signal with fs 44100 into fs10k
decimate does what the name says -- sets a factor of n fewer samples. You're looking for resample instead d_x=resample(x,10.0,...

environ 4 ans il y a | 0

Réponse apportée
Looping with datetime greater and less than 24 hour
Since indeed mod() doesn't do what is wanted here for negative hours, I'll go ahead and post the alternative way that's akin to ...

environ 4 ans il y a | 0

Réponse apportée
Display all rows between two ranges
You're on the right (no "w" in this type of "right" in English) track -- just use the locations you found as indices -- exceptin...

environ 4 ans il y a | 1

| A accepté

Réponse apportée
How to get the number in the cell containing the letter and space
>> str2double(extractAfter(a,' ')) ans = 1001 1101 1201 1301 1401 >> ADDENDUM: ...

environ 4 ans il y a | 1

Réponse apportée
Remove a set of intervals from an array
That's the brute force way to code it and use MATLAB, but yes, it's just array indexing % delete the rows identified -- looping...

environ 4 ans il y a | 1

Réponse apportée
How do I Vectorize the for loop containing if else statements?
In if (TREG > L) == 1 the "== 1" is superfluous, remove it. The result of a logical expression is 0/1 and if compares to 1 fo...

environ 4 ans il y a | 1

| A accepté

Réponse apportée
Can you please explain why do we do this code?
To illustrate how NOT to write MATLAB code, apparently... The person responsible for this wanted a Nx2 vector of the two member...

environ 4 ans il y a | 0

Réponse apportée
How to interpret the reading of seconds in matlab?
OK, I couldn't stand the suspense... :) tT=readtable('EXPERİMENT_SU8.xlsx','Sheet',3,'Range','A2142:A5799','ReadVariableNames',...

environ 4 ans il y a | 0

| A accepté

Réponse apportée
How to interpret the reading of seconds in matlab?
The discussion of the file format aside, I thought that was the issue in converting to times initially and didn't notice the iss...

environ 4 ans il y a | 0

Réponse apportée
Delete specific rows in excel
Use read/writematrix instead data=readmatrix('text.xlsx'); writematrix(nan(size(data)),'test.xlsx',"WriteMode",'inplace','Rang...

environ 4 ans il y a | 1

| A accepté

Réponse apportée
How to write string in .CSV format?
A=1; B=2; e=4; Name='data stored'; Input_data={A B e Name}; writecell(Input_data,'input.csv','Delimiter',',','QuoteStrin...

environ 4 ans il y a | 0

Réponse apportée
Dialog box creation and mixing text/list boxes
There is no such combination uicontrol in MATLAB; but somebody else has already done the heavy lifting for you.. <fileexchange/...

environ 4 ans il y a | 0

Réponse apportée
How to use if statement to add if negative and minus if positive
PM180=P-sign(P)*180;

environ 4 ans il y a | 0

| A accepté

Réponse apportée
Extraction of frequencies and there indices from FFT graph ( for DTMF Detection)
>> Y=abs(fftshift(X1)); >> [pk,fpk]=findpeaks(Y,f_range) pk = 1156.37 1132.03 1132.03 1156.37 fpk =...

environ 4 ans il y a | 1

| A accepté

Réponse apportée
"Column Vector" XTick labels
I don't think so with the tick labels(*), but you can write them with text as v1=[0:2];v2=[2:-1:0]; for i=1:3 xtl(i)=cellst...

environ 4 ans il y a | 0

Réponse apportée
print value to matrix
nIter=YourNumberOfTotalIterations; nRows=20; V=zeros(nRows,nIter); % preallocate for i=1:nIter V(:,i)=YourF...

environ 4 ans il y a | 0

Réponse apportée
Change of marker size and color of a fitted plot
The specialized version of plot for use with a fit object doesn't know about all the regular data plot function; it has only a s...

environ 4 ans il y a | 1

| A accepté

Réponse apportée
stacked bar graph from 3 columns
For 'stacked' the columns are sum of rows; there are as many bars as rows. So, if your data array above is XYZ, then Z=reshape...

environ 4 ans il y a | 0

| A accepté

Réponse apportée
Reading and plotting synchrotron data
Where does the 20000 come from? Is that how many observations/measurements are in each of the 512 files, I guess? Doesn't seem...

environ 4 ans il y a | 0

Réponse apportée
Splitting table text column with multiple delimiters based on parantheses.
A rudeness about way the string functions are implemented -- they won't return variable numbers of elements that would be extrem...

environ 4 ans il y a | 0

Réponse apportée
Locate values in dataset and output the corresponding time column
ix=find(diff(sign(x))==-2)-1;

environ 4 ans il y a | 0

Réponse apportée
Set x-axis tick labels in subplots
There's nothing in that code to rotate the x axis labels that must be in the previous three. As general comment, would be bette...

environ 4 ans il y a | 0

Charger plus