回答済み
Automatic Adjusting of xticks depending of data
categorical axes are somewhat peculiar -- the categorical variable always contains all the categories for which it was created a...

3年以上 前 | 0

| 採用済み

回答済み
How to save and read a 3D matrix in MATLAB?
"readmatrix(filename) creates an array by reading column-oriented data..." A matrix in MATLAB is 2D; writematrix writes the pla...

3年以上 前 | 0

回答済み
textscan doesn't stop at blank space in txt file
opt=detectImportOptions(websave('walking_01.txt','https://www.mathworks.com/matlabcentral/answers/uploaded_files/1163318/walking...

3年以上 前 | 0

回答済み
Matlab plot not showing correct values
No need for and don't use loops here... p=[0.1553567,-2.0416,9.1837,-14.829,-1.3703,32.821,-1.3155]; % store poly coefficien...

3年以上 前 | 0

回答済み
How can I find X for given Y value in a fitted curve. I have a non- linear equation of 6th order.
"ALWAYS" plot your equation first -- fnY=@(X)0.0178*(X.^6) -0.3463*(X.^5) + 2.6845*(X.^4) -10.426*(X.^3) + 21.192*(X.^2) -20.64...

3年以上 前 | 0

回答済み
Speed up vectorized code automatic expansion logical indexing
function F = myfun(l,aprime,a_val,z_val) aux = 3.5; cons = a_val+l*z_val - aprime; F=-inf(size(cons)); indx=c...

3年以上 前 | 0

| 採用済み

回答済み
Calculating mean and std from every continuous variable in a table
vartype to the rescue...for the base case of numeric S = vartype('numeric'); % create the indexing variable by...

3年以上 前 | 0

| 採用済み

回答済み
Finding column values for each unique combination of two other columnar values in a table
% build a dataset XYZ=randi(1000,30,3); U=arrayfun(@(i)unique(XYZ(:,i)),1:3,'uni',0); N=min(cellfun(@numel,U)); tXYZ=array2t...

3年以上 前 | 0

回答済み
How to make a normal distribution using the following parameters: mean, standard error, minimum, and maximum?
" have a standard error value of 0.05." I have always heard "standard error" as being the std/mean -- using 0.05 as the standar...

3年以上 前 | 0

回答済み
How to split an array cell with multiple text line with carriage return
We can't test without actual data sample to be sure what is actually embedded in the string, but if it's using standard whitesp...

3年以上 前 | 0

回答済み
How do i merge multiple columns in a table into one?
See mergevars -- MATLAB has anticipated your every desire... :)

3年以上 前 | 0

回答済み
Using cellfun to remove nans from uniform cell
If they are and always will be the same size, I'd use subterfuge... [ra,ca]=size(R{1}); % save the array sizes firs...

3年以上 前 | 0

| 採用済み

回答済み
Error: Invalid parameter/value pair arguments.
" Is there any problem with using 'color'?" In xline((1/(freq*24*60*60))*1e9,'color',[125,0,251]/255 , [num2str(freq), ' days...

3年以上 前 | 0

| 採用済み

回答済み
how to select values in one set of data based on value range in another data set
Well, you'll have to have the same number of elements of each for time and speed; and it will have to be in order of the time ve...

3年以上 前 | 1

回答済み
~ in Matlab function
It is a placeholder for the optional second argument but indicates to not assign to a variable -- in the above call, there is no...

3年以上 前 | 0

| 採用済み

回答済み
How to plot the mean and standard deviation of collected data
I don't get any such error if I just work at the command line... i1=5; i2=2400; tT1=readtable('med_tube_19_187g_1.csv'); tT2=...

3年以上 前 | 1

| 採用済み

回答済み
Two X axes with different directions
x1 = 1:20; % axis in tau scale x2 = x1.*(128/3); % axis in ms to s /1000 x3 = 1./(x2./1000); % axis in Hz figure hL=plot(x2,...

3年以上 前 | 0

回答済み
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...

3年以上 前 | 0

| 採用済み

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

3年以上 前 | 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...

3年以上 前 | 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)=...

3年以上 前 | 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...

3年以上 前 | 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...

3年以上 前 | 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...

3年以上 前 | 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...

3年以上 前 | 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)); ...

3年以上 前 | 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...

3年以上 前 | 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...

3年以上 前 | 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...

3年以上 前 | 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...

3年以上 前 | 0

さらに読み込む