Answered
Create data set according to a plot ?
t = [0 10 15 30 40 50 60] ; vel = [20 20 30 30 10 5 5] ; plot(t,vel) ylim([0 35])

7 years ago | 0

| accepted

Answered
How to plot two columns when another column has a specified value
idx1 = contains(type,'dipslip') ; idx2 = contains(type,'strikeslip') ; figure hold on plot(moment(idx1),Area(idx1),'Or') pl...

7 years ago | 0

| accepted

Answered
Ctrl+Enter running the entire program
YOu should use %% this at the start and at the end to run a section.

7 years ago | 0

Answered
Use for loop in array
a = rand(10,1) ; for i = 1:length(a) a(i) end

7 years ago | 0

Answered
How to find the Statistical Properties(Mean, Standard Deviation, Skwness and Kurtosis) of image?
Mean: https://in.mathworks.com/help/images/ref/mean2.html std: https://in.mathworks.com/help/images/ref/std2.html skew...

7 years ago | 0

| accepted

Answered
Finding the tangent line of an ellipse
https://in.mathworks.com/matlabcentral/answers/89306-tangent-line-to-a-curve-at-a-given-point

7 years ago | 0

Answered
Function ontput missed or not assigned
function [y1 y2]=xxx(u) if u<10 y1=1 ; y2= [] ; else y1 = [] ; y2=1 ; end end

7 years ago | 0

Answered
using for loop in alignsignal function
[m,n] = size(X) ; Xa = zeros([],m) ; Ya = zeros([],n) ; for i = 1:n [xa,ya] = alignsignals(X(:,i),Y(:,i)) ; Xa(:...

7 years ago | 0

Answered
Triangulation within specified region
Read about delaunayTriangulation , you can provide edge constraints. On providing these constraints; you can avoid such triangle...

7 years ago | 1

| accepted

Answered
How to read a .txt file and convert to an image in MATLAB?
A = load('USER-1-1-1.txt') ; imagesc(A)

7 years ago | 0

Answered
Plotting functions in matlab
Use hold on while plotting. figure hold on plot(rand(10,1)) ; plot(rand(10,1)) ; legend() To see different types of plo...

7 years ago | 1

Answered
how to write an array to file
writetable(array2table(S),'test.xlsx') Or xlswrite('test.xlsx',S) ;

7 years ago | 1

| accepted

Answered
Why it gives Invalid use of operator error?
Try this: clc; clear all ; close all; clear; clc; umatrix = zeros(200, 1); Cmatrix = zeros(200, 1); j = 1; % (1) Ge...

7 years ago | 0

| accepted

Answered
Plotting 2 columns in a matrix within a range of values of a 3rd column
You should proceed lie this: A = [1 2 2 1.2 2 3 1.2 5 1 2 4 1 3.5 3 5 ...

7 years ago | 1

| accepted

Answered
Sorting Struct elements in Numerical order
Use this function from file exchange: https://in.mathworks.com/matlabcentral/fileexchange/47434-natural-order-filename-sort

7 years ago | 2

| accepted

Answered
"Assignment between unlike types is not allowed" in STRUCTURES
You amy try something like this: PN = struct ; PN(1).SM(1).X = rand(10,1) ; PN(1).SM(2).X = rand(20,1) ; PN(1).SM(3).X...

7 years ago | 0

Answered
MATRIX REPRESENTATION OF COLOUR IMAGES
Read bout rgb2gray

7 years ago | 0

Answered
Filling area in a plot
A = [0.01 1.88 0.05 1.92 0.10 1.60 0.15 1.23 0.20 1.00 0.25 1.00 0.95 1.00 0.99 1.00...

7 years ago | 1

| accepted

Answered
grid coarsening of topographic data
Read about imcrop and interp2 and griddata.

7 years ago | 0

Answered
Problem in plotting the graph.
x = -3:0.01:5 ; y = (x+5).^2./(4+(3*x).^2) ; plot(x,y) in y there should be element by element division.

7 years ago | 1

| accepted

Answered
Plotting Negative Values in a Loop
figure(3) hold on for i = 1:1:10 plot(x(i), y_fit(i),'.') pause(0.5) end hold off OR plot(x, y_fit)

7 years ago | 0

Answered
How to cover an irregular closed area with square pixels
Check the code: R = 1. ; C = [0. 0.] ; th = linspace(0,2*pi) ; xc = C(1)+R*cos(th) ; yc = C(1)+R*sin(th) ; % M...

7 years ago | 0

Answered
Making a video of fullscreen frames with getframe()
Initilaize the figure using: figure('units','normalized','outerposition',[0 0 1 1])

7 years ago | 4

| accepted

Answered
How to Save image using imwrite?
I1 = imread('DiseasedBW.tif') ; I2 =imread('HealthyBW.tif') ; I3 = [I2, I2, I2; I2, I1, I2; I2, I2, I2]; imwrite(I3,'Middisea...

7 years ago | 0

| accepted

Answered
Sorting through labelled data
str = { '0,Negative' '1,Negative' '1,Positive' '2,Negative' '2,Positive' '3,Positive' '4,Negative'...

7 years ago | 0

| accepted

Answered
Plotting sparsity pattern of a matrix
YOu can plot the required sparsity using different colors and markers. This might help. A = rand(10) ; figure hold on sp...

7 years ago | 0

Answered
How to import a CSV file and then have a user input dates and return those dates and plot
To load the data from csv file use readtable or csvread or xlsread. My choice would be radtable. Enter the required values of ...

7 years ago | 0

Answered
Plotting problem & Does the matlab can plot raster map?
Let X,Y,Z be your m*3 data. x = unique(X) ; nx = length(x) ; y = unique(X) ; ny = length(y) ; X = reshape(X,nx,ny) ; Y ...

7 years ago | 1

| accepted

Answered
How to fill a Temperature Transect Plot?
Read about griddata.

7 years ago | 0

Answered
How to find distance between peaks on a plot like this?
Read about findpeaks. It will give indices also. From these indices, you can get the distance.

7 years ago | 0

Load more