回答済み
how quick/efficient is linprog depending on the lenght of the intervall on which it looks for a solution?
Nope, usually the searching time depends mainly on the topology structure of the boundary of the feasible set: how many vertices...

8年弱 前 | 2

| 採用済み

回答済み
Simple question about for-loop error: Unable to perform assignment because the left and right sides have a different number of elements.
Not because the course use the notation x_n for x at iteration #n, that you should code "x(n)", which in MATLAB language means t...

8年弱 前 | 0

回答済み
Multiplication of two matrices of different rank
RESHAPE is a cleanest and fastest way to do tensor-extension of mtimes on multi-dimension arrays. szA = size(A); szB = s...

8年弱 前 | 1

| 採用済み

回答済み
Using for loops to check elements
for i=1:length(a)-1 interval = a([i i+1]); dosomething(interval); end

8年弱 前 | 0

| 採用済み

回答済み
How to group numbers of a vector
Can you try this one, I put the flag so that you can select if the common point that goes to left or right group, if you have ot...

8年弱 前 | 0

回答済み
Best way to find all possible linear combinations of n rows from large dataset that meets a target for each column
Your problem can be formulated as finding (all) feasible solutions of a linear constraints. A*c >= target c >= 0 ...

8年弱 前 | 1

回答済み
elimination of consecutive regions
You could use Huffman encoding (there might be some on the FEX), but the idea is similar to this direct code: N = 2 A = ...

8年弱 前 | 1

回答済み
Arrays intersection with repetition
% random test data output_min = ceil(30*rand(1,20)) output_max = ceil(30*rand(1,20)) % find the indexes of the in...

8年弱 前 | 0

回答済み
How to group numbers of a vector
OK, try this: b = [true, false, diff(V,2)~=0]; b = b & [true, ~b(1:end-1)]; b = find(b); lgt = [b(2:end)...

8年弱 前 | 0

回答済み
How to find three largest absolute value correlations in a table
maxk(p07,3) if you have MATLAB R2017b or later

8年弱 前 | 0

回答済み
random generation of 2 variables
Here is a solution that does not require any quantification, but need this <https://fr.mathworks.com/matlabcentral/fileexchange/...

8年弱 前 | 0

回答済み
Quadprog new "feature"
It might be possible that with big matrix, degenerated semi-convex problem is detected as non-convex due to the numerical accura...

8年弱 前 | 0

回答済み
Error (error in line 42) in using matlab execution (guide compiled) file.
Shooting in the dark : Delete the line #42 (that the best I can do to help you).

8年弱 前 | 0

回答済み
Quadprog new "feature"
Can you just switch off by WARNING('off',...) like any other warnings?

8年弱 前 | 0

回答済み
can anyone suggest me a command that talks about how matlab performed an arithmetic operation (its steps to give us the final result) ?
_f(3)^f(4) would have to be done first_ That's the case, the *power* is the first to be performed (among operators), but it's...

8年弱 前 | 0

回答済み
can anyone suggest me a command that talks about how matlab performed an arithmetic operation (its steps to give us the final result) ?
Here is an idea, replace the number of your expression by functions (that return a scalar) and print out the order % (1/2+0...

8年弱 前 | 0

回答済み
How to find inverse of a non square matrix?
unconstrained solution a = y \ x

8年弱 前 | 1

回答済み
Passing const mxArray *prhs[i] to a function gives wrong values.
You make a terrible mistake of pointer manipulation: passing Data->XR (a double pointer) as input argument will nener be updated...

8年弱 前 | 0

| 採用済み

回答済み
How to apply a function to a column of the result of matrix multiplication to get reduced size of resulting matrix?
It all depends what we do in the loop, typical in this example the for loop will call matrix * smaller_matrix which is...

8年弱 前 | 0

回答済み
Find unique rows (including rows with reverse x,y) in matrix of x,y coordinates
Try [~,i] = unique(sort(data(:,1:2),2),'rows') data(i,:)

8年弱 前 | 1

| 採用済み

回答済み
How to apply a function to a column of the result of matrix multiplication to get reduced size of resulting matrix?
This is no more than a disguised for-loop result = arrayfun(@(col) min(a*b(:,col)), 1:size(b,2))

8年弱 前 | 0

回答済み
matlab Compiler using mex file
The packaging is put on CTF file or directly in EXE file then unpack the first time you run at the location where it think it's ...

8年弱 前 | 0

回答済み
How to write a better "if condition" to eliminate some unwanted matrices?
Sahin: there is one thing obvious I didn't see until now, but the each column of the product TM * inField depends independ...

8年弱 前 | 0

| 採用済み

回答済み
How to solve x^4-p*x+q.solve for x considering p and q as constants
roots([1,0,0,-p,q])

8年弱 前 | 0

回答済み
Compare pair of elements in different arrays
Q1 = [3 2 6 8 10 2] Q2 = [1 7 12 4 6 8 3 2] P1=[Q1(1:end-1),;Q1(2:end)]' P2=[Q2(1:end-1),;Q2(2:end)]' interse...

8年弱 前 | 0

回答済み
mxCreateSharedDataCopy no longer supported in R2018a
An alternative solution would be to hack mxArray internal structure /* File "mxInternals_R2018B.h" */ ...

8年弱 前 | 1

回答済み
Finding the first element of a matrix that satisfy a condition in a frequently manner
Your loop is equivalent to condmeet = y_coordinate(:,2)<31.35 & y_coordinate(:,4)<0; TR = y_coordinate(condmeet ,:); ...

8年弱 前 | 0

回答済み
Converting a numeric array into a string array with their corresponding values
cl = {'BLACK' 'BROWN' 'RED' 'ORANGE' 'YELLOW' 'GREEN' 'BLUE' 'VIOLET' 'GREY' 'WHITE'}; %input = [2 7 0 0 0]; input=...

8年弱 前 | 0

| 採用済み

回答済み
solving for unknown matrix element as function of an undetermined independent variable
If there is an solution it would be: r = @(E) (-a21(E)./a22(E)) t = @(E) (a11(E) - a12(E).*a21(E)./a22(E))

8年弱 前 | 0

さらに読み込む