Respondida
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(...

alrededor de 13 años hace | 1

| aceptada

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

alrededor de 13 años hace | 1

| aceptada

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

alrededor de 13 años hace | 3

| aceptada

Respondida
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 ...

alrededor de 13 años hace | 0

Respondida
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...

alrededor de 13 años hace | 0

Respondida
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...

alrededor de 13 años hace | 0

Respondida
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 ...

alrededor de 13 años hace | 0

Respondida
another quick question about string read
*EDIT* sprintf('%s_%d', 'modelsq', gesNum);

alrededor de 13 años hace | 1

| aceptada

Respondida
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...

alrededor de 13 años hace | 0

| aceptada

Respondida
quick question about string read
load(a1);

alrededor de 13 años hace | 0

| aceptada

Respondida
how to interface using shape file data in matlab?
doc shaperead

alrededor de 13 años hace | 0

| aceptada

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

alrededor de 13 años hace | 0

Respondida
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 = ...

alrededor de 13 años hace | 2

| aceptada

Respondida
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...

alrededor de 13 años hace | 1

| aceptada

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

alrededor de 13 años hace | 0

Respondida
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...

alrededor de 13 años hace | 0

| aceptada

Respondida
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...

alrededor de 13 años hace | 0

Respondida
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...

alrededor de 13 años hace | 0

Respondida
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...

alrededor de 13 años hace | 0

Respondida
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...

alrededor de 13 años hace | 0

| aceptada

Respondida
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...

alrededor de 13 años hace | 0

| aceptada

Respondida
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, ...

alrededor de 13 años hace | 0

Respondida
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...

alrededor de 13 años hace | 0

| aceptada

Respondida
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...

alrededor de 13 años hace | 0

| aceptada

Respondida
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 ...

alrededor de 13 años hace | 0

| aceptada

Respondida
Import binary data to array
status = fseek(fid,3,'bof');

alrededor de 13 años hace | 0

Respondida
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...

alrededor de 13 años hace | 3

| aceptada

Respondida
Using sign(x) with -0.00?
your_mat(abs(your_mat) < 100*eps) = 0; %or some other limit

alrededor de 13 años hace | 0

Respondida
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...

alrededor de 13 años hace | 0

| aceptada

Respondida
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...

alrededor de 13 años hace | 1

Cargar más