Answered
Faster way to construct signals in Signal Builder
Have you tried <http://www.mathworks.com/help/simulink/slref/set_param.html set_param function> ?

11 years ago | 0

Answered
A fast way of reshaping a cell array with elements with different sizes
cellfun(@(x) reshape(x,[],16),your_cell,'un',0)

11 years ago | 2

| accepted

Answered
Getting Error with fprintf
A=double(B) fprintf(write,'%e',A);

11 years ago | 2

| accepted

Answered
finding x of y
Try this x = -10:0.1:10; f1 = trapmf(x,[-2 0 0 2]) index=find(abs(f1-0.5)<10^(-10)) Xidx=x(index) And read this <h...

11 years ago | 0

| accepted

Answered
multiple random samples of size k
use <http://www.mathworks.com/help/matlab/ref/randperm.html randperm function> n=6 k=3 row1=randperm(n,k) For a matr...

11 years ago | 0

Answered
Hidden call of m-file
Right click on your subsystem, click on properties, there may be any callback

11 years ago | 0

| accepted

Answered
How to divide wav file to frames (windows) with specific number of samples and plot time waveform and frequency spectrum using Matlab
If y is your audio signal, if you want to get the 10000 first samples out=y(1:10000) Read the documentation <http://www....

11 years ago | 0

Answered
Continuous simulink model works fine but not the discrete version of the exact same simulink model, why?
It's not obvious to answer your question, since we don't know much about your case, if the discretization was correct or not. Th...

11 years ago | 0

Answered
Error using plot Conversion to double from sym is not possible.
plot(t,eval(y1))

11 years ago | 0

| accepted

Answered
explain the square brackets
Read the documentation <http://www.mathworks.com/help/matlab/ref/function.html> You have to assign values to h=1, v=2 ...

11 years ago | 0

| accepted

Answered
Is it possible to change label names in Matlab
t=0:10; y=sin(t) plot(y) s={'a' 'b' 'c' 'd' 'e' 'f'} yt=get(gca,'ytick') n=numel(s) set(gca,'xtick',linspace(min(yt),max...

11 years ago | 0

Answered
How to add zero vectors and columns in arbitrary places?
N=[0,1,0,1;0,0,0,0;0,1,0,1;0,0,0,0] B=[1,0.8;0.8,2] N(logical(N))=B

11 years ago | 0

| accepted

Answered
i was trying to run this function below and the Error message i am getting is Error: Function definitions are not permitted in this context. function y=emfg(u) |Can anyone help me out
This is a <http://www.mathworks.com/help/matlab/ref/function.html function>, you can't run it by clicking on run. You need to ca...

11 years ago | 0

Answered
How to access the title of a matlab fig file
plot(1:10); title('abc'); h1=get(gca,'title'); titre=get(h1,'string') With newest version of Matlab plot(1:10);titl...

11 years ago | 3

| accepted

Answered
creating .mat file in matlab
save filename signa1 fs1 signal2 fs2

11 years ago | 0

Answered
Using assignin or evalin command to populate Structure Elements with Numeric Data.
You probably can use other alternatives here <http://www.mathworks.com/help/matlab/matlab_prog/string-evaluation.html> For yo...

11 years ago | 1

| accepted

Answered
Sum of elements of a multidimensional symbolic array
syms x a(1,1,1)=x a(1,1,2)=x^2 a(1,1,3)=x^3 out=sum(a(:))

11 years ago | 0

| accepted

Answered
How to calculate the standard deviations of each row of an array and get those as a 1-D array?
M=rand(4,3) % std for each row s1=std(M,[],2) % std for each column s2=std(M)

11 years ago | 1

| accepted

Answered
how to create an anonymous function?
x=[-2,2] y=[-2,2] [X,Y]=meshgrid(x,y) Z=X.*exp(-2*Y.^2-X.^2) surf(X,Y,Z)

11 years ago | 0

Answered
plot of 3 variables
plot3(p,m,x)

11 years ago | 1

Answered
not able to plot x
m=0:2.5:12.5 p=0:0.2:1 x=p./m % it's a multiplication element by element, the operator is ./ instead of / plot(x,p)

11 years ago | 1

| accepted

Answered
convert plot(x,y) to plot(y(ind))
Just do this plot(y)

11 years ago | 0

Answered
not able to plot
m and p should have the same number of element. To correct this m=0:2.5:12.5 p=0:0.2:1 plot(m,p) You can check the ...

11 years ago | 1

| accepted

Answered
Selecting non-zero elements from a symbolic vector
syms a b c d = [a*b, 0 , a^2*b*c, 1, 0] c=nonzeros(d).'

11 years ago | 0

Answered
Grabbing numbers from a string
s={115;118;118;'121';118;'126P';132} idx=cellfun(@isstr,s) b=s(idx) c=regexp(b,'\d+(\.\d+)?','match') d=cellfun(@str2doubl...

11 years ago | 0

| accepted

Answered
plotting sphere and rectangle mesh
sphere(20) axis square You can get the coordinates x,y and z [x,y,z]=sphere(20) You can plot a sphere surf(x...

11 years ago | 0

| accepted

Answered
Search multiple matrices for values at common index positions
a=[ 1 0 0 0 0 ; 0 3 0 0 0 ; 0 0 5 0 0 ; 0 0 0 7 8] d=[ 0 0 0 12 0; 0 3 0 4 0; 0 0 0 0 0 ; 34 0 0 9 0] e=[ 0 0 0 0 0; 0 15 0 ...

11 years ago | 0

Answered
Combing 2 arrays of different size in matlab
oldarr = [1,2,3,4,5,6,7,8] newarr = [1,2,3,4,5,6,7,8,9,10] n=numel(oldarr) m=numel(newarr) nm=max(n,m) combinearr = [olda...

11 years ago | 1

| accepted

Answered
How to extract the timestamp value and an integer value from an excel file?
[~,b]=xlsread('actual_tgw2639true.csv') M=b(2:end,:) a=regexp(M,',','split'); date=cellfun(@(x) x{1},regexp(M,',','split'),...

11 years ago | 0

Answered
Plotting trajectory of variation of two population with the time
plot(x_result(:,1),x_result(:,2))

11 years ago | 0

Load more