Answered
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 ...

9 years ago | 0

| accepted

Answered
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...

9 years ago | 0

| accepted

Answered
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...

9 years ago | 1

Answered
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...

9 years ago | 2

Answered
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...

9 years ago | 0

| accepted

Answered
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...

9 years ago | 0

| accepted

Answered
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...

9 years ago | 1

Answered
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...

9 years ago | 0

Answered
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...

9 years ago | 0

Answered
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...

9 years ago | 0

Answered
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...

9 years ago | 1

Answered
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 ...

9 years ago | 0

Answered
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'...

9 years ago | 2

| accepted

Answered
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...

9 years ago | 6

| accepted

Answered
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...

9 years ago | 0

Answered
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...

9 years ago | 1

| accepted

Answered
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...

9 years ago | 0

Answered
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...

9 years ago | 0

Answered
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...

9 years ago | 0

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

9 years ago | 1

| accepted

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

9 years ago | 0

| accepted

Answered
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...

9 years ago | 1

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

9 years ago | 0

| accepted

Answered
good evening , iam getting error as (im2jpeg(x, quality) Error using im2jpeg (line 21) The input must be a UINT8 image) at line 21 . how can i resolve it in the below code
The problem isn't in the code in the function, it's in what you're passing to it as an input image. The function is written to ...

9 years ago | 0

Answered
How do I label the grouped horizontal bars in MATLAB?
I don't have HG2 so can't test and the solution to find the bar positions that worked with HG1 does _not_ work with HG2. Contri...

9 years ago | 0

Answered
Plot data with time in miliseconds
>> fmt='yyyy-MM-dd HH:mm:ss.SSS'' >> dtn=datetime('2017-06-12 13:46:31.486','Inputformat',fmt) dtn = 12-Jun-2017 13:4...

9 years ago | 1

| accepted

Answered
Find value in matrix that matches calculation
|*==*| is an exact match to the LSB if these values are differing in some decimal position then eledata = (data(2:end,4))=...

9 years ago | 2

| accepted

Answered
Fitting my parametric function to experimental data from excel.
Use the custom |*fittype*| to define the equation and the |*fit*| with it.. pf_eqn = fittype('p1^a + p2^b + p3^c + p4^d+ p5...

9 years ago | 0

Answered
Fitting data for each row of a matrix
Guessing the intent Stephen has asked for, x=1:8; % the independent variable vector nrow=size(dat...

9 years ago | 0

Load more