Answered
how to read an image with .img format in matlab
Use imread function

12 years ago | 0

Answered
Count elements of a cell array based on two conditions
out=nnz(cellfun(@(x,y) all([x<25,y>25]),A(2:end,3),A(2:end,5)))

12 years ago | 1

| accepted

Answered
Display a matrix in terms of other matrices
n=10 B =['[' sprintf( 'A^%d ',1:n) ']']

12 years ago | 0

Answered
How to erase rows with blank entries with one exception?
A=[A(1,:) ; A(all(cellfun(@numel,A),2),:)]

12 years ago | 1

| accepted

Answered
apply function to each group
If your data are cell array, you can use <http://www.mathworks.com/help/matlab/ref/cellfun.html cellfun>

12 years ago | 0

| accepted

Answered
reading image, without nowing the name of the file.
<http://matlab.wikia.com/wiki/FAQ#How_can_I_process_a_sequence_of_files.3F>

12 years ago | 0

| accepted

Answered
Sum up a value to a row and create new colum at the end of the cell
cell2mat(cellfun(@(x) [x x+1],A,'un',0)) %or [A num2cell([A{:}]+1)']

12 years ago | 1

| accepted

Answered
Erase row from a cell-array
A(1,:)=[]

12 years ago | 1

| accepted

Answered
how to define a variable given sample size, mean, and standard deviation?
n=100000 % number of samples moy=10 % given mean ecart_type=5 % given std a=moy+ecart_type*randn(1,n)

12 years ago | 0

Answered
Subscript indices must either be real positive integers or logicals.???
Your function is called *y*, when you call your function y: y=y(...) The variable y will shadow the function y, I recomm...

12 years ago | 2

Answered
Does MATLAB work in Windows 8???
<http://www.mathworks.com/matlabcentral/answers/99453-is-matlab-supported-on-windows-server-2008>

12 years ago | 0

Answered
Getting Error not enough input argument while ruuning the below code.
Save this function file as MinimumSpanningTree.m in Matlab Windows Command type: CostMatrix= % provide your data [T, ...

12 years ago | 0

| accepted

Answered
replace NaN with zeros for several variables in a dataset
If A is your dataset B=double(A); B(isnan(B))=0; replacedata(A,B) Or B=dataset2cell(A) B(cellfun(@isnan,B))={0}...

12 years ago | 0

| accepted

Answered
difference between using max and length in histogram
A=[1 2 10 3] Try max(A) % The greatest value in A and length(A) % number of element in A

12 years ago | 1

| accepted

Answered
How can I concatenate an arbitrary number (#) of nxm matrices to make a 3D (# by n by m) matrix?
n=4 A=[1:3;4:6;7:9] bsxfun(@times,A,ones(1,1,n))

12 years ago | 0

| accepted

Answered
I have to detect the Startrow and endrow from a file automatically from a .txt file...
fid = fopen('file.txt'); str={}; while ~feof(fid) str{end+1,1}=fgetl(fid) end fclose(fid); ii1=find(~cellfun(@isempt...

12 years ago | 0

Answered
Plotting a complex number.
What do you want to plot, the aplitude or the phase? If A is your array plot(abs(A)) % plot the amplitude figure plot(an...

12 years ago | 0

Answered
Make a dynamic line plot
close X=[1 2 3]; Y=[5 6 7]; plot(X,Y) hold on for i=4:20 X=[X, i]; Y=[Y,i*2]; plot(i,i*2,'*') pause(1...

12 years ago | 0

Answered
about the generator polynomial
mem=4, gen=[19 29] The meaning of the code is: 4 is assigned to the variable mem The array [19 29] is assigned to th...

12 years ago | 0

Answered
I do not want the output of the following program is a complex number
Then just take the real part (because the imaginary part is very small) f=real(double(solve(e)))

12 years ago | 0

| accepted

Answered
How to make a graphic 3d(surface) from 3 vectors in MATLAB.
To plot a surface you need more data, Example x=1:4 y=1:4 [xx,yy]=meshgrid(x,y) zz=xx.^2+yy.^2 % for example mesh(x...

12 years ago | 0

Answered
How to create a delayed version of a cosine signal?
delay=5*st y1=cos(2*pi*100*(t-delay)) % delayed signal

12 years ago | 0

Answered
How to repeat a rectangular matrix in matlab?
A=[1 2 ; 3 4] B=repmat(A,3,2)

12 years ago | 0

Answered
Complicated Question / String Arrays
A={'J_012(105)' 'J_013(106)' 'J_014(107)' 'J_015(2)' 'J_016(94)' 'J_017(95)'} B=cellfun(@(x) x{1} ,regexp(A,'.+...

12 years ago | 0

Answered
Discrete Continuous Simulink Question
There is no problem using continuous and discrete blocks in simulink. If for example the output y(t) of a continuous system is t...

12 years ago | 0

| accepted

Answered
set y-axis to strings on plot
x_values = [-0.6085 -0.6261 -0.6372] y_values = [39306 39383 39460] y_labels ={'10:55:06' '10:56:23' '10:5...

12 years ago | 1

| accepted

Answered
matrix shape is incorrect??
It's simple, just transpose the result A=A'

12 years ago | 0

Answered
rotate tick labels in plot with property editor
Look at this link <http://www.mathworks.com/matlabcentral/fileexchange/27812-rotate-x-axis-tick-labels>

12 years ago | 0

| accepted

Answered
How can I combine multiple cell arrays and double arrays into a specific format that I need?
vStrNames1 = {'a';'b';'c';'d';'e'} vStrNames2 = {'v';'w';'x';'y';'z'} vDblNumbers = [1;2;3;4;5] test = [vStrNames1,vStrNa...

12 years ago | 0

Answered
cell array manipulation with string
[A{1:3}] %or strjoin(A(1:3))

12 years ago | 0

Load more