Réponse apportée
Breaking up a computation vs "..." to continue line - Huge Speed Difference !?
I don't think it has anything to do with "...". Shot in the dark: Cache locality? Maybe big_expression(n) and big_expression(...

environ 13 ans il y a | 1

| A accepté

Réponse apportée
deleting multiple rows in a matrix
your_mat = your_mat(113476:end,:); Please read the Getting started part of the documentation.

environ 13 ans il y a | 1

| A accepté

Réponse apportée
How to combine this R, G, B values of an image so that i have an image?
your_image = cat(3,R,G,B);

environ 13 ans il y a | 3

| A accepté

Réponse apportée
how can i make a storage in simulation for matrix ?
You should probably use a cell array: my_result = cell(1,k); for ii = 1:k my_result{i} = ssvs(e,y,q,m,k); end ...

environ 13 ans il y a | 0

Réponse apportée
Creating a function with a logical output.
It does return logical for me. What does class(TLU(rand, rand, rand)) return? If *ans* returns something different, y...

environ 13 ans il y a | 0

Réponse apportée
How can i do optimization in matlab?
Are you sure you asked the right question? If so, what you are asking is: y-x = at; %Find a and t Since y and x are known...

environ 13 ans il y a | 0

Réponse apportée
Codistributed arrays taking too long to run
It's because even though you distribute your array amongst the workers, matrix multiplication might not be efficient, depending ...

environ 13 ans il y a | 0

Réponse apportée
another quick question about string read
*EDIT* sprintf('%s_%d', 'modelsq', gesNum);

environ 13 ans il y a | 1

| A accepté

Réponse apportée
How can I draw hysteresis loop using matlab
x = rand(10,1); y = rand(10,1); quiver(x(1:end-1),y(1:end-1),diff(x),diff(y),0); Please accept an answer if it helps yo...

environ 13 ans il y a | 0

| A accepté

Réponse apportée
quick question about string read
load(a1);

environ 13 ans il y a | 0

| A accepté

Réponse apportée
how to interface using shape file data in matlab?
doc shaperead

environ 13 ans il y a | 0

| A accepté

Réponse apportée
Passing Functions and m-files to functions
myStr = 'P1.m' function [result] = myFun(someArg, myStr) [str str] = fileparts(myStr); run(str); %calling...

environ 13 ans il y a | 0

Réponse apportée
Apply a mask to 4D medical images in a vectorized way
data = rand(144,144,12,25); your_mask = rand(144,144) > 0.5; Assuming you want to multiply by the mask: your_result = ...

environ 13 ans il y a | 2

| A accepté

Réponse apportée
Creating a char matrix
your_mat = repmat('31T',15443,1); Note that the dimensions of this array will be 15443 times 3 (the number of characters in...

environ 13 ans il y a | 1

| A accepté

Réponse apportée
ommiting blanks in a string
your_array = char(randi([32 127],100,10)); for ii = your_array' sub_set = ii(ii ~= char(32))' end

environ 13 ans il y a | 0

Réponse apportée
variables in m files
function [A B C] = ImAFunction(d,p,t) FC = 360; d = hex2dec (d); p = hex2dec (p); t = hex2dec (t); A = (d*0...

environ 13 ans il y a | 0

| A accepté

Réponse apportée
error using the example script of PCA
data = imread('result.png'); data = bsxfun(@minus,data,mean(data,2)); Note that this will not solve your problem, as the...

environ 13 ans il y a | 0

Réponse apportée
Declare equality in Symbolic Math Toolbox
You could do like this: syms z x1 x2 x3 x4 eqs = [-z+x1+x2; -z+x3+x4; x1+x2-x3-x4]; solve(eqs) But it is rather point...

environ 13 ans il y a | 0

Réponse apportée
Hi, Can anyone tell me how to find average of three successive values in matlab, i have an array of 200 values
your_vals = randi(100,1,200); filterLength = 3; %One option your_result_1 = conv(your_vals,ones(1,filterLength)./fi...

environ 13 ans il y a | 0

Réponse apportée
Custom output of the fprintf
Here is a small script to do what you asked for: val = -0.0000001245332; %for example tempVal = abs(val); ord...

environ 13 ans il y a | 0

| A accepté

Réponse apportée
Chi squared test to test if data is from same distribution
You could use a two-sample Kolmogorov-Smirnov test. This tests the hypothesis that the two samples come from the same distributi...

environ 13 ans il y a | 0

| A accepté

Réponse apportée
Series generated by recursive formula
You could always write a recursive function, but I would much rather use the for loop as it is much simpler to understand, IMO, ...

environ 13 ans il y a | 0

Réponse apportée
Finding maximum and minimum values of an array by specifying the range.
Using _accumarray()_, assuming _data_ is a two column array where the first column is Matlab's serial date number: idx = flo...

environ 13 ans il y a | 0

| A accepté

Réponse apportée
Creating a static library using the .mex command
That would depend on the compiler you use. Just compile some object files ( _/c_ option for visual studio, _-c_ for gcc). Then y...

environ 13 ans il y a | 0

| A accepté

Réponse apportée
Extracting data from a structure
I am not sure I understand your question. But if what you mean is that you have a cell array of structures and that you want to ...

environ 13 ans il y a | 0

| A accepté

Réponse apportée
Import binary data to array
status = fseek(fid,3,'bof');

environ 13 ans il y a | 0

Réponse apportée
Add rows to txt file in order to create a matrix
Saving the permutations one by one as they are generated sounds very inefficient due to i/o overhead. It is probably best to sav...

environ 13 ans il y a | 3

| A accepté

Réponse apportée
Using sign(x) with -0.00?
your_mat(abs(your_mat) < 100*eps) = 0; %or some other limit

environ 13 ans il y a | 0

Réponse apportée
means of a number of rows
data = rand(86400,4); your_data = reshape(data,1800,[],4); your_data = permute(your_data,[1 3 2]); your_average = squ...

environ 13 ans il y a | 0

| A accepté

Réponse apportée
getting plot projection in 3d
aH = axes; your_data = randn(1000,3); oneMat = ones(size(your_data,1),1); plot3(your_data(:,1),your_data(:,2),your_da...

environ 13 ans il y a | 1

Charger plus