Respondida
Meaning of unit vector
A unit vector is any vector v such that norm(v) = 1. For your case of order n=6, you want a 6 element vector v with norm(v) = 1...

alrededor de 9 años hace | 5

| aceptada

Respondida
Kalman filter for beginners
You need to have a good dynamics model of the system you are trying to estimate in order for a Kalman filter to make sense for t...

alrededor de 9 años hace | 1

Respondida
How can I write "enter" or "carriage return" to a serial object?
A carriage return is ASCII code 13. Can you simply send a char(13), or perhaps an int8(13), to the serial connection?

alrededor de 9 años hace | 0

Respondida
Dynamic allocation of mxArray structure
_"... The memory should be allocated by chunks, so that in case of insufficient memory the calculation can be stopped and the re...

alrededor de 9 años hace | 0

Respondida
Find all numeric values right after the NaN values in a column vector
E.g., x = find(isnan(vec))+1; x = x(x<=numel(vec)); % or x(x>numel(vec)) = []; result = vec(x);

alrededor de 9 años hace | 0

Respondida
Using ode45 to solve an interest rate problem regarding an ODE.
Look at the very first example here in the doc: https://www.mathworks.com/help/matlab/ref/ode45.html?searchHighlight=ode45&s_...

alrededor de 9 años hace | 0

| aceptada

Respondida
i am geeting a wrong answer for this calculation mod(10^27,55)
E.g., simple loop: r = 1; for k=1:27 r = mod(10*r,55); end r r = 10

alrededor de 9 años hace | 1

| aceptada

Respondida
I have a request set of size [ 1 2 3 4 5 6 7 8 9 10] these request demand some bit rate of size [6 5 6 4 7 3 5 5 4 7] .I want to sort these request according to request that demand most bit rate.
Use the 2nd output of the sort function to get the desired indexing, then feed that back into the vector you want sorted in that...

alrededor de 9 años hace | 0

Respondida
obtaining an array containing arrays
E.g., m = number of loop iterations B = zeros(m,4); for k=1:m A = results of current iteration B(k,:) =...

alrededor de 9 años hace | 2

| aceptada

Respondida
Index Exceeds Matrix Dimensions
You can use the debugger for this. First, type in the following at the command line: dbstop if error Then run your code...

alrededor de 9 años hace | 0

Respondida
Function handle doesn't work as intended
Just quickly looking though what was posted, this line: grid onq_tot2 = @(deltaT) integral(@(r) stopp(r), r_c, r_max) lo...

alrededor de 9 años hace | 0

Respondida
what does A(3, :) mean or A(:, 3)?
If A is a 2D matrix, then A(3,:) is the 3rd row of A A(:,3) is the 3rd column of A If A is a multi-dimensional array, t...

alrededor de 9 años hace | 5

| aceptada

Respondida
Calling from Matlab a recusive function written in C
In addition to what Geoff has already written, in your "code without output parameter" you are not setting the value of the retu...

alrededor de 9 años hace | 1

| aceptada

Respondida
Combining hours and minutes
If you just want to combine them into a string with the HH:MM format, e.g., out = sprintf('%02d:%02d',file(8,1),file(9,1));...

alrededor de 9 años hace | 0

| aceptada

Respondida
How to Modify Entries in Cell
result = cellfun(@(x)x(:,:,1:end-2),your_cell_array,'uni',false);

alrededor de 9 años hace | 1

| aceptada

Respondida
how to calculate algorithm speed?
I would start with tic and toc. You could also use timeit.

alrededor de 9 años hace | 0

| aceptada

Respondida
Error using element-wise multiplication
Remember, the syntax A([end 1],:) is only 2 rows, not the entire matrix. That is why you are getting the error. To do what you...

alrededor de 9 años hace | 0

| aceptada

Respondida
Retrieving the original LSBs in LSB steganography
If you overwrite the original data with something else, and you have nothing else in the image that can be used to reconstruct t...

alrededor de 9 años hace | 0

| aceptada

Respondida
How to use ode45 to solve a system with many dimensions?
If I understand your equations correctly, simply dx = x .* (alpha - a*x);

alrededor de 9 años hace | 0

| aceptada

Respondida
overlapping time steps in ODE45
Please show the code for 'center1'. Why can't you modify this code to simply use the t input to determine which value of Fy to ...

alrededor de 9 años hace | 0

Respondida
Matlab Error using .*. Matrix dimensions must agree
k is a vector and tp is a vector. They are not the same size. So you need to revisit this calculation to see what you really w...

alrededor de 9 años hace | 0

Respondida
calling fortran subroutine from matlab: keep getting errors
For Fortran mex routines, one should always use the exact subroutine signatures that are listed in the doc to make sure there is...

alrededor de 9 años hace | 0

Respondida
I want to divide one vector to two vectors that complement each other .. How can I obtain all possible combinations of these 2 vectors ?
You could use the FEX submission ALLCOMB by Jos for this. E.g., x = your original vector of non-negative integers c = c...

alrededor de 9 años hace | 1

| aceptada

Respondida
Graphing Maclaurin sinx and getting horizontal line at zero
To start with, use element-wise operators for the / and * operations also. E.g., e = (z.^n)./factorial(2*n+1).*(x.^(2*n+1)...

alrededor de 9 años hace | 0

Respondida
How can i add the C source code of a matlab function to a mexfunction of a matlab toolbox written withc/c++ code ?
If I understand your question correctly, you want to modify existing compiled code by adding your own code, but you don't have t...

alrededor de 9 años hace | 0

| aceptada

Respondida
How to normalize data between 0 and -1.4?
E.g., using simple linear scaling based on the range of the current data: data = your matrix actual_min = min(data(:)); ...

alrededor de 9 años hace | 0

Respondida
create a matrix from a for loop and store it or allot it one after the other from a for loop
You could save each piece in a cell array: Kb = cell(4,4); : Kb{i,j} = [ 0 0 0 : Then a...

alrededor de 9 años hace | 0

Respondida
how to loop over the structure fields and get the type of data ?!
You could loop over the fieldnames, e.g. fn = fieldnames(mystruct); for k=1:numel(fn) if( isnumeric(mystruct.(fn{...

alrededor de 9 años hace | 47

| aceptada

Respondida
Logical indexing of matrix doesn't output matrix of the correct dimensions
Is this what you want? I just added the colon : to select all of the columns. window = userData(windowLogical,:); (In g...

alrededor de 9 años hace | 0

| aceptada

Cargar más