已回答
How are the following methods to compute correlation different?
But if you create T from your two mat arrays as T=[mat1 mat2]: then the results are all the same; if you got something differen...

4 years 前 | 0

| 已接受

已回答
Imported data becomes NaN
opt=detectImportOptions(websave('CA_dvs.xlsx','https://www.mathworks.com/matlabcentral/answers/uploaded_files/1159783/CA_dvs.xls...

4 years 前 | 0

| 已接受

已回答
How to use text command with text left of xline and \rightarrow pointing to xline? Easy to place text right of xline with \leftarrow pointing from beginning of text to xline.
You could adjust the starting point to move the prepended right arrow where want it, but don't fight it; just put the two pieces...

4 years 前 | 0

| 已接受

已回答
How to extract two type of data from text without losing indexing?
file=readlines(websave('Test.txt','https://www.mathworks.com/matlabcentral/answers/uploaded_files/1159058/Test.txt')); file(1)=...

4 years 前 | 0

| 已接受

已回答
I have multiple vectors of order (1000*24)have calculated the fitness of all these.Now the want the maximum out of fitness and want the corresponding vectors and index of that
>> Clansize_11=size(AA) >> Clansize = 10 24 >> will return a 2-vector of the number rows/columns of AA. What then d...

4 years 前 | 0

已回答
I am trying to run a simulation 1000 times and generate a matrix 600x1000. My simulation creates a 1x600 vector
Just wrap you function (you DID us a function, didn't you, and not a script?) inside a for...end loop. Preallocate the output a...

4 years 前 | 0

已回答
Pull specific data from multiple text files and export it to an excel file.
That's not that big in memory footprint; big in terms of hand-processing, yes, but not a memory issues... data=readlines(websav...

4 years 前 | 0

已回答
2-d interpolation in matlab
As per usual, would be far easier to visualize what you're after if would provide a (smallish) sample dataset. But, if by " Kee...

4 years 前 | 1

已回答
I have a 3D matrix that is 64 by 700 by 10. I want to add the 700 numbers to result in a 2D 64 by 10 matrix. How do I do that?
A useful but not used commonly enough for to become aware of early on in MATLAB career, generally ... :) S=squeeze(sum(M,2)); ...

4 years 前 | 1

| 已接受

已回答
Can I get every combination of groups of data in a matrix
A=reshape(1:9,3,3).'; nchoosek(A(:),3) NOTA BENE: This will run out of memory real soon with larger array sizes...

4 years 前 | 0

已回答
How to generate matrix based on previous elements?
dt=3; % use variables for data; don't bury magic numbers in code [r,arr]=find(A); % get the arrival ti...

4 years 前 | 0

已回答
How can I plot outliers in their correct position with respect to the original data?
You're just plotting the selected array elements against their ordinal number; you need a corollary x value against which to plo...

4 years 前 | 0

| 已接受

已回答
extract the indices of matrix elements after applying a condition
A = [1.0000 2.0000; 0.1000 1.0000 ; 0.6000 0.4000 ; 5.0000 0.1000 ; 0.4000 0 ; 0.40...

4 years 前 | 0

已回答
Convert a sequence of datetimes to seconds from first date
T=['07-Oct-2022 12:46:50';'07-Oct-2022 12:47:21']; DT=datetime(T) Tsec=seconds(DT-DT(1)) Subtracting the first datetime value...

4 years 前 | 7

| 已接受

已回答
I get Arrays have incompatible sizes for this operation with an elseif statement what do i do?
A character array is just an array of bytes; the length of 'square' is six characters while the 'rectangle' is 9 -- indeed, they...

4 years 前 | 1

已回答
Make multiple vectors the same size
t=0.5:0.01:1.3; res=interp1(A(:,1),A(:,2),t).*interp1(B(:,1),B(:,2),t).*cos(interp1(C(:,1),C(:,2),t));

4 years 前 | 0

| 已接受

已回答
Why do i get the error "inconsistent row/column dimensions" for line a=X\y
This time I formatted your code for you; in future use the "CODE" button to do so (or select code and use CTRL-E). Please add t...

4 years 前 | 0

已回答
Data not plotting as a 'stacked' bar chart?
bar is an abomination of an implementation -- it is documented that if the input data are a vector, the 'stacked' option is inte...

4 years 前 | 1

已回答
How to transform data to have new minimum, maximum and average values?
OK, this has been rumbling around in back of head since posted -- one way that keeps the original dataset and adjusts them withi...

4 years 前 | 0

| 已接受

已回答
Tying to make an array of labels for a certain length
Why the min() operation? You'll need the same length of the quality indicator as the height of the data. I'd suggest approachi...

4 years 前 | 0

已回答
How to find the difference between two vectors
Well, this is a guess, but it appears that maybe you have x,y data strung together in a single vector and want to separate out t...

4 years 前 | 0

| 已接受

已回答
Contour plot and line plot
That will have been done with subplot more than likely; the newer tiledlayout could also be used. Is there not the code with th...

4 years 前 | 0

| 已接受

已回答
fft(x), why divide with L?
The short answer is "Because!" <VBG> The story behind the answer is in the reference document for the FFTW routine that MATLAB...

4 years 前 | 0

已回答
I'm adding legend in the graph for the 4 plot in the same graph, please help me in this.
Use something like legend('Y(11)','Y(12)','Y(13)','Y(14)',"Location","northeast"); instead. The legend entries are strings de...

4 years 前 | 0

已回答
How to set text position in yyaxis?
t = 1:0.1:10; yyaxis('left'); plot(t, sin(t), 'b.-', 'LineWidth', 2); ylabel('sin'); text(4,0.5,'left=0.5','BackgroundColor'...

4 years 前 | 0

已回答
Reading files with different extension from directory
The MATLAB builtin dir() function doesn't have the facility to handle multiple extensions in a single call; there are a couple o...

4 years 前 | 1

| 已接受

已回答
linspace is causing an error
In %T= (9.68.*n2.^2)./(11.6964.*n2.^2)+(1-n2.^2).*(5.8564-n2.^2).*(sin((2*pi*D)./1)).^2 you're missing a needed set of parenth...

4 years 前 | 3

| 已接受

已回答
Timestamp in ISO 8601 to yyyy-MM-dd HH:mm:ss
It's a pit(proverbial)a(ppendage) when vendor code produces nonstandard formats... S='0000-00-00T14:26:21:000'; % sample...

4 years 前 | 0

| 已接受

已回答
How to delete all files with a certain extension?
Because your count variable is being incremented in the outer loop which is running over a dir() list of all files (including su...

4 years 前 | 0

| 已接受

已回答
I need my graphs to display my data but they are showing up empty
No, the size of a is 1,1; the value of a is 3. Hence, you compute only one value and all your plot is/will be is a single point...

4 years 前 | 1

加载更多