Respondida
engEvalString not working as expected
When the project is running and paused with the "Hit return to continue" message, the Engine window should be open. Click on tha...

más de 11 años hace | 0

Respondida
Dynamically assign structure names and loop them in fuction
The result of the who command simply gives you variable names as a cell array of strings ... it doesn't give you the variables t...

más de 11 años hace | 0

Respondida
Array Building using Dynamic Field Reference using an Array of Strings
>> Data.Field1 = [1;2;3] Data = Field1: [3x1 double] >> Data.Field2 = [4;5;6] Data = Field1: [3x1 dou...

más de 11 años hace | 0

Respondida
Returning the final value of a while loop
Just set your return variable to x. E.g., function P = myFunction(x,y,h) while (x-y) > h x=x-1; end P = x;...

más de 11 años hace | 0

| aceptada

Respondida
num2str weird behavior with decimal input....
FYI, here are the exact decimal conversions of the IEEE double floating point bit patterns in question: >> num2strexact([.0...

más de 11 años hace | 0

Respondida
Finding the approximate length with for loop?
Taking the instructions verbatim: dividing [a, b] into n equal subintervals determining the location of the object at ea...

más de 11 años hace | 0

| aceptada

Pregunta


Preserving Versions of Questions
Lately there has been a rash of people asking Questions, only to delete the original question (replacing it with meaningless tex...

más de 11 años hace | 0 respuestas | 3

0

respuestas

Respondida
how to declare all the rows and all column in matlab in a matrix or array??
c(:) is the syntax for the entire matrix, not a particular row. And when used on the rhs of a statement it means "reshape c as a...

más de 11 años hace | 0

Respondida
Fibonacci Using While Loop
You don't assign your iterative result to the fibonacci array. E.g.: fibonacci(i) = fibonacci(i-1) + fibonacci(i-2); H...

más de 11 años hace | 0

| aceptada

Respondida
In place array flipping - mex in place
Unless TMW officially documents this, I think you are stuck with your explicit loop approach. If TMW documents the in-place rule...

más de 11 años hace | 2

Respondida
MATLAB :How to program with MATLAB
You should probably review the basics of MATLAB. E.g., http://www.mathworks.com/help/matlab/getting-started-with-matlab.html ...

más de 11 años hace | 1

Respondida
Adding FFmpeg toolbox into MATLAB
Not familiar with ffmpeg, but maybe try the function call syntax (I assume file.mp3 is a typo and you meant MP3file?): ffmp...

más de 11 años hace | 0

Respondida
Code Continuously Runs - Newton Raphson
I haven't looked at your algorithm in detail, but just the convergence code seems suspicious to me: %Find new value of dy...

más de 11 años hace | 0

Respondida
Simplifying the If statements.
cabs_vector = [9 10 11 12 9 10 11 12 13 14 15 16 13 14 15 16]; idcabs = cabs_vector(idabs);

más de 11 años hace | 0

| aceptada

Respondida
How can I select a default folder?
Create a file called startup.m in the folder that MATLAB starts in and add anything you want in it for startup commands. E.g., a...

más de 11 años hace | 0

| aceptada

Respondida
Comparing cell arrays of strings of unequal size/replacing missing values with zeroes
A = {'dog','cat'}; B = {'dog','cat','fish','horse'}; B(~ismember(B,A)) = {0} B = 'dog' 'cat' [0] [0]...

más de 11 años hace | 0

| aceptada

Respondida
solving a sequence in matlab
Plugging everything in I get A^5 * x = b So the solution would be x = A^5 \ b However, your expressions for...

más de 11 años hace | 0

| aceptada

Respondida
Need NaNs in data but not to be evaluated and keep then put back
Keep track of the isnan locations, and use that to put the results in the proper element locations. E.g., assuming Group_1 is th...

más de 11 años hace | 0

Respondida
Warning: Matrix is singular to working precision.
Z=(sin(sqrt(X.^2+Y.^2)))./(sqrt(X.^2+Y.^2)); % changed / to ./ The ./ is element-wise division, whereas the / implies t...

más de 11 años hace | 1

| aceptada

Respondida
Is it possible to solve a pair of two equations for four unknowns
A brute force method to get a single solution: % Equations (pick x and y both not 0 and not too big) disp('Numbers') ...

más de 11 años hace | 0

Respondida
Hello; Given a vector B = [ 8 3 9 4 6 7 7 5 4 5]; How do I call out from B all the even element locations? (Not even numbers, locations)
% B(2:2:end) % NO EDIT: find(mod(B,2)==0)

más de 11 años hace | 1

| aceptada

Respondida
How to work around memory errors?
I guess the obvious suggestion is don't use repmat, but rewrite the sum((pb-boundred).^2) calculation as a loop instead. What ar...

más de 11 años hace | 2

| aceptada

Respondida
Read double precision numbers from binary file
Did you mean to type the following: cAddress = (char*)(&value); // Added the & for type punning Otherwise, the method of...

más de 11 años hace | 1

| aceptada

Respondida
Why can't I store this many values In line
Since v7 is an integer type (int16), when you combine it with doubles in concatenation [ ], the doubles get converted to int16. ...

más de 11 años hace | 0

| aceptada

Respondida
How to find undefined matrix in a code?
If the variable is not defined at all, you can use this: if( exist('variable_name','var') ) % variable_name is defin...

más de 11 años hace | 1

| aceptada

Respondida
create a vector ,of sets of predefined numbers stored in another row vectors
Not sure how you want the answer actually stored (the syntax in your example isn't clear), but here is one way: XX = repmat...

más de 11 años hace | 0

Respondida
How do I reverse the order of two rows of a 4x4 matrix using a for loop?
Did you mean this? A(3,:)=fliplr(A(3,:)); % replaced 1 with a 3 If not, can you describe your problem in more detail...

más de 11 años hace | 0

Respondida
How to work out the length of a line
% x = your x coordinate vector % y = your y coordinate vector % d = diff([x(:) y(:)]); d = diff(your 3D point ma...

más de 11 años hace | 2

| aceptada

Respondida
How to concatenate two matrices in a loop?
Another way using 3-dimensional syntax: n = number of individual matrices you have; R = number of rows per matrix; C ...

más de 11 años hace | 1

| aceptada

Respondida
generating 10 samples from a binomial using a fair dice.
First, to fix your code I am guessing you are getting error messages about Xx and UR as functions or variables. To concatenate v...

más de 11 años hace | 1

| aceptada

Cargar más