Answered
How to fix "Index exceeds array bounds"?
x=[1,2,3,4,5,6]; h=[4,5,6]; X=[x,zeros(1,length(h)-1)]; H=[h,zeros(1,length(x)-1)]; output=length(x)+(length(h)-1)...

8 years ago | 0

| accepted

Answered
how to combine strings
An example: (since you didn’t post the code but this syntax _strcat()_ should work for your case ) s1 = {'abcde'}; s...

8 years ago | 0

Answered
how can I take numeric result
phase=@(a,u)(atan(a)-atan(1/a)*u*180/pi) phase(3,1) % a=3 & u = 1

8 years ago | 0

Answered
Finding and Identifying Roots
See <https://www.mathworks.com/help/matlab/ref/roots.html roots()>

8 years ago | 0

Answered
How to plot two vectors while pausing between plotted points
figure(1) for k=1:(length(time1)-1) disp(time1(k)) plot(S_1E(k),S_1N(k),'LineWidth',2.5); title( sprintf...

8 years ago | 0

Answered
How can I create an array of 100 elements
n=1:100 sequence = 1 ./ sqrt(2*n.^2) Or syms n s=1:99 sequence = 1 ./ sqrt(2*n.^2) array...

8 years ago | 0

| accepted

Answered
for loop to remove corresponding vector values
y = [1 2 3 4 5 6] q = [8 26 1 5 1 6] y(y==5 | y==6)=[] q(q==8 | q==26)=[] You don’t need loop to do this e...

8 years ago | 0

Answered
How to find a string in the following cell structure?
index = find(strcmp({structname.field}, 'string')==1) Read the link below: <https://www.mathworks.com/matlabcentral/answer...

8 years ago | 0

Answered
Hi i am Dimitrios Gerontitis i have already written a function for a matrix A which i use to a system Ax=b where x is the unknown vector which inludes Fourier Coefficients. So i want to ask how i can fix my code to take my resuts faster
Read about <https://www.mathworks.com/matlabcentral/answers/99124-how-do-i-pre-allocate-memory-when-using-matlab preallocation>

8 years ago | 0

| accepted

Answered
How to tell MATLAB to compare two row vectors
Maybe try: n=A<0; C=B; C(~n)=0;

8 years ago | 0

Answered
How to solve error with data file
Read the below links to process sequence of files: <https://www.mathworks.com/help/matlab/import_export/process-a-sequence-of-f...

8 years ago | 1

| accepted

Answered
how to divide a matrix into groups
A=[0;0.2;0.25;0.3;1;1.5;4;4.75;5;6;9;10] A=reshape(A,4,3) a=A(:,1) b=A(:,2) c=A(:,3)

8 years ago | 0

| accepted

Answered
How to recall values from for loop into a column matrix?
E1 = 27.1; % measured in Msi E2 = 1.3; % measured in Msi E3 = E2; v12 = 0.33; v21 = E2*(v12/E1); v13 = v12; ...

8 years ago | 0

| accepted

Answered
how to split strings equally with a rest
input_string ='abcdefghijk' % don’t use variable name as input because it may contradict with built-in function ns = numel(...

8 years ago | 0

| accepted

Answered
How to find average of a single column of imported excel file as a single number
m,txt,raw] = xlsread(filename) A=num ; mean(A(:,1)) % gives you the average of the first column

8 years ago | 1

| accepted

Answered
how to get summation of column-2 values by comparing column-1 values in matlab
A=randi([1 9],10,2) size(A) A1=A(:,1) B=A(:,2) sum(B(A1==2))

8 years ago | 0

Answered
How to resolve the error 'Initializing' when I start running the application?
hi this happened to me as well, just close the application and open it , also make sure the internet connection is strong ...

8 years ago | 0

Answered
How do I input the y-coordinate as a variable in Matlab?
syms y Uwind = -75*(1-((75-y)/75)^2) fplot(Uwind) is this what you are looking for ? if not let know

8 years ago | 0

Answered
what is wrong with my answer?
*Edited* C=(1/10).^6; grid; R=10000; f=(-200)*10.^3: 50000: (200)*10.^3; C=(1/10).^6; H=(1./(1+(j*2*f*R*C))...

8 years ago | 0

| accepted

Answered
Can any one pls help me this code. It is showing that the vectore length are not equal. What should I do?
figure() plot(x(1:numel(y1)),y1,'r') figure() plot(x(1:numel(y2)),y2,'g') figure() plot(x(1:numel(y3)),y3,'r') ...

8 years ago | 1

| accepted

Answered
How to plot a periodic signal with variable duty cycle?
N = 500; %number of interactions fs = 1000; %frequency of sampling ts = 1/fs; f0 = 100; ...

8 years ago | 0

Question


is it possible that answers can be accepted?
<https://in.mathworks.com/matlabcentral/answers/51645-how-to-find-out-if-a-number-is-even-or-not#comment_620508> if you click th...

8 years ago | 5 answers | 2

5

answers

Answered
Simulink causes MALTAB TO crash on Fedora 28
same issue read the links below: <https://in.mathworks.com/matlabcentral/answers/275176-matlab-crashes-on-startup-segmentatio...

8 years ago | 0

Answered
I'm entering a function which returns an error, "requires more input parameters to run,"
options=odeset('RelTol',2.22045e-14,'AbsTol',[1e-14 1e-14]); [t,y]=ode113(@pendode2, [0 1000], [0 0.2], options); fun...

8 years ago | 1

| accepted

Answered
How do I solve for eigenvalues symbolically?
syms Na Ma Mq I wr Mpa adoty = [Na 0 0 -1 ]; adotp = [0 Na 1 0 ]; qdot ...

8 years ago | 1

| accepted

Answered
Hi every one. I have a text file with difficult structure to read with ordinary matlab command. Also, I don't have enough practice to read it. Can anyone please help me to read it out. Thank you very much.
>> fid=fopen('20180101.txt','r') file=textscan(fid,'%s %*s \n','Delimiter','') fclose(fid); celldisp(file) fid...

8 years ago | 0

Answered
how I can write this expression of summation in Matlab
t=-200:1:200; k=linspace(-9,9,numel(t)) S1 = 1i/4.*cumsum((sinc((k+2/2))-sinc((k-2)/2)).*exp(1i.*10.*pi.*k.*t) ) plo...

8 years ago | 0

| accepted

Answered
How to store values in cell array?
An example: A = {rand(4)} %stores the matrix as a cell array if you use curly braces you can access the elements like a ...

8 years ago | 1

Answered
hey my computer is 32 bit i need to install mat lab to do my project so do you have any way to install on my computer
similar question with answer: <https://in.mathworks.com/matlabcentral/answers/109219-how-do-i-download-32-bit-matlab#answer_1...

8 years ago | 0

Load more