Réponse apportée
Convert a Complex Number to exponential real
MATLAB has builtin functions abs (or hypot()) and angle() for the above explicit implementations... >> x=complex(2,5); >> cm...

environ 5 ans il y a | 3

Réponse apportée
Extracting elements from one matrix and placing in another
MATLAB assigns the complete array to the LHS without having used subscrpting to indicate you want to place each plane extracted ...

environ 5 ans il y a | 1

Réponse apportée
Listing C: folder contents
"The dir command in the Windows command shell behaves in this way, but that's no reason for the MATLAB command to do the same th...

environ 5 ans il y a | 0

Réponse apportée
How to print strings from a data text file that is in correlation to an indices text file?
Put the indices into a 3D array and just index -- indices(:,:,1)=[1 6 2 3; 3 2 4 0; 1 6 4 7; 0 1 4 7; ... 0 5 ...

environ 5 ans il y a | 0

| A accepté

Réponse apportée
How to improve efficiency when checking for unique combinations of table values?
tFruit=readtable('fruit.txt'); tFruit=tFruit(:,[1:2:end]); tFruit.Properties.VariableNames={'Fruit','Color','Data'}; tFruit.F...

environ 5 ans il y a | 0

| A accepté

Réponse apportée
Removing Leading Spaces before xml tags at each line.
The tool seems to format the file to reflect the XML structure; dunno why it would necessarily hurt, but I don't do such things ...

environ 5 ans il y a | 1

| A accepté

Réponse apportée
How can I solve multiple equations? (Pipeline Design)
function Pc=pipelineExternalPC(d,t,sy) % Usage: % Pc=pipelineExternalPC(d,t,sy) % % returns Pc, pipeline external collapse...

environ 5 ans il y a | 1

| A accepté

Réponse apportée
Define a matrix in terms of kronecker product
>> I=3;N=4; >> kron(ones(1,N),eye(I)) ans = 1 0 0 1 0 0 1 0 0 1 0 0 0 ...

environ 5 ans il y a | 0

Réponse apportée
Scientific notation at y-axis with "ax.YAxis.Exponent"
Well, here's a crude first pass... expn=floor(log10(yticks)); mant=yticks./10.^(expn); lbls=cellstr(num2str([mant;expn].','%d...

environ 5 ans il y a | 0

| A accepté

Réponse apportée
Scientific notation at y-axis with "ax.YAxis.Exponent"
I don't see a user-settable format to force the notation (although I didn't use Yair's getundoc to poke) with arbitrary tick val...

environ 5 ans il y a | 0

Réponse apportée
FFT, dominant frequency doesnt match time domain?
Your problem is simply that the dominant frequency isn't the same as one of the frequency bin midpoints depending on the number ...

environ 5 ans il y a | 2

| A accepté

Réponse apportée
Change one line in Excel file
I'd avoid xlswrite and use writecell instead. Use the 'Range' parameter to put in the right place and not disturb anything else...

environ 5 ans il y a | 0

Réponse apportée
How to find the find the pattern in each row of Matrix?
A=[A;A(3,:)]; % make sure one row has same pattern % the engine B=(A~=0); ...

environ 5 ans il y a | 1

Réponse apportée
How to make segmented regression line and determine the breakpoints?
I've answered this several time in the past, but never think to keep a link... https://www.mathworks.com/matlabcentral/answers/...

environ 5 ans il y a | 0

Réponse apportée
Conditional Scatter plotting based on third data set
>> SX=1*all(M==1)+2*(any(M==2)&any(M==3))+3*all(M==3) SX = 2 1 2 1 3 >> Create categorical variable fr...

environ 5 ans il y a | 0

Réponse apportée
callculating values using cfit object with multiple p values
I don't see any syntax by which to do that with the coefficents for multiple fits stored that way and the doc for cfit explicitl...

environ 5 ans il y a | 0

Réponse apportée
While loop to get a specific section of data
Far easier if you would attach a (small) sample of the dataset, but the general idea would be thresholdUp=1; ...

environ 5 ans il y a | 0

| A accepté

Réponse apportée
How to count "gaps" consisting of designated values in a vector and obtain start and end indices?
v=sprintf('%d',ismember(sample_data_vector,invalid_values)|isnan(sample_data_vector)); iStart=strfind(v,'01')+1; iEnd=strfind(...

environ 5 ans il y a | 0

Réponse apportée
Plotting multiple boxplots in same window...array for each boxplot is not the same length...causing error
Two ways to do it -- Use grouping variables and catenate the data into one long vector-- Data=[BoxSecurity; BoxWidefield_123;...

environ 5 ans il y a | 0

Réponse apportée
Problem with duplicated points in Matlab.
You'll find that numel(unique(data(:,1))) < size(data,1) numel(unique(data(:,2))) < size(data,1) for one or both expressions....

environ 5 ans il y a | 1

| A accepté

Réponse apportée
How to ignore lines in file via rmmissing?
Don't create sequentially-named variables, use the array MATLAB so conveniently provided you... filename1= 'TEST.xlsx' %arxeio ...

environ 5 ans il y a | 0

Réponse apportée
How do i insert seconds in a timeseries data when the frequency of the data is inconsistent?
indx=[0;find(minutes(diff(TT.Time)));height(TT)]; % find change locations indices N=diff(indx); ...

environ 5 ans il y a | 0

Réponse apportée
Confusino regarding statistical tests for given distribution
You need to examine what the default parameters of the function return -- >> [h,p,stats]=chi2gof(data) h = 1.00 p ...

environ 5 ans il y a | 0

Réponse apportée
Designate order of categorical array?
You have to create an ordinal categorical array of the desired ordering of magnitudes to force other than the alphabetic orderin...

environ 5 ans il y a | 1

| A accepté

Réponse apportée
For loop not doing what I want it to
TT=table2timetable(path_data); % convert the table to a time table TT=retime(TT,unique(TT.time),'mean'); % retim...

environ 5 ans il y a | 0

| A accepté

Réponse apportée
frequently used function for table variable
Don't pass a table to your function, have it accept numeric inputs and return same; then just call it with the table names. Muc...

environ 5 ans il y a | 1

Réponse apportée
How to index/address the chart width and height using Position option in Text command?
pos=Geo.Position; % save as array x=pos(1)+pos(3)/2; % midpoint position horizontal y=pos(2)+pos(4)/2; % midpoint position...

environ 5 ans il y a | 1

| A accepté

Réponse apportée
Code to calculate raw moments?
Don't really need a function for that although could wrap in one if desired -- It would just be M=x.^N; NB: N in such an expr...

environ 5 ans il y a | 0

Réponse apportée
How to calculate data higher than monthly mean value for one year data set?
rowfun to the rescue. TT_15.Month=month(TT_15.DT1); % generate grouping variable; rowfun() needs it in table TT_HHWL15=row...

environ 5 ans il y a | 1

| A accepté

Réponse apportée
the goto fortran90 command convert to matlab
OK, came back -- when indent code, the construct is more readily visible -- the two loops are completely independent and the fir...

environ 5 ans il y a | 1

Charger plus