Réponse apportée
how can set values to a const mxArray ?
Looks like you are talking about C/C++ code. If that is the case, I am confused. How could: char a = 'mystr' ever work? T...

presque 13 ans il y a | 0

| A accepté

Réponse apportée
Why when i convert Cell2mat than to double the values changes ?
<https://www.mathworks.com/matlabcentral/answers/57444-faq-why-is-0-3-0-2-0-1-not-equal-to-zero>

presque 13 ans il y a | 1

Réponse apportée
any one knows about this error ?
Q must be square with as many columns as G. You could use the debugger and see why the message given above occurs. Please lea...

presque 13 ans il y a | 0

Réponse apportée
How to read a .f06 file in MATLAB ?
From the .f06 file description: This is the main Nastran output file. It contains the results of your analysis such as disp...

presque 13 ans il y a | 0

| A accepté

Réponse apportée
fzero function, additional output needed
Is there anything preventing you from modifying _find_pw()_ to return p1 as well? function [F,p1]=find_pw(p,pw) Globals a...

presque 13 ans il y a | 0

| A accepté

Réponse apportée
Error when m-file calls cpp-file
Are you using linux?

presque 13 ans il y a | 1

Réponse apportée
Error when m-file calls cpp-file
You cannot call directly cpp files from Matlab. You need to use _mex_ to compile cpp file into a format that Matlab can understa...

presque 13 ans il y a | 1

| A accepté

Réponse apportée
How to perform extreme value distribution in Matlab?
Hard to say without looking at the i) the formulas, ii) how the formulas are implemented in the code. It could be numerical pre...

presque 13 ans il y a | 0

| A accepté

Réponse apportée
I want to create a string that contains 2767 letters (1000 times s). Is there any way to do that fast without typing 'sssss..' 2000 times? thank you
your_str = repmat('s',1,2767); Or your_str(1:2767)='s'; Amongst other options.

presque 13 ans il y a | 2

| A accepté

Réponse apportée
find first value below a minimum in a vectorized way
Using only _min()_ and some logical indexing: A = [ 5,6,5,2,2,6; 7,6,4,4,2,4;9,5,4,2,4,2;7,6,5,5,4,3;5,6,8,7,8,9] thres...

presque 13 ans il y a | 1

| A accepté

Réponse apportée
Unique Rows in Cell Array
my_unik = cellfun(@(x) unique(x,'rows'),a,'uniformoutput',false); Or what is it you want?

presque 13 ans il y a | 1

| A accepté

Réponse apportée
Remove rows or cols whose elements are all NaN
your_mat = A(all(isnan(A),2),:);

presque 13 ans il y a | 0

| A accepté

Réponse apportée
Trying to write a script that solves a series
A few problems, mostly regarding numerics # A factorial can only be represented accurately in double precision up to 21. Same...

environ 13 ans il y a | 0

Réponse apportée
Problem with isinteger() - how to determine whether a constant is integer?
a == floor(a)

environ 13 ans il y a | 2

| A accepté

Réponse apportée
Plotting asymptotic limits, interpolation
Let Matlab decide how to make your plot look smooth: myFun = @(x) ppval(cs,x) fplot(myFun,[0.5 1])

environ 13 ans il y a | 0

Réponse apportée
find a vector in a big vector
vals = (2:2:20)'; your_mat = cell2mat(arrayfun(@(x) {find(a==x)},vals,'uniformoutput',false)); And if you don't care abo...

environ 13 ans il y a | 0

| A accepté

Réponse apportée
Format of exponential with num2str
You could create your own custom function <http://www.mathworks.com/matlabcentral/answers/62708-custom-output-of-the-fprintf...

environ 13 ans il y a | 0

Réponse apportée
write data to a .txt file
Filling with NaN, when there are no values: A = rand(10,1); B = rand(15,1); nRows = max([numel(A) numel(B)]); ...

environ 13 ans il y a | 0

Réponse apportée
Use interp1 to interpolate a matrix row-wise
Without a loop, but slower: nRows = size(E,1); your_array = cell2mat(arrayfun(@(x) {interp1(E(x, :), C(x, :), 0, 'linear...

environ 13 ans il y a | 0

Réponse apportée
how to create a matrix from existing matrix
a = [0.25 0.20 0.15 0.20 0.1]; your_mat = cell2mat(arrayfun(@(x,y) ((x:x:1)'+y)',a,0:numel(a)-1,'uniformoutput',false)); ...

environ 13 ans il y a | 0

| A accepté

Réponse apportée
diffrence of vector element and addition element- wise
A=[1 2 3 98 99 102]; BB = [A(1) ( A(1:numel(A)-1) + diff(A) ).*5]

environ 13 ans il y a | 0

| A accepté

Réponse apportée
How to change the transparency of bars in a barseries plot?
It seems to me that you are not passing the correct value for the handles of the patch: v1 = rand(81,1); c1 = [1 0 1];...

environ 13 ans il y a | 1

Réponse apportée
How to recnstruct a signal from given discrete values ?
I am not sure I understand the problem. It sounds to me that you need to find out the values of theta, omega and alpha. That is ...

environ 13 ans il y a | 1

| A accepté

Réponse apportée
a simple substitution problem !
a = rand(10); [m n] = size(a); a(1:m+1:numel(a)) = 0.5;

environ 13 ans il y a | 0

Réponse apportée
Changing the axis property of matlab
h = plot(rand(10,1)); aH = ancestor(h,'axes'); x = get(h,'XData'); new_x = x .* 1000; new_y = get(h,'Ydata'); d...

environ 13 ans il y a | 2

| A accepté

Réponse apportée
How FFT works on an image?
<http://homepages.inf.ed.ac.uk/rbf/HIPR2/fourier.htm Google does.>

environ 13 ans il y a | 0

| A accepté

Réponse apportée
Importing hex values from a .txt or .xlsx file
doc sscanf You can use the '%x' identifier for hexadecimal data.

environ 13 ans il y a | 0

Réponse apportée
running mex 64bit on different matlab versions
Recompile using the source code.

environ 13 ans il y a | 0

Réponse apportée
add additional parameter to contour plot to generate 3d plot
What you are asking is basically how to plot four-dimensional data in a two dimensional plane. It is not easy, and tends to be m...

environ 13 ans il y a | 1

| A accepté

Réponse apportée
Detect points in predefinied distnace in array
If you are only interested in the closest points and not the actual value of the distance itself, you could get rid of the expen...

environ 13 ans il y a | 0

Charger plus