Respondida
How can I apply a command on all rows of a cell array at once?
The problem is {} on the cell array returns a comma-separated list; each of those values is then an input to |num2str| so that c...

más de 9 años hace | 0

| aceptada

Respondida
How to efficiently access multiple value in a cell [ ACCESS MULTIPLE ROW FOR A SINGLE COLUMN]
A first step simplification eliminates superfluous parens and (to my eye, anyway) spaces that make harder to read than without--...

más de 9 años hace | 1

| aceptada

Respondida
Pull same column of cell from same variable, different .mat files
d=dir('results*.mat); % get the list of .mat files qualifying... N=length(d); % how many files are t...

más de 9 años hace | 0

Respondida
Plot using combined data from multiple excel columns
_"B1:B5 plus C4:C8 then y data from E4:E8 plus F2:F6"_ The brute-force way... xdata=xlsread('YourXLSFile.xls',1,'B1:C8...

más de 9 años hace | 0

Respondida
How to change the color for bar graphs and create space between grouped bars?
ABC=[ [10,13,9,6,20]' [2, 4, 7, 9,10]' [-2,-3,-8,-10,-11]'].'; hBar=bar(ABC,'grouped'); % basic grouped bar plot, keep...

más de 9 años hace | 2

| aceptada

Respondida
How to preprocess accelerometer data which consists of x,y,z columns from accelerometer, time column in miliseconds and a column which is an annotation for specific activities.
If you have the segments already isolated by the annotation and it's done consistently (that is, if "walking" is always spelled ...

más de 9 años hace | 0

Respondida
Divide and expand matrix
Something like this you mean: >> x=reshape(1:9,3,3) % starting sample input array x = 1 4 7 2 5 ...

más de 9 años hace | 0

| aceptada

Respondida
How to use interp2 to resize arrays of different sizes?
Not sure it will actually be any faster than using |interp1| by column for only two columns and will certainly be far more memor...

más de 9 años hace | 0

| aceptada

Respondida
I'm working on bearing capacity formula described in the model below. Two variables have been choose as a random variable (i.e c and Unit_weight). I want to calculate probability of failure vs Qall to plot a histogram. Please kindly do assist me in t
Don't need loop to compute the failure fraction-- nFail=sum(Qult<Qall); But, since you've written Qult = c*Nc + Uni...

más de 9 años hace | 0

| aceptada

Respondida
Using min() on vectors with double
_"when I use min(vector), MATLAB returns "Subscript indices must either be real positive integers or logicals."_ This means y...

más de 9 años hace | 1

Respondida
Are Matlab's built in functions typically faster than user created functions?
Generally the builtins will be faster owing to that they're compiled code as opposed to m-files which are interpreted. Although...

más de 9 años hace | 2

Respondida
Issue in finding Power Spectral Density of fitted curve
Evaluate the fit at the desired frequency for however long you have data and pass that result to |*fft*| *ADDENDUM:* See the...

más de 9 años hace | 0

| aceptada

Respondida
How to use a slider to move through plots
Well, the following runs but isn't yet ready for prime time...needs some "prettying-up" to move the slider out of the way from o...

más de 9 años hace | 0

| aceptada

Respondida
How to copy certain rows from an excel to another using MATLAB?
You could use |*xlsread*| and |*ismember*| on the first (text) column to find the various rows wanted, but the newer |*readtable...

más de 9 años hace | 1

Respondida
Is there any difference between n(i,1) and n(i) in calculation when n is a vector? I got super weird thing......
You have _time(i)_ in one expression and _times(i,1)_ in the other. Those aren't the same variable so don't necessarily have sa...

más de 9 años hace | 0

Respondida
How to create a user interface for a function in Matlab?
Or, just use the builtin widgets interface to get the parameters _may_ be enough... fn=uigetfile('*.xls','Select Input File...

más de 9 años hace | 0

Respondida
Chi-square distribution plot
Because |chi2gof| returns bin edges, need to convert to centers -- x=filter([0.5 0.5],1,st.edges); x=x(2:end); % average s...

más de 9 años hace | 0

Respondida
Create a difference vector of time
I'd make a minor change-- A = cell2mat(textscan(fileID,'%D %D','collectoutput',1)); to convert the cell arrays to an arr...

más de 9 años hace | 1

Respondida
Unable to use linkaxes after using clf on figures due to invalid axes error [Solved]
Not enough to see which axes were linked, but if you've linked (as it seems from the description) the axes in _figNum_ to those ...

más de 9 años hace | 0

Respondida
Different columns for the same X-axe in stacked bar figure
|bar| is very difficult function in Matlab when you want anything they've not already canned for you, and while using _'grouped'...

más de 9 años hace | 2

| aceptada

Respondida
Obtaining slope from fitlm results
Oh, it's a tangled web TMW has weaved, fer shure...what with all the different mechanisms to do the same thing in different tool...

más de 9 años hace | 6

| aceptada

Respondida
Fit function - plot only line, without the data points
How did you create the plot? If I use fp=fit(x,y,'poly1'); plot(fp) I don't get anything but the line. But, use t...

más de 9 años hace | 0

Respondida
Array value changing for no apparent reason?? Is it possible there is hidden lines of code?
But you've got sweepData(sweepData<=threshold) = threshold; in here that _will_ change |sweepData| if there's any valu...

más de 9 años hace | 1

| aceptada

Respondida
How to fix this error ?
Seemingly a candidate for the FAQ -- <https://www.mathworks.com/matlabcentral/answers/346984-how-can-l-import-historical-stock-d...

más de 9 años hace | 0

Respondida
Fingerprint matching minutiae comparison
That will simply test two axes handles to see if they match; since you've got two different images the answer to that questi...

más de 9 años hace | 0

Respondida
How can l import historical stock data from yahoo with matlab?
See <https://www.mathworks.com/matlabcentral/answers/335973-can-t-connect-to-yahoo?s_tid=answers_rc1-3_p3_Topic <335973-can-t-c...

más de 9 años hace | 0

Respondida
FormatSpec for mixed entry of Input
>> s='ASC2007252381128.0000.T88.ch04.sac E'; % sample input record >> fmt='%s %*s'; % read ...

más de 9 años hace | 1

| aceptada

Respondida
For Loop Indices Manipulation
OK, from that definition, a looping solution. function dO2Conc = O2Solver(t,O2Conc,c,O2Leak,nodes,slt_nodes) dO2Conc= ...

más de 9 años hace | 0

| aceptada

Respondida
Convert comma-separated decimal to point-separated decimal
t.Var=str2double(strrep(t.Var,',','.'); for affected each variable _'Var'_ in |table| _'t'_. Can generalize into loop or...

más de 9 años hace | 1

Respondida
Matrix Algebra without Loop
With recent release (R2016b?) there's automagic expansion that'll _probably_ do what you want....prior to that, |*bsxfun*| does ...

más de 9 años hace | 0

| aceptada

Cargar más