Answered
Generate same random permutations (reshape) for sequence?
a=[0 0 0 1 0 0 0 0 1 0 1 0 0 0 1 0 1 0 1 0]; reshape(a,2,[])'

7 years ago | 1

Answered
Code working on Matlab 2017 but not 2015
I suspect it's a user defined function not in inbuilt function. which GenerateTone -all %what does it show?

7 years ago | 0

Answered
Wrong symbols in the legend
https://in.mathworks.com/matlabcentral/answers/3669-legend-dynamically-updated#answer_5305

7 years ago | 0

Answered
I need to solve a stiff ODE system using fourth order Runge-Kutta Method
Since the suspected system of ode is stiff use ode15s as mentioned and also the experts suggest in the comments above https://in...

7 years ago | 0

Answered
Why is my matrix deformed?
fprintf('%s %s %s %s %s %s\n',str1,str2,str3,str4,str5,str6); ...

7 years ago | 0

Answered
Error using plot Vectors must be the same length in convolution
size(t) , size(y1) and size(y2) have to be the same

7 years ago | 1

| accepted

Answered
Starting from an interval T = 100∆t, and saving at intervals increasing each one by 10%
No loops needed T=100:0.1:end_point

7 years ago | 0

| accepted

Answered
Rename only some instances
ctrl+f and then replace ?

7 years ago | 0

| accepted

Answered
Replace an array of symbolic variables
Don’t even think of assigning variables dynamically use cells instead.

7 years ago | 0

Answered
Hi guys how can swap the max value and min value for a matrix ?
No loops needed: A=[1 2 3; 4 5 6;4 7 8] [value,idx]=max(A(:)) [val,iddx]=min(A(:)) A(idx)=val; A(iddx)=value

7 years ago | 0

Answered
How can I convert a matrix of numbers into a cell array of names?
Like the below? a= [3 20 12 6 9 19 11 2 18 7 14 10 1 4 5 15 ...

7 years ago | 0

| accepted

Answered
how to place the coefficients of the y in a vector to find the roots?
clear all syms st stx = 1 sty = 2 stz = 3 tauxy = 4 tauyz = 5 tauzx = 6 y = st.^3 - (stx +sty + stz).*st.^2 + (stx.*sty ...

7 years ago | 0

| accepted

Answered
I have a set of second order differential nonlinear equation and I want to solve them together with ode45, how could I write codes for them?or better to say I want to define state transition function for such equations.
I believe : [t,x]=ode45(@eqns,[0 10],[1;0;0;0;0;0;0;0;0;0;0;0]); % function call plot(t,x(:,1)) % to plot the solution f...

7 years ago | 0

| accepted

Answered
Use built-in bvp4c to solve thermal problem
Problem3 %function call function res = bcfun(Ta,Tb) BCa = 473; BCb = 273; res = [Ta(1)- BCa Tb(1) - BCb]; end fu...

7 years ago | 1

| accepted

Answered
Function with different parameters
Parameterize your function s0=1; c0=0; t=linspace(0,10,100); x0=[s0 c0]; for e =[0.0001,0.0005,0.001,0.005,0.01] [t,x]=ode...

7 years ago | 0

| accepted

Answered
I want to use inverse laplace with tf function. How can I do it? I take an error in matlab when ı use code like below.
https://in.mathworks.com/matlabcentral/answers/415409-how-to-get-a-inverse-laplace-of-a-tf#answer_333322

7 years ago | 0

Answered
Plotting results on for loop.
Eval is evil also no loop is needed for your case. clear all; eu = exp(1); g = 9.81; c = 12.5; m = 68.1; x = 0:.2:10; % sm...

7 years ago | 0

Answered
come posso avere la dimensione di T come la dimensione di x
x = [.1 .2 .3 .7 ; .8 .9 .1 .2 ];% Funziona con questo array. T=zeros(size(x)); T(x>.5) = x(x>.5); T(x<=.5) = 1

7 years ago | 0

Answered
matrix dimensions must agree?
mu = [10 20 30 45 50 60]; Ve= [125 120 120 120 120 12...

7 years ago | 0

| accepted

Answered
Index exceeds array bounds
I am not going to understand what you mean but see the example below: x=1:10 x(11) % you will get the error INDEX EXCEEDS ARRA...

7 years ago | 0

Answered
hi - i want to minimize the max of sum of matrix column - my matrix is 10*10 random matrix -i really get confused so plz help me if you can - thank U so much
Your question is a bit confusing. [value,index]=min(sum(yourmatrix,2)) %or [Value,Index]=min(sum(yourmatrix,1))

7 years ago | 0

Answered
Is there a quick and easy way to insert/delete values into the middle or beginning of a cell array and/or a numerical array
a=1:11; a(1) = somevalue%first element [] square bracket removes that element a(fix(mean(a))) %mid element a(end) % last elem...

7 years ago | 0

Answered
Can anyone check my code for ode45 function question?
Just noticed it you need to reduce your second order to first order to ode as below: syms y(t) ode1=diff(y,2) == 1-y^2; ode2=...

7 years ago | 1

| accepted

Answered
why the error is written here (Not enough input arguments.)
[t,y]=ode45(@project,[0 10],[0;0;0;0]) ; % you forgot to call the function with input arguments plot(t,y(:,1)) figure plot(...

7 years ago | 1

| accepted

Answered
how to zero pad a shorter wav file to the same length of a longer wav file? how to make the length of these wav file equal by zero padding?
n1=length(x1); n2=length(x2); n3=length(x3); N=[n1 n2 n3]; NN=max(N); t1=linspace(0,n1/fs1,NN); t2=linspace(0,n2/fs2,NN); ...

7 years ago | 0

Answered
How to find a value and set the following 2 value to NaN?
A=randi(10,1,10).' idx=find(A==1); A([idx idx+1 idx+2])=NaN

7 years ago | 1

| accepted

Answered
Can you solve this question? It is Euler method
Since it cannot be solved symbolically we convert it to numerical method: syms T(t) C(t) con1=T(0)==16 ; con2=C(0)==1 ; ode1...

7 years ago | 1

| accepted

Answered
getting error , i want to solve 6 equation by fsolve
x0=[1;1;1;1;1;1]; xsol=fsolve(@(x) solar(x),x0) % function call function F= solar(x) % function definition j=5.67e-8; ...

7 years ago | 0

Answered
how to repeat a vector a lot of time
Either you should copy it lesser number of times or buy more memory.

7 years ago | 0

Load more