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

mehr als 10 Jahre vor | 0

Beantwortet
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(...

mehr als 10 Jahre vor | 0

Beantwortet
Change x-axis.
Use xlim and ylim

mehr als 10 Jahre vor | 0

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

mehr als 10 Jahre vor | 0

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

mehr als 10 Jahre vor | 0

| akzeptiert

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

mehr als 10 Jahre vor | 0

Beantwortet
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,'[,...

mehr als 10 Jahre vor | 1

| akzeptiert

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

mehr als 10 Jahre vor | 0

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

mehr als 10 Jahre vor | 0

| akzeptiert

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

mehr als 10 Jahre vor | 0

| akzeptiert

Beantwortet
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

mehr als 10 Jahre vor | 3

| akzeptiert

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

mehr als 10 Jahre vor | 1

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

mehr als 10 Jahre vor | 0

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

mehr als 10 Jahre vor | 2

| akzeptiert

Beantwortet
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')

mehr als 10 Jahre vor | 0

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

mehr als 10 Jahre vor | 0

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

mehr als 10 Jahre vor | 0

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

mehr als 10 Jahre vor | 0

Beantwortet
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,[])

mehr als 10 Jahre vor | 0

| akzeptiert

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

mehr als 10 Jahre vor | 0

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

mehr als 10 Jahre vor | 0

| akzeptiert

Beantwortet
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]))

mehr als 10 Jahre vor | 1

| akzeptiert

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

mehr als 10 Jahre vor | 1

| akzeptiert

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

mehr als 10 Jahre vor | 0

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

mehr als 10 Jahre vor | 0

| akzeptiert

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

mehr als 10 Jahre vor | 0

Beantwortet
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'...

mehr als 10 Jahre vor | 0

| akzeptiert

Beantwortet
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, ...

mehr als 10 Jahre vor | 0

Beantwortet
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])

mehr als 10 Jahre vor | 0

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

mehr als 10 Jahre vor | 2

| akzeptiert

Mehr laden