Answered
How to apply a cell array of function handles to a cell array of arguments
Use nested cellfun calls X = cellfun(@(fha_i) cellfun(fha_i, C, 'Uni', false), fha, 'Uni', false)

9 years ago | 0

Answered
Negative index of a matrix
for n = 1:5 m = -n:n; for i = 1:numel(m) A(i, n) = m(i)*n; end end

9 years ago | 0

| accepted

Answered
How to use data from columns whose header lines meet two criteria?
D = [125 250 500 125 250 1 1 1 3 3 91.34 119.5 127.88 113.96 114.09 91.35 120.28 126.28 109.82 117.63 91.36 116.25 123...

9 years ago | 0

| accepted

Answered
select row and iterate for next rows
If you want to multiply column 1 by alpha = 23 and add column 2, for example, you can to this as follows: alpha = 23; y ...

9 years ago | 0

Answered
fprintf doesn't create new lines
You can fprint to fid == 1 to view the result on the console for testing. This creates newlines fprintf(1,'%d\n', [1 2 3])

9 years ago | 1

| accepted

Answered
Measuring fit of normcdf and multiple data points
Compute the error from the distance of the points to the line err = p_collapse_mle(x_vals == IM) - num_collapse./num_gms; ...

9 years ago | 1

| accepted

Answered
Figure & Subplot: Getting rid of needless white space
Try FEX submission tight_subplot

9 years ago | 1

Answered
how to represent e raised to power of x expressions
exp(1j*2*pi*f*T)

9 years ago | 0

| accepted

Answered
How to retrieve data in column wise in Matlab?
A(:, [1 4])

9 years ago | 0

| accepted

Answered
32 and 64 bit on same computer
If you have a 64 bit machine you can only install the 64 bit version of Matlab.

9 years ago | 0

Answered
How to calculate concordant pairs in MATLAB
nnz(sign(A(2:end) - A(1:end-1)) == sign(B(2:end) - B(1:end-1)))

9 years ago | 0

Answered
How can I subtract vectors of different lengths?
You do not need much code, you can simply write delta = LargerVec(1:numel(SmallerVec))-SmallerVec; or if you want to del...

9 years ago | 0

| accepted

Answered
Using Mac book Air 2015
Yes, why not? If the CPU and RAM is sufficient for what you consider smooth working depends on the task you want to do, of which...

9 years ago | 0

Answered
need a help doing simple code
To learn Matlab you can start by something like function y = myfunction(W, L, H, R) q=H/L; a=W/q; b=(W*(1-R)/(2*q)); ...

9 years ago | 0

| accepted

Answered
How to calculate gradient of arbitrary point based on image
One way would be to calculate the gradient for each pixel and then interpolate to get sub pixel accuracy.

9 years ago | 0

Answered
Speed up indexing / Repmat operation
nnz(I) may be faster than sum for logical matrices. Another way could be to pre-allocate cells of ones for all possible ...

9 years ago | 0

Answered
How to convert a ASCII character to matrix
There are datasets around; google 8 x 8 character bitmaps One example is <https://github.com/dhepper/font8x8> To extract a...

9 years ago | 0

Answered
Help using textscan on .csv files
To check if your string contains any invalid characters, i.e., non-digits, you can use ~isempty(regexp(s, '\D')) and the...

9 years ago | 0

Answered
How to make margins in figure again?
help iptsetpref reveals iptsetpref('ImshowBorder','loose')

9 years ago | 0

Answered
What is the reason to get 'The system cannot find the path specified.'?
Have a look at the run_demos_videos file and see if there are any paths set that do not exist on your system.

9 years ago | 1

Answered
How to get image from a matrix which contains PIXEL values ?
I used Input_Im = imread('peppers.png'); and it worked fine. What do you get with peppers.png?

9 years ago | 0

Answered
Create sparse matrices with integer rows and columns
Probably not. See also <http://stackoverflow.com/questions/30894231/matlab-uint8-sparse>

9 years ago | 0

| accepted

Answered
Getting pixel values from an image
If your image is stored in I, like from the command I = imread('peppers.png'); the Matlab syntax to select the element in...

9 years ago | 2

| accepted

Answered
What does this commands mean?
It generates the numbers from 1 up to C, in steps of 6.

9 years ago | 1

| accepted

Answered
How to make input parameters in m.file and use another function file to write the code, and ask paramters from m.file?
write a script parameters.m alpha = 23; beta = 44; write a function function z = myfunction(x, y) % read scr...

9 years ago | 2

Answered
randomly select different elements of a vector
x = [1 1 1 2 3 4 4 4 5 6 7 7]; for i = 1:4 ind = randperm(numel(x), 1); % select one element out of numel(x) element...

9 years ago | 1

| accepted

Answered
How do i write the following mathematical equation in MATLAB
If SM is a M * N matrix, you can write mean2(SM) or if you don't have the image processing toolbox mean2(SM(:))

9 years ago | 0

Answered
Decrease the least and increase the highest
B(A == max(A)) = B(A == max(A))*100; B(A == min(A)) = B(A == min(A))*10;

9 years ago | 0

Load more