Answered
Changing field value for all fields in a struct
s(2) = struct('name','anna','age',18) s(1) = struct('name','bernd','age',22) n=numel(s) for k=1:n s(k).name='unknown' end...

12 years ago | 1

Answered
How to close the current figure only?
You can use close

12 years ago | 0

Answered
What determines the shape of a logically indexed array?
Maybe you need a = ones(3,3); b = a([true, true],:)

12 years ago | 0

Answered
See m file from .exe file
You can't see the m file from your exe file

12 years ago | 0

| accepted

Answered
Dirac function and matlabFunction
In your expression what is dirac(x+0.5,1)? it should be dirac(x+0.5) ht = @(v,x)(v.^2.*dirac(x + 0.5) + 3*v.^2.*dirac(x + 0...

12 years ago | 0

Answered
Summing the elements of cell arrays for only certain values
A = {'a', 'b', 'c', 2 'a', 'b', 'd', 3 'b', 'c', 'd', 7 'a', 'b', 'd', 10} c=A(:,1:3) d=arrayfun(@(x) strjoin(c(x,:)),(1:...

12 years ago | 0

Answered
Searching different elements from array.
array=[12 3 4 8 9 3 3 4 1] search=[4 9 3]; ismember(array,search)

12 years ago | 0

| accepted

Answered
loading text file to matrix without delimiters
d=importdata('file.txt')

12 years ago | 0

Answered
how to remove data points occur less in a data set
x = [0,2,9,2,5,8,7,3,1,9,4,3,5,8,10,0,1,2,9,5,10] ; ii=unique(x) [aa,bb] = hist(x,ii) idx=aa>=2 bar(bb(idx),aa(idx))

12 years ago | 0

Answered
Changing the scale on the y-axis to a log-log scale.
Use plot(x,log(log(y)))

12 years ago | 0

Answered
How to use importfile when there is only one data in cell A1?
You can use xlsread

12 years ago | 0

Answered
How to write character(39) to excel file?
M={''''''}; xlswrite('Test1.xlsx',M,1,'A1');

12 years ago | 0

Answered
how to convert state space to tf
From your data we can see that your system has one input (b is mx1) and two output (c is 2xm) then, from input 1 you have two t...

12 years ago | 0

Answered
How to select a one random letter from a matrix of letters.
move = {'R' ,'P', 'S'} cmove = move(randi(numel(move))) or move ='RPS' cmove = move(randi(numel(move)))

12 years ago | 0

| accepted

Answered
Solve and save the value in a variable
sol=solve('0.15==m*(1-sqrt(m/3))')

12 years ago | 0

| accepted

Answered
How to get the most frequent value of vector on Matlab ?
A=[1,2,2,4] b=unique(A); f=hist(A,b) [~,idx]=max(f) out=b(idx)

12 years ago | 0

Answered
Can you retrieve a plot you have cleared?
I 'am not sure how the memory is handled, but I think if the other process of your computer use the available memory, you have c...

12 years ago | 0

Answered
How do you multiply one single constant value with a 1D array/matrix containing 25 values in Simulink?
You can use a <http://www.mathworks.com/help/simulink/slref/product.html product block>

12 years ago | 0

Answered
How to make up the diagonal summation without for loop and with the fastest way!
A =[ 1 7 13 2 8 14 3 9 15 4 10 16 5 11 17 6 12 18] [...

12 years ago | 1

Answered
How to calculate the integral of the complicated functions of function handles in a cell?
f{1} = @(x) x; f{2} = @(x) x.^2; g=@(x) f{1}(x)+f{2}(x) integral(@(x) g(x), -3,3)

12 years ago | 0

| accepted

Answered
how to create a function for loading data
You, already have a function that loads your data file='file1.txt' data=dlmread(file)

12 years ago | 0

Answered
How to zoom a region of a plot?
ylim([0 0.2e5])

12 years ago | 2

| accepted

Answered
Error bars are all the same size?
If you look at delta, you can see that the values are not equal 0.2935 0.2719 0.2608 0.2526 0.2515 0.2522 0.2535 0.2...

12 years ago | 1

| accepted

Answered
Using data calculated in matlab and stored as an array/1D matrix in Simulink
You can use a constant block, just set the value to, for example power=[1 2 3 4 5] % in workspace Inside your block set...

12 years ago | 0

| accepted

Answered
sort an array and store them into subarrays
A = [ 1 1 9999.69307 3.374E-28 1 1 9999.72441 4.662E-27 1 9 9999.73112 2.083E-29 1 9 9999.939...

12 years ago | 0

| accepted

Answered
How to eliminate string array elements by passing binary array
myStrings = {'Title1','Title2','Title3'}; seconaryArray = [1,0,1]; myStrings(logical(seconaryArray))

12 years ago | 1

| accepted

Answered
Elemental matrix multiplication [NxN] and [1xn] into [NxNxn]
a=rand(4,3) b=rand(1,6) [n,m]=size(a) p=numel(b); c=reshape(bsxfun(@times, repmat(a(:)',numel(b),1),b')',n,m,p)

12 years ago | 1

| accepted

Answered
Transient Conduction Heat Transfer
In line 37 you have the expression on the right contains T(r-1,x,k) with r beginning at 1, make the index=0

12 years ago | 0

Answered
Plotting every 15th elements of a vector
plot(ASCM_time(1:15:end),ASCM_GPS_number_satellite(1:15:end),'g')

12 years ago | 0

| accepted

Load more