Respondida
How to write the equivalent of an 'until loop' in matlab?
<http://www.mathworks.com/help/matlab/ref/while.html while loop>

más de 10 años hace | 0

Respondida
How can i draw this type of graph?
x=[0 0.2 0.4 0.6 0.8 1] y=[0 0.02 0.04 0.06 0.08 0.1] cl='rgbkcmy' for k=2:numel(x) line([0 x(k) x(k) 0],[0 0 y(k) y(...

más de 10 años hace | 0

Respondida
Change x-axis.
Use xlim and ylim

más de 10 años hace | 0

Respondida
import data from file into an array
A=importdata('yourfile') or A=dlmread('yourfile')

más de 10 años hace | 0

Respondida
Use variable in two different functions
[var1,...]=fcn1(...) get the variable var1 from fcn1 and use it in fcn2 [...]=fcn2(var1,...)

más de 10 años hace | 0

| aceptada

Respondida
How to Compare value returned by regexp and another string ?
nameF='aa.txt'; cni =regexp (nameF, '.txt', 'split') The result is cni = 'aa' '' then strcmp(cni...

más de 10 años hace | 0

Respondida
delete or keep special rows in a cell array based on specific column values
A={'summits,' '-1' '.' ' 3' 'greenhouse' ' 0' 'hello world' '-2' 'abandoned' '-2'} d=cellfun(@(x) regexprep(x,'[,...

más de 10 años hace | 1

| aceptada

Respondida
Read many column from excel sheet
If you want all columns A = xlsread(filename);

más de 10 años hace | 0

Respondida
how to merge tow matrix ?
C=A|B

más de 10 años hace | 0

| aceptada

Respondida
How to generate a "special" signal in Simulink
<</matlabcentral/answers/uploaded_files/49036/answer6.jpg>> In this example, the period is 10.

más de 10 años hace | 0

| aceptada

Respondida
Extract upper diagonal half in a large cell array and replace rest with NaN
A=[1 2 3 4; 5 6 7 8; 9 10 11 12;13 14 15 16] ii=ones(size(A)) idx=rot90(tril(rot90(ii)),-1); A(~idx)=nan

más de 10 años hace | 3

| aceptada

Respondida
Matlab AND operation concerning intervals
t = -1: 0.01: 4; s=zeros(size(t)) idx=t>=0 & t<=3; s(idx)=(-2/3)*t(idx) + 2; plot(t,s)

más de 10 años hace | 1

Respondida
surface plot with a matrix
<http://www.mathworks.com/matlabcentral/answers/123643#answer_131349>

más de 10 años hace | 0

Respondida
How to create a matrix?
n=4 % in your case use n=101 out=tril(2*ones(n),-1)

más de 10 años hace | 2

| aceptada

Respondida
how can plot complex data in matlab?
alpha=-pi:0.01:pi k=.5 x=k*cos(alpha); y=k*sin(alpha); fill(x,y,'r')

más de 10 años hace | 0

Respondida
how to dislay red color of an image
A(:,:,2:3)=0 imshow(A)

más de 10 años hace | 0

Respondida
Plot two graphs in one scope
export your two signals to workspace, then plot them in one figure

más de 10 años hace | 0

Respondida
How does fmincon work?
Benho, have you read the documentation? There are many examples there: <http://www.mathworks.com/help/optim/ug/fmincon.html>

más de 10 años hace | 0

Respondida
How do I multiply vector elements in the following fashion???
A=[18 44 20 55] B=[4 6] out=reshape(bsxfun(@times,A',B),1,[])

más de 10 años hace | 0

| aceptada

Respondida
why not this code run?
Your code should be something like this N=10; n=0:N-1; h=[0 0 0 1 -2.7083 4.1861 -3.0451 0.73071 0 ]; x=[01.9021 -1.1756...

más de 10 años hace | 0

Respondida
How do I find the sum of values in my cell array?
A={[1 2], [1 2 3 4 5],[0 8 7 6]} out=cellfun(@sum,A)

más de 10 años hace | 0

| aceptada

Respondida
Error in converting Decimals from Degree Minutes Seconds
v=[33 31.15 0] % 31.15 is not allowed by Matlab, it should be an integer out=dms2degrees(fix([33 33.15 0]))

más de 10 años hace | 1

| aceptada

Respondida
Elementwise subtraction .- does not work
bsxfun(@minus,[1 3; 4 5],[2 3])

más de 10 años hace | 1

| aceptada

Respondida
How do I write an if statement within a function that tells the user there is an error if the input is not one of the 5 string variables accepted?
You can use ismember function s={'R' 'P' 'S' 'L' 'K'} a='K' ismember(a,s)

más de 10 años hace | 0

Respondida
function to solve a binary matrix?
A =[0 0 1 0 1 0 1 0 1 0 1 0 1 0 0 1 0 1 1 0 1 1 1 1 1 1 1 1 0 1 0 1 1 1 0 1 0 0 0 0 0 0 0 1 1 1 1 1 0 1 0 1 1 1...

más de 10 años hace | 0

| aceptada

Respondida
command for delaying matlab to execute a certain line
Matlab execute the lines of your code one after another. The if statement will be executed after the calculation of s(i). What i...

más de 10 años hace | 0

Respondida
find 2 element in a 2x(number) matrix
A= [ 1,0 ; 5,1 ; 0,2 ; 5,5 ; 0,0 ; 12,-5] b=[0 0] idx=find(all(ismember(A,[0 0]),2)) %or idx=find(ismember(A,b,'rows'...

más de 10 años hace | 0

| aceptada

Respondida
Why continuous and discrete transfer function have different results
You are not expecting to get to get the same result from the two transfer function, the sample time will cause some difference, ...

más de 10 años hace | 0

Respondida
I having trouble with the for loop for the equation y=x^4-4x^3-6x^2+15. I need the x values to be -3 to 6
y =@(x) x^4 - 4*x^3 - 6*x^2 + 15 fplot(y,[-3 6])

más de 10 años hace | 0

Respondida
Change pzplot marker size
h=tf(1,[1 1 5]) pzplot(h) findobj(gca,'type','line') set(a(2),'markersize',7) set(a(3),'markersize',7)

más de 10 años hace | 2

| aceptada

Cargar más