Answered
How to product two vector with difference sizes?
Line 11 should be Ta(s1)=exp(-1i*2*teta0(s1)*k*r1(s1)); You missed the index s1 in r1 (r1(s1) insteas of r1)

10 years ago | 0

Answered
Replace values in a matrix with values from another matrix if a condition is met
a = [11 25 55 75 105] b = [15 30 50 80 100] c=min(a,b)

10 years ago | 2

| accepted

Answered
How to convert time into matlab system?
A={'2000/02/15' '12:30';'2015/03/16' '18:55'} b=arrayfun(@(x) strjoin(A(x,:)),(1:size(A,1))','un',0) out=[A b]

10 years ago | 0

| accepted

Answered
How do I import data form an excel file into MATLAB?
[num,text,both]=xlsread('yourFileName')

10 years ago | 0

Answered
load ECG sig to simulink
Your file should look like t=0:0.1:10 % time Vector y=sin(t) % Your signal v=[t;y]; save your_mat_file v Then in ...

10 years ago | 0

Answered
How to declare global variable
function y=fcn1(~) global your_variable do it in all your functions

10 years ago | 0

| accepted

Answered
For loop operation on vectors
They are different, type format long IB

10 years ago | 1

| accepted

Answered
if i have two matrix like i want to do some operation on it
A1=reshape(A',1,[]) B1=reshape(B',1,[]) C1=A1(randperm(numel(A1))) C2=B1(randperm(numel(B1)))

10 years ago | 0

Answered
exp(log(x))-x?
<http://matlab.wikia.com/wiki/FAQ#Why_is_0.3_-_0.2_-_0.1_.28or_similar.29_not_equal_to_zero.3F>

10 years ago | 0

Answered
Same error in stemming
If b is a cell array Use if b{k}=='s' or if ismember(b(k),'s')

10 years ago | 0

Answered
how do i access signal logging data
Use to workspace block

10 years ago | 0

Answered
may i ask how to separate a value into two different values? For example, 12 can be separate into 8 and 4..
If you mean how to do it randomly with integer numbers: N=12 a=randi(N) b=N-a

10 years ago | 0

| accepted

Answered
how to merge a 181x1 and 1x70 vector to create a matrix
You can use repmat function A=rand(181,1) out=repmat(A,1,70)

10 years ago | 0

Answered
What versions of Matlab are supported on Windows 10
<http://www.mathworks.com/matlabcentral/answers/223444-is-matlab-compatible-with-windows-10>

10 years ago | 0

Answered
genvarname({'A', 'A', 'A', 'A'});
genvarname(repmat({'A'},1,5),'A')

10 years ago | 0

| accepted

Answered
Why in Simulink a Matlab function block changes its output when changing the solver?
It happens that Simulink gives different results for different solvers, especially when the type of equations it has to solve, r...

10 years ago | 0

Answered
How to solve implicit equation with two variables?
solve('a^3-6*b*a^2-12*a*b^2-8*b^3==0','a')

10 years ago | 0

Answered
How can I use lsim for a constant value input signal
you said your signal is a constant |6| for example, then for each instant t, the value of your signal is equal to |6|. If |t=[0 ...

10 years ago | 0

| accepted

Answered
How to use 'mex -setup' to select a supported C-compiler?
In Mtlab widows command type: mex -setup Depending on the Matlab version you are using, search in Google for this S...

10 years ago | 0

Answered
Regarding integer and floating point number in an array
Maybe it displays it as 0, but doesn't makeit equal to zero, for example a=[1235.25 1] displays it as 1.0e+05 *...

10 years ago | 0

Answered
How to reduce this matrix?
M=[1 0.1 1.1; 1 0.1 1.1; 3 0.1 1.2; 2 0.2 3; 1 2 4; 2 2 4; 2 3 5] [ii,jj,kk]=unique(M(:,2)) a=accumarray(kk,M(:,1)) b=accum...

10 years ago | 0

| accepted

Answered
plotting in for loop
clc;clear; a=1;t1=100;t2=20;l=.01;k=1; syms ts hh=1:100; for h=hh q=-(a*h*(ts-t2))+(k*a*(t1-ts)/l); Ts=solve(q);...

10 years ago | 1

| accepted

Answered
how to delete column with one number only
A(:,sum(A)==1)=[]

10 years ago | 0

| accepted

Answered
How can I find the two lowest peaks in many different graphs?
If y is your signal p=findpeaks(y) a=sort(p) out=a(1:2)

10 years ago | 0

| accepted

Answered
How to select all values of a cell array between two cells?
V=xlsread('file.xlsx') out=V(2:end,2:end)

10 years ago | 0

| accepted

Answered
solve a equation with two variable
<http://www.mathworks.com/help/symbolic/solve.html>

10 years ago | 0

| accepted

Answered
Symbolic or function handle to numeric
syms x; y=x^2; out=subs(y,[1 2 3])

10 years ago | 0

Answered
openfig gives figure with no handle!
h.number

10 years ago | 0

Answered
1-d curve equation
out=interp1(t,data1,20,'linear','extrap')

10 years ago | 0

Answered
Storing values from for loop and plotting
T1=15000000:500000:50000000 for k=1:numel(T1) T=T1(k); Chi_Rad = Chi_0 * Density_CGS^2 * T^(-3.5); % (1/cm) Ch...

10 years ago | 0

| accepted

Load more