Answered
plot a table of two columns
If T is your table. To plot use: plot(T.(1),T.(2))

6 days ago | 1

| accepted

Answered
Write function that returns true if (inputmatrix > 0)
A = rand(5) ; P = A > 0.5

6 days ago | 0

Answered
Why isn't the plot showing up? (new on programing)
x = linspace(-10,10,100); y = @(x) (x.^2 + x.^2 + 3.*x)./(x.^2 + 4.*x + 5); % element by elememnt division plot(x,y(x),'r','L...

6 days ago | 0

| accepted

Answered
How to get the centerline of a binary region
You can get the indices of white pixels using find and to the data you can try fitting a line or quadratic equation using polyfi...

6 days ago | 3

Answered
Transforming 4 sets of 1x4 matrix into a 4x4 matrix
zetaliq=zeros(4); for j=1:4 zetaliq(j,:)=(pi/6).*rholiq.*(X1.*m1.*d1^(j-1)+X2.*m2.*d2^(j-1)) ; end zetaliq

6 days ago | 0

| accepted

Answered
Grouping data into bins and then plotting them
You can calculate the every three hours mean using the fuction retime. Read about it. To see the variation of every hours, stria...

6 days ago | 0

| accepted

Answered
How to delete some of anonymous variables randomly?
Multiply each variable with a constant array, and assign this contant array with 0 and 1. See to it that, randomly only three 1'...

6 days ago | 0

Answered
Array indices must be positive integers or logical values.
%Euler Method %parameters g=9.81; rho=1.2; s=0.00011; m=0.023; Cd=0.9; %Initial Condition V0=0; V=zeros([],1); %I...

7 days ago | 1

| accepted

Answered
how can I find the maximum value of a parameter running within a loop
maxC = 0 ; for i=1:100 A=f(i) ; B=f(A,i) ; C=f(B,i) ; if C > maxC maxC = C ; Amax = A ;...

7 days ago | 0

| accepted

Answered
make a matrix out of list
Read about importdata. You can import the data into MATLAB, the data will be a cell array. S = importdata('myfile.txt') ; cel...

7 days ago | 0

Answered
How could I write in a vector something in a position different to a given one?
v = [1,2,3,4,5]; idx = 3; iwant = NaN(size(v)) ; iwant(idx) = v(idx)

8 days ago | 1

Answered
How to store data when a string condition of another column is met?
T = readtable('https://in.mathworks.com/matlabcentral/answers/uploaded_files/768171/SED_FULL_NE.xlsx') ; id = [1 4 12] ; T =...

8 days ago | 0

Answered
Finding coefficients from 4 degree polynomial
Read about polyfit. This will help you to fit the required degree polynomial and also gives you the coefficients. Also have a lo...

8 days ago | 0

Answered
black line frame around scatter3
You can draw lines using line. Read about it. Also try box on.

8 days ago | 0

Answered
What is the difference between [v' 1] and [v', 1]?
v = rand(3,1) ; [v' 1] [v',1] That is nothing but vector v is increased by one element at the end and the value is 1.

8 days ago | 0

| accepted

Answered
Split the graph based on a specific value
Let (x,y) be your data. idx = knnsearch(y,mean(y)) ; % this will give index in y which is close to mean(y) % plot plot(x(1:...

8 days ago | 0

Answered
Plot Modes of a cylinder in 3D
Have a look on this: https://in.mathworks.com/matlabcentral/fileexchange/34143-meshing-thin-shells-using-four-noded-elements?s_t...

9 days ago | 1

| accepted

Answered
Error using plot Data must be numeric, datetime, duration or an array convertible to double.
Variable phi used in the plot is a symbolic variable. 1/3 - (310775629405771*exp(t*4i))/576460752303423488 You cannot plot tha...

9 days ago | 0

| accepted

Answered
vpa is not outputing enough digits
It seems a is a rational number so there are no digits to display else from zeros. Where as pi is a irrational number, so you ha...

9 days ago | 0

Answered
Draw the ezplot for the function 𝑥^ 2 + 6𝑥 + 55
It is very striaght forward and very easy to plot. Just read the documentation. It got example problem with which you can learn ...

9 days ago | 0

Answered
How plot 4D data?
x = 0.1:0.01:0.19; y = 0.1:0.01:0.19; z = 0.1:0.01:0.19; [x,y,z] = meshgrid(x,y,z) ; f = x.*exp(x.^2 + y.^2 + z.^2); fig...

9 days ago | 3

| accepted

Answered
how to rectify the below error..
You need to have the function cheb.m, which you can download from: https://people.maths.ox.ac.uk/trefethen/cheb.m and then yo...

10 days ago | 0

Answered
Move to next and previous iteration in for loop on button press
%Right for i = 1:10 fprintf('%d\n',i) end % Left for i = 10:-1:1 fprintf('%d\n',i) end

10 days ago | 0

Answered
How to plot a function with 3 independent variables
f = @(x,y,z) 0.95*x+0.73*y+0.62*z-130.05 ; x = linspace(0,100) ; y = linspace(0,100) ; z = linspace(0,100) ; [X,Y,Z] = me...

10 days ago | 0

| accepted

Answered
NaT in Datetime Import Data
Try using readtable. Read about it. T = readtable('myfile.xlsx') ;

10 days ago | 0

Answered
How do I copy column datas from multiple .txt file to new file?
You can read your text file using the below code snippet. filename = 'ab20140102.txt' ; fid = fopen(filename,'r'); data = tex...

10 days ago | 1

| accepted

Answered
Why is my plot not working in my for loop?
This line: theta2=linspace(0,2*pi,2*pi/360); gives you theta2 as an empty matrix, as you have used this for loop indexing, you...

10 days ago | 0

Answered
how to get Zm
syms Km Zm Ym [2 2] syms Z R S L Z=R+S*L ; Km=[1 Z; 0 1] ; Zm = sym('Zm',[2 2]) ; % Relation between Km and Zm Zm(1,1)=(K...

11 days ago | 0

Answered
How to access a variable stored in group
file1 = 'tropomi1.nc' ; file2 = 'tropomi2.nc' ; x1 = ncread(file1,'/PRODUCT/longitude'); y1 = ncread(file1,'/PRODUCT/latitude...

11 days ago | 1

Answered
bracket for p value
Read about annotation, line, text.

11 days ago | 0

Load more