Answered
How to convert the following hexa decimal to binary array ?
b='6A09E667F3BCC908' a = base2dec(b,16); out=dec2bin(a)

11 years ago | 1

Answered
Turning a list of answers into a single array
Example a=zeros(1,10); for k=1:10 a(k)=sin(k); end

11 years ago | 0

Answered
How to plot vertical lines?
x=[0:0.1:10]; x1=5; plot(x,2*sin(x),x,5*sin(x),x,cos(x)); y1=get(gca,'ylim') hold on plot([x1 x1],y1)

11 years ago | 8

| accepted

Answered
Cell2Mat for multiple columns
g(:,:)'

12 years ago | 0

| accepted

Answered
How do I read whitespace character with Textread function?
[name, value]=textread('coord.txt', '%s')

12 years ago | 0

Answered
How can I graph an equation with 'changing constant' values?
*Edit* x = [-10:0.1:10]; y = [-10:0.1:10]; Constant = 5+10*not(heaviside(x-3))+100*(heaviside(x-3)-heaviside(x-6))+1000*h...

12 years ago | 0

Answered
How to improve a for
-sum(Q.*Q)

12 years ago | 1

| accepted

Answered
removing weekends from table
Look at this example a={'11-10-2014','12-10-2014','13-10-2014','14-10-2014','15-10-2014','16-10-2014','17-10-2014'}' b=dat...

12 years ago | 0

| accepted

Answered
Function to make a variable circular
mod(17,12)

12 years ago | 1

| accepted

Answered
zooming out of a signal?
Reduce the value of T f=400; ts=1/8000; T=0.01; t=0:ts:T; y=sin(2*pi*f*t); plot(t,y)

12 years ago | 0

Answered
code to form a matrix by selecting some elements in another matrix
y=rand(14,13) % Example out=y(randperm(14*13,13))'

12 years ago | 1

Answered
Setting legends for multiple graphs
legend({'leg1','leg2','leg3','leg4'})

12 years ago | 0

| accepted

Answered
How Can I read the contents of .mat files ?
data=load('your_file_name')

12 years ago | 3

| accepted

Answered
Plotting with different colors
Don't specify the color k plot(ITstore,bptime,'-','LineWidth',2)

12 years ago | 0

Answered
how to find mean with nan
a=[1 2 nan 3 nan 10] nanmean(a) %or mean(a(~isnan(a)))

12 years ago | 2

| accepted

Answered
average of each two vectors of a matrix
a=reshape(mean(permute(reshape(x',5,2,[]),[2 1 3])),5,5)'

12 years ago | 0

Answered
complex subtraction of cell array from matrix
Look at this example out={rand(48,24);rand(72,24)} in=rand(24,1) res1=cellfun(@(x) bsxfun(@minus,permute(reshape(x,24,24,...

12 years ago | 1

| accepted

Answered
search and replace exact substring
str = 'steps = eps*100 + beta*steps*eps'; regexprep([' ' str ' '],'(?<=[^a-zA-Z])eps(?=[^a-zA-Z])','%eps')

12 years ago | 0

| accepted

Answered
How to solve: Imaginary parts of complex X and/or Y arguments ignored
How can you plot an imaginary array y? you have to choose what you want to plot, the imaginary part or the real part, or the mod...

12 years ago | 0

Answered
How can we implement ?
A=[ 1 2 3 4 5] D=[1 A(2) -A(3) A(4) -A(5)] N=A(1)/2 x=ones(1,200) % your input signal y=filter(N,D,x) stem(y)

12 years ago | 0

| accepted

Answered
Generating a 6 second sine wave?
f=400 Amp=1 ts=1/8000; T=6 t=0:ts:T; y=sin(2*pi*f*t); plot(t,y)

12 years ago | 5

| accepted

Answered
How to find second largest OR third largest Or any largest value among the columns of a matrix?
A=rand(7,25) [aa,indices]=sort(A,'descend')

12 years ago | 3

| accepted

Answered
title('string1_string2'): Stop automatic subscripts?
Use title('file\_23')

12 years ago | 1

Answered
How to graph a f(x,y) function?
x=0:0.1:10; y=0:0.1:10; z=-(x.^2-1).^2-(x.^2*y-x-1).^2 plot3(x,y,z)

12 years ago | 0

Answered
How can I read a .txt file with out the header?
fid = fopen(C:\Users\cborba\Documents\Tides\10513.txt'); line1 = fgetl(fid); res=[]; while ischar(line1) res{end+1,1...

12 years ago | 1

| accepted

Answered
Reading Flags in a matrix
NodeBlock=[1 3.0 0 0 2 2.0 0 0 3 0.5 1 0.001 4 0.5 0 5000 5 4.0 0 0 6 8.25 1 0 7 6.5 0 -2000] X=logical(NodeBlock(:,3))...

12 years ago | 0

| accepted

Answered
How to set the frequency in simulink?
Simulink has not its own frequency. You can model your generator with a frequency of your choice

12 years ago | 0

Answered
I want to empty a variable q, i used q={} or q=[ ],but why it doesn't work , thank you
q={ '4400002970000003533' '8500000190000013093' '8500000190000045501' '8500000840000005660' '8500000840000006008' '85000901000...

12 years ago | 0

Answered
Summary of the cell
If your data looks like a={{1:2 3:4 5:6};{7:8 9:10 11:12}} Use out=cell2mat([a{:}]')

12 years ago | 0

| accepted

Answered
finding data of a plot
Look at this example % -----Example---------------------- x=repmat((1:10)',1,3); y=rand(10,3); for k=1:3 subplot(3,1,...

12 years ago | 0

Load more