Answered
problems with number of xticklabels
xticks(1:20) %you have to define xticks before xticklabels xticklabels({'1','2','3','4','5'..............'20'})

7 years ago | 1

Answered
how to write a matlab code for this physics problem?
Always remember eval is evil: Reason to avoid eval t=[0 100] %arbitrary time range since we don't know when it reaches ground...

7 years ago | 2

| accepted

Answered
Sum of rows in Magic square using nested for-loops
without loop is better: matrix=magic(10); sumRow=sum(matrix,2) with loop (inefficient) according to your requirement: matr...

7 years ago | 0

Answered
Error in script - 'undefined function'
Xi must be a numerical value , in your case you didn't define it which causes error

7 years ago | 0

Answered
write (-1,1), (-1,-1), (1,-1), (1,1) in matlab editor
vector [-1 1] %follow it for the rest

7 years ago | 0

Answered
Integrate a function over a triangle area
1) Find the equation of the 3 lines connecting the three points. 2)Split the domain according to upper limit and lower limit by...

7 years ago | 0

Answered
Error in power_spectrum (line 9) M = csvread(devc_file,2,0);
M = readtable('devc_file.csv')

7 years ago | 1

Answered
how can i seperate the value exp(1i*2*pi*bbbb);
syms x1 bb1 d1 isolate(d1==bb1.*x1,x1)

7 years ago | 0

Answered
fprintf the contents of a vector
EDITED But this method is much faster than yours: g=sprintf('%d ', vector1); fprintf('Vector1 : %s\n', g) g=sprintf('%d ', v...

7 years ago | 0

Answered
Surf function with interp: symmetric surface shown assymmetrically
https://www.mathworks.com/matlabcentral/answers/97324-how-do-i-interpolate-and-plot-3-d-surfaces-in-matlab#answer_106673

7 years ago | 0

Answered
Help with creating a Newton-Raphson algorithm function
Can anyone tell me what am I doing wrong? Since you created a function with a single output you have to also call it with an ou...

7 years ago | 0

| accepted

Answered
How to get the vector in a matrix (specific location)
A= [ 1 0 0 0 0 0 0 0 2 0 0 0 0 0 0 0 3 0 0 0 0 0 0 0 4 5 6 7 8 9 10 11] B = A...

7 years ago | 1

| accepted

Answered
p-code won't open
http://matlab.izmiran.ru/help/techdoc/matlab_env/ws_pat31.html https://www.mathworks.com/matlabcentral/answers/317625-safe-to-o...

7 years ago | 0

Answered
How to get the index of new number in descending sequence vector
location=find(ismember(C,B)) Note: logical indexing is faster than find

7 years ago | 1

| accepted

Answered
Can someone help me with this assignment?
fa=@(x) (2.*x.^3+3.*x.^2-6.*x+19)./(7.*x.^3-20.*x-5); % define the function for part (a)-REMEMBER to use element-by-element ope...

7 years ago | 0

| accepted

Answered
データストアを使用し、CSVファイルの指定列、指定行のデータを抽出
Read the while file using readtable() and then you can simply specify as such T=readtable('mycsv.csv'); T.column %where T i...

7 years ago | 0

Answered
how to print (function of x) in matlab ?
syms x y=x^4

7 years ago | 0

Answered
multiply a number to only a row in a matrix
volts0(1,:)*4 % here first row is multiplied by a scalar number like you wanted

7 years ago | 0

Answered
Subscripted assignment dimension mismatch.
f0=cell(1,50); %preallocation for i=1:50 f0{i}=ofun(x0(i,:)); end celldisp(f0)

7 years ago | 0

| accepted

Answered
Create a legend for complex numbers plot
legend({'poles of sys_a','poles of sys_b'})

7 years ago | 0

Answered
Error opening file Line 162
https://www.mathworks.com/matlabcentral/answers/222601-i-have-a-problem-with-opening-own-simulink-files?s_tid=answers_rc1-1_p1_M...

7 years ago | 0

Answered
How to plot a simple function that has a variable?
Read about fplot() syms x for a=1:3 func = x^2 + a*x - 6 ; fplot(func,[-10 10]) %ranging from -10 to 10 hold on end

7 years ago | 0

| accepted

Answered
Is it possible to obtain the equations of fitted curve and differentiate it to obtain the the rate of change of the data
Yes it is possible . Read http://matlab.izmiran.ru/help/techdoc/math/datafun18.html

7 years ago | 0

Answered
How to add the rows in a for loop
labels = 1:100; element_positions = cell(1,length(labels-10)); %preallocation ctr=1; for i = [1:9,11:19,21:29,31:39,41:49,51...

7 years ago | 0

Answered
How to access specific integer values from a String and Convert into Integers?
see datetime() str="2018-04-24 04:30:00" month=datetime(str,'Format','MM') year=datetime(str,'Format','yyyy')

7 years ago | 0

Answered
Error with code?
Always break long equation to pieces: C = 13.9 + 58.056*(x(1).^-0.3017) + ... (11.2657*(x(1).^(0.4925)))/(x(2).*1) + ... ...

7 years ago | 1

Answered
How to save the FFt results of an image in an array?
stored_values = cell(1,nfiles); %before loop stored_values{ii}=Y; %inside loop celldisp(stored_values) %outside loop [s...

7 years ago | 0

| accepted

Load more