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

alrededor de 11 años hace | 0

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

alrededor de 11 años hace | 2

| aceptada

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

alrededor de 11 años hace | 2

| aceptada

Respondida
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...

alrededor de 11 años hace | 0

| aceptada

Respondida
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...

alrededor de 11 años hace | 0

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

alrededor de 11 años hace | 0

| aceptada

Respondida
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....

alrededor de 11 años hace | 0

Respondida
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...

alrededor de 11 años hace | 0

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

alrededor de 11 años hace | 0

| aceptada

Respondida
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 ...

alrededor de 11 años hace | 0

| aceptada

Respondida
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...

alrededor de 11 años hace | 0

Respondida
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

alrededor de 11 años hace | 0

| aceptada

Respondida
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...

alrededor de 11 años hace | 0

Respondida
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...

alrededor de 11 años hace | 3

| aceptada

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

alrededor de 11 años hace | 0

Respondida
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...

alrededor de 11 años hace | 1

| aceptada

Respondida
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(:))

alrededor de 11 años hace | 0

| aceptada

Respondida
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)

alrededor de 11 años hace | 1

| aceptada

Respondida
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)

alrededor de 11 años hace | 0

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

alrededor de 11 años hace | 1

Respondida
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)

alrededor de 11 años hace | 1

| aceptada

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

alrededor de 11 años hace | 0

Respondida
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 ...

alrededor de 11 años hace | 1

| aceptada

Respondida
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).'

alrededor de 11 años hace | 0

Respondida
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...

alrededor de 11 años hace | 0

| aceptada

Respondida
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...

alrededor de 11 años hace | 0

| aceptada

Respondida
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 ...

alrededor de 11 años hace | 0

Respondida
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...

alrededor de 11 años hace | 1

| aceptada

Respondida
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'),...

alrededor de 11 años hace | 0

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

alrededor de 11 años hace | 0

Cargar más