Respondida
MATLAB Inconsistency in calculating mean of time series from 2 different methods
Your first approach appears incorrect to me. You can only do that if there are the same number of values in each segment becaus...

alrededor de 10 años hace | 0

| aceptada

Respondida
How can I write a command in matlab to simplify series of commands?
resA = output( :, 1:14, 60 );

alrededor de 10 años hace | 0

| aceptada

Respondida
How come 10^-N does not equal 1e-N for some N ?
floating point maths is not exact. There are numerous places on the web where you can read up about this. It isn't specific to...

alrededor de 10 años hace | 2

| aceptada

Respondida
Accessing all the values of a specific structure field in a matrix of structure to a cell array.
All_a(x,:) = { RList.a }; will give you all elements of your RList array's 'a' field in a 1d cell array. To get the 2d c...

alrededor de 10 años hace | 0

Respondida
how can I modify a command to make it able to read a comma separated file?
doc dataset should lead you to the help page which includes information on the 'Delimiter' parameter name/value pair so you...

alrededor de 10 años hace | 0

| aceptada

Respondida
Matlab locks avi movie.
Are you using a pre 2010b version of Matlab? If not then you should be able to use VideoWriter instead as movie2avi will be r...

alrededor de 10 años hace | 0

| aceptada

Respondida
How do I do two animated lines in two different figures?
Did you look at the documentation for animatedline? Like all plotting functions it allows you to specify an axes on which to pl...

alrededor de 10 años hace | 0

| aceptada

Respondida
Need help in uderstanding this piece of code
idx defines the row of the 'output' matrix being written to and ':' says to just fill as many columns in that row as there are o...

alrededor de 10 años hace | 0

| aceptada

Respondida
error 'not enough input arguments" at line with dx..
How are you calling your function? If you just click Run then you will obviously get this. That is a function that takes argum...

alrededor de 10 años hace | 0

Respondida
Remove an element from a vector, using most computationally efficient solution
Are you not able to create a logical vector pointing to the elements that should be removed and then remove them all at once at ...

alrededor de 10 años hace | 0

Respondida
Why is my griddedInterpolant not working properly?
You need to transpose your DUR5 matrix when you use griddedInterpolant because you are giving it X and Y vectors, but your matri...

alrededor de 10 años hace | 0

| aceptada

Respondida
My closereq function is empty. How can i replace it?
function closereq %CLOSEREQ Figure close request function. % CLOSEREQ deletes the current figure window. By default,...

alrededor de 10 años hace | 1

| aceptada

Respondida
How to build a mex return structure?
You can create an mxArray as you would anywhere else, e.g. mxArray* myArray = mxCreateDoubleMatrix( 3, 4, mxREAL ); doub...

alrededor de 10 años hace | 1

| aceptada

Respondida
Continuous slider callback, not updated handles in callback function.
Passing handles around is not a good idea because it is passed by value, so as you have seen, anything added after does not come...

alrededor de 10 años hace | 0

| aceptada

Respondida
Mex mxClassID not found
You just spelt it wrong with a 'c' instead of an 'x' mxCreateNumericMatrix

alrededor de 10 años hace | 0

| aceptada

Respondida
Add 8 to the elements of matrix a=[1 7 5 7 2 3 8 2 9 5] that are higher than 3
a( a > 3 ) = a( a > 3 ) + 8

alrededor de 10 años hace | 1

| aceptada

Respondida
Using function 'save'.
save is used to save to a .mat file or an ascii file. If you want to save to an excel spreadsheet I would suggest to use ...

alrededor de 10 años hace | 0

| aceptada

Respondida
How do I convert the dimesion of a matrix from 1 m n to m n?
doc squeeze

alrededor de 10 años hace | 0

| aceptada

Respondida
How to use SplashScreen with my GUI?
You should just be able to insert the code given in the example into the OpeningFcn of a GUIDE GUI. Put the creation code as ...

alrededor de 10 años hace | 0

Respondida
How to translate image and pad border ?
You could do this manually just as mat = [ 1 2 3; 4 5 6; 7 8 9 ]; res = [ mat(:,1), mat(:,1:end-1) ];

alrededor de 10 años hace | 0

Respondida
Missing subplots inside a panel
Works fine for me using axes rather than subplot in R2015a too so doesn't look like a version issue.

alrededor de 10 años hace | 0

| aceptada

Respondida
How is it possible to call C Function in MATLAB Script files?
doc 'MEX File Creation API' gives information on this. It isn't trivial so you need to read up on it and then feel free to...

alrededor de 10 años hace | 0

| aceptada

Respondida
Missing subplots inside a panel
I very rarely use subplot and that behaviour I cannot understand on stepping through. However, you do not need to complicate is...

alrededor de 10 años hace | 0

Respondida
How to add matrix to previous matrices after every iteration?
Why don't you just use a 1x2 matrix if all the rest of the points will always be 0? Either way I don't really get the problem...

alrededor de 10 años hace | 0

Respondida
How to create a file .txt from a matrix?
fid = fopen( 'somefile.txt', 'w' ); fprintf( fid, '%d %.1f %.1f\n', [y_training x_training ]'); would give what you want...

alrededor de 10 años hace | 0

Respondida
Objects getting deleted between user functions
You need this line after creating your handles.cpp guidata( hObject, handles ) Unless you have just missed some code out...

alrededor de 10 años hace | 0

Respondida
Slider with non consecutive values
If you have your slider values in an array then just map onto them and use the id (which is consecutive) into the array as the v...

alrededor de 10 años hace | 1

| aceptada

Respondida
Using 'xlswrite' to save excel file to a PRE-SPECIFIED folder
doc fullfile e.g. pathName = 'D:\myFiles'; filename = 'SomeFilename.xls' fullPath = fullfile( pathname, filename...

alrededor de 10 años hace | 0

Respondida
how can I sort the arrays according to example I explained below?
[Result, idx] = sort( Result ); CoEff = CoEff( idx, : );

alrededor de 10 años hace | 1

| aceptada

Respondida
How can I set the 'Xticks' to the bound of the colours in a colorbar?
nTicks = 6; range = 6 - 1; inc = range / nTicks; ticks = ( 0:nTicks ) * inc + 1; Then set these as XTick

alrededor de 10 años hace | 0

| aceptada

Cargar más