Answered
Calculate a letter from equation with letters.
syms Xe Ye a1 a2 cos1 cos2 sin1 sin2 eqn1=Xe == a2*(cos1*cos2-sin1*sin2)+a1*cos1; eqn2=Ye == a2*(sin1*cos2)+a1*sin1; sol = so...

6 years ago | 0

| accepted

Answered
How can I mosaic two images
Read both the images using imread. Check the sizes of both the images. Convert the images two same size if they are not in s...

6 years ago | 0

Answered
How to plot different markers on the same graph based on "if" statement
figure hold on idx = strcmp(c,'air') ; plot(x(idx),y(idx),'+r') idx = strcmp(c,'land') ; plot(x(idx),y(idx),'+b')

6 years ago | 0

| accepted

Answered
Extracting elements from a matrix
% Random data for demo A = rand(50,1) ; B = A(randperm(50,5)') ; % select five elements of A randomly C = rand(50,1) ; ...

6 years ago | 0

| accepted

Answered
how can I import my data from a text file containing different columns with text characters at the first line and then plot them ?
data = importdata(mytextfile) ; B = data(:,2) ; C = data(:,3) ; plot(B,C) Also read about readtable, load, textscan.

6 years ago | 0

Answered
Forward, backward and modified Euler methods; plots do not come as usual, HELP
The solution of numerical model depends on the number of discretization. The more the discretization (time step dt here) the clo...

6 years ago | 0

Answered
"Error not enough input arguments "
I think you are running your code by using either run button or F5 button. This is a function, you cannot run like that. You nee...

6 years ago | 0

| accepted

Answered
Adding two vectors of different classes
a = [13 13 14 15 14 15 13 14 15]; %double b = 'ABAABBAAB'; %char b = num2cell(b) ; a = strsplit(num2str(a)) ; iwa...

6 years ago | 0

Answered
How do i make multiple conditions for multiple variable
if ~(( x > -3) & (x < 3)) error("Please check the value of x ") end if ~(n>=2) error("Please check the value of n") ...

6 years ago | 0

Answered
How to graph the function f(x,y)=9 - x^2 - 9*y^2 in 3D
m = 100 ; n = 100 ; x = linspace(0,1,m) ; y = linspace(0,1,n) ; [X,Y] = meshgrid(x,y) ; Z = 9-X.^2-9*Y.^2 ; surf(X,Y,Z...

6 years ago | 0

Answered
Calculation of total pixels, xy coordinates and color for each pixel for overall image area.
You hcan read the image using imread. It will be a 3D matrix. I = imread(myimage) ; R = I(:,:,1) ; % REd channel G = I(:,...

6 years ago | 1

Answered
How to fit a circle in the marked area of the image?
If you fix the center C, radius R of the circle. You can plot circle using. C = rand(1,2) ; % center of circle R = 1. ; ...

6 years ago | 1

Answered
I want to create a colormap table. How do I create one? Please help me.
A = [3 7 5 ; 8 11 9 ; 1 5 2] ; pcolor(A) colorbar

6 years ago | 0

| accepted

Answered
Prime number function Help!
If A is your array, iwant = A(isprime(A))

6 years ago | 0

Answered
how to change this?
M_array = str2double(num2cell(M))

6 years ago | 1

| accepted

Answered
How to display all contents of 1x2 structure on command window
Try struct2table https://in.mathworks.com/help/matlab/ref/struct2table.html

6 years ago | 0

Answered
How to find quadratic part of a symbolic polynomial
Read about coeffs. This will gove you all the coefficients. c = coeffs(p,'All') ; c has all the coefficents, you can pcik yo...

6 years ago | 1

| accepted

Answered
create non uniform increment vector
k = num2str([1:10 9:-1:1]) ; k(k == ' ') = [] ; k

6 years ago | 0

Answered
How to access data in a nested structures
How about this? [[a(:).b].c]

6 years ago | 0

Answered
how to scan binary image and stop if value image=0
I = imread(myimage) ; I1 = rgb2gray(I) ; [y,x] = find(I) ; % this will gives points/ indices which have pixel value 1 imsh...

6 years ago | 0

Answered
How to read multiple files in a loop in sequential order and plot them as matrix
txtFiles = dir('*.txt') ; N = length(txtFiles) ; iwant = cell(1,N) ; for i = 1:N iwant{i} = importdata(txtFiles(i).na...

6 years ago | 0

| accepted

Answered
how to change color line of mutiple result line plot in one graph
Demo example: x = 1:100 ; y = rand(size(x)) ; figure hold on plot(x(x<=25),y(x<=25),'r') plot(x(x>25 & x <=50),y(x>2...

6 years ago | 1

| accepted

Answered
Inserting NaN for unknown data
clc; clear all ; C = [1, NaN; 2, 100; 3, 450; 4, NaN; 5, 500; 6, NaN; 7, 800; 8, 850; 9, NaN; 10, NaN] ; A = (1:10)' ; B = ...

6 years ago | 0

| accepted

Answered
How to delete certain data corresponding of other value?
n = length(b) ; a = a(end-(n-1):end)

6 years ago | 0

| accepted

Answered
How to add arrow at Node Points?
Read about quiver. You can make your force a vector and plot it using quiver.

6 years ago | 0

| accepted

Answered
Data comparison and selection the smallest
You can read about the function min

6 years ago | 0

| accepted

Answered
How do I create a Contour plot such as below with three interdependent variables?
data = xlsread("Book1.xlsx") ; % you can use readtable also data(:,2) = [] ; % second column if NaN's remove it x = data...

6 years ago | 0

Answered
multiplying vectors (easy one!)
m = 100 ; x = linspace(-0.2,0.8,m) ; Evaluate the function for every value of x. Read about element by element operations.

6 years ago | 0

Answered
How do I create a video from an animated plot?
You can make gif image. https://in.mathworks.com/matlabcentral/answers/94495-how-can-i-create-animated-gif-images-in-matlab

6 years ago | 1

Load more