Respondida
How can I insert vectors created in a for loop in a matrix?
E.g., wpvector = 0:0.5:5; % Create a vector the same size as the loop range k = 0; % Initialize the index into this vec...

más de 11 años hace | 1

Respondida
Solving a vector system
HINT: What do you get when you add the two equations together? And what do you get when you subtract the two equations? Just do ...

más de 11 años hace | 0

Respondida
Partial Sums Using For Loop
You replace the "a" variable with each iteration, so only the last iteration is present when you do "sum(a)". So either make "a"...

más de 11 años hace | 1

| aceptada

Respondida
taylor function is not working
It is complaining about the 5 and 0 arguments, which don't match the expected syntax for calling the taylor function. Is somethi...

más de 11 años hace | 0

Respondida
Run multiple versions of Matlab on shared server
If you are simply asking if it is possible to have multiple versions of MATLAB installed on the same machine, the answer is yes....

más de 11 años hace | 0

Respondida
element wise multiplication (beginner)
c is a 1x7 row vector (built with spaces or commas separating the elements) d is a 7x1 column vector (built with semi-colon s...

más de 11 años hace | 1

| aceptada

Respondida
Beginner's Mex Error - MatLab
Check the associated mexopts file for the specific compiler/linker setup you are using and look for the COMPFLAGS line. If there...

más de 11 años hace | 1

Respondida
Replace NaN with corresponding elements in another array.
A = original array with NaNs in it B = array with desired replacement values x = isnan(A); A(x) = B(x);

más de 11 años hace | 5

Respondida
compiling C and fortran files in MATLAB mex
First compile adwrite.c by itself with a C compiler to generate an object file (e.g., adwrite.obj on Windows). If you are doing ...

casi 12 años hace | 0

| aceptada

Respondida
How to change 4x4 matrix to 2x2 matrix
Yet another way (not necessarily any better than other posts), generalized: kr = 2; kc = 2; % Row and Column sizes of sub-b...

casi 12 años hace | 1

Respondida
This code plot nothing and i don't understand why ?!
size(x) and size(u) are vectors, so i<= size(x)& j<=size(u) is a vector result, which is not what you likely intended. Try using...

casi 12 años hace | 0

Respondida
how create an array 33x2000?
A = zeros(33,2000); A = ones(33,2000); A = nan(33,2000); etc.

casi 12 años hace | 0

| aceptada

Respondida
Most Efficient Way of Using mexCallMATLAB in Converting Double* to mxArray*
Preliminary comment: You should not pre-allocate the G_PINV_output, since this will be automatically created by the mexCallMATLA...

casi 12 años hace | 2

Respondida
How can I find min between three value in matlab?
min([a b c])

casi 12 años hace | 1

| aceptada

Respondida
Error using round(reshape(message,Mm*Nm,1)./256)
What does the error message say? Double check the size of the variable message to make sure it really is Mm x Nm. Note th...

casi 12 años hace | 1

Respondida
how do i plot a graph in xy?
Do you mean y = x^3? If so, first pick a range for x, then calculate y, then plot it. E.g., x = 0:0.1:3; % From 0 to 3 in i...

casi 12 años hace | 0

Respondida
Multiplying matrices of different classes
For the first part of your question, to do a matrix multiply: a = your double matrix b = your uint8 matrix c = a * do...

casi 12 años hace | 2

Respondida
2 dice simulation. Code for when both dice = 6?
sum((a==6)&(b==6)) Looks like the same question as this newsgroup thread: http://www.mathworks.com/matlabcentral/newsrea...

casi 12 años hace | 1

| aceptada

Respondida
How to convert squareroot and arctan function to VHDL?
This doesn't really sound like a MATLAB problem to me, and I am not sure you will get much help on this forum. There are a varie...

casi 12 años hace | 0

Respondida
how to use randperm with a seed?
In general you will get a different set by default, but it is possible to get the same set. If you want to preclude this I would...

casi 12 años hace | 0

Respondida
Pass one value at a time from a matrix to a for loop
E.g., (caution: code not protected against iprev too large for matrix size) iprev = 1; for ii = find(isemp) ave(:...

casi 12 años hace | 0

| aceptada

Respondida
What is wrong with my code? (Beginner's question)
func1: x and y are outputs of this function, not inputs. So eliminate them from the calling arguments. E.g., function [x...

casi 12 años hace | 1

Respondida
Error in save to .txt
Where are you running the code from? Can you switch to a working directory where you do have write capability before doing the s...

casi 12 años hace | 0

Respondida
Creating a new matrix from two matrixes
c = zeros(size(a)); c(b,:) = a(b,:);

casi 12 años hace | 0

| aceptada

Respondida
How to output WHOLE vector in result?
Your function, as written, takes two inputs and returns two outputs. You probably called your function with only one output whic...

casi 12 años hace | 1

Respondida
after command bottom, I want X=[d2;d4;d9]
Is this what you want? Basically repeated your code, but get rid of the zeros initialization which will make X a double array (n...

casi 12 años hace | 0

Respondida
Euler's Method (Once again)
See this link under "Formulation of the method": http://en.wikipedia.org/wiki/Euler%27s_method

casi 12 años hace | 0

Respondida
How to do Runge Kutta 4 with a second order ode?
What is the signature for ode1? I can't seem to find it in the doc. Where is your derivative function implemented? I don't see i...

casi 12 años hace | 0

| aceptada

Respondida
how do i obtain several output with a "function" function?
Please see this related post: http://www.mathworks.com/matlabcentral/answers/57445-faq-how-can-i-create-variables-a1-a2-a10-i...

casi 12 años hace | 0

Respondida
How to remove the last column in an array
Another method: a(:,end) = [];

casi 12 años hace | 2

Cargar más