답변 있음
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(...

대략 13년 전 | 1

| 수락됨

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

대략 13년 전 | 1

| 수락됨

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

대략 13년 전 | 3

| 수락됨

답변 있음
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 ...

대략 13년 전 | 0

답변 있음
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...

대략 13년 전 | 0

답변 있음
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...

대략 13년 전 | 0

답변 있음
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 ...

대략 13년 전 | 0

답변 있음
another quick question about string read
*EDIT* sprintf('%s_%d', 'modelsq', gesNum);

대략 13년 전 | 1

| 수락됨

답변 있음
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...

대략 13년 전 | 0

| 수락됨

답변 있음
quick question about string read
load(a1);

대략 13년 전 | 0

| 수락됨

답변 있음
how to interface using shape file data in matlab?
doc shaperead

대략 13년 전 | 0

| 수락됨

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

대략 13년 전 | 0

답변 있음
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 = ...

대략 13년 전 | 2

| 수락됨

답변 있음
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...

대략 13년 전 | 1

| 수락됨

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

대략 13년 전 | 0

답변 있음
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...

대략 13년 전 | 0

| 수락됨

답변 있음
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...

대략 13년 전 | 0

답변 있음
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...

대략 13년 전 | 0

답변 있음
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...

대략 13년 전 | 0

답변 있음
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...

대략 13년 전 | 0

| 수락됨

답변 있음
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...

대략 13년 전 | 0

| 수락됨

답변 있음
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, ...

대략 13년 전 | 0

답변 있음
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...

대략 13년 전 | 0

| 수락됨

답변 있음
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...

대략 13년 전 | 0

| 수락됨

답변 있음
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 ...

대략 13년 전 | 0

| 수락됨

답변 있음
Import binary data to array
status = fseek(fid,3,'bof');

대략 13년 전 | 0

답변 있음
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...

대략 13년 전 | 3

| 수락됨

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

대략 13년 전 | 0

답변 있음
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...

대략 13년 전 | 0

| 수락됨

답변 있음
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...

대략 13년 전 | 1

더 보기