Answered
Draw Circle on picture and then save the drawn circle on the picture
Image = imread('peppers.png'); imshow(Image) % plot circle hold on th = 0:pi/50:2*pi; R = 50 ; C = round([size(Image,2...

5 years ago | 0

Answered
Error using imwrite with variable filename in for loop
Replace the line: imwrite(img,[i,'.png']); with imwrite(img,[num2str(i),'.png']);

5 years ago | 1

| accepted

Answered
Meshgrid for 3 variables
Read about surf.

5 years ago | 1

| accepted

Answered
removing words from texts with 'removeWords' ???
str1 = 'Hello world, how are you?' ; str2 = 'how are you?' ; str=setdiff(strsplit(str1),strsplit(str2))

5 years ago | 0

Answered
Find the position of the first non-zero value in a matrix
A = rand(10) ; idx = randperm(10*10,80); A(idx) = 0 ; iwant = zeros(1,10) ; for i = 1:10 iwant(i) = find(A(:,i),1) ...

5 years ago | 0

| accepted

Answered
how to import 2gb txt file data into workspace?
Read bout textscan.

5 years ago | 0

Answered
Error using * on matlab basic command
clc; clear ;close all v=0:0.1:100; % mlp y = 0.35; Amplitude = 0.35; Peroid = 12; Weight = 155.42; c = 40; k = 13.75; W...

5 years ago | 0

Answered
Calculate output row by row (Data Grid)
Read about table.

5 years ago | 0

Answered
Requires more input arguments to run
It looks like you are starught away running the function using run button or F5 key. This is not the way to call a function. S...

5 years ago | 1

Answered
different excel file comparisons
T1 = readtable(file1) ; T2 = readtable(file2) ; idx = ismember(T1.names, T2.names)

5 years ago | 1

Answered
insert markers to an image
Use imshow to show up a image. Use plot or scatter with given coordinates and required markers. Note that you need to use hold o...

5 years ago | 0

Answered
How to plot a workspace
Let A be your workspace variable of size 26*2. x = A(:,1) ; y = A(:,2) ; plot(x,y) REad about the function plot.

5 years ago | 0

Answered
Matlab error, Z must be a matrix, not a scalar or vecto
r= 5; theta= 60 ; ro=5; w1=200; w2=300; t=0:1:60; dt=diff(t); dt = unique(dt) ; x=ro*cos(w1.*t)+r.*cos(theta+(w1+w2...

5 years ago | 0

Answered
Comparative Operator result is wrong
Note that you are comparing two floating point numbers and such numbers cannot be comapred using ==. Follow tol = 10^-5 ; idx...

5 years ago | 0

Answered
Preallocating cells with unknown output size
You can try to initilize them as X = cell([],[]) ; You can check the timing using tic , toc.

5 years ago | 0

Answered
Why is the graph linear instead of curve?
You have to increase the number of values in x, when calling the function. x=[0 8 16 25 37]; y=[5 17 12 21 19]; disp("Los da...

5 years ago | 0

Answered
Output argument "output" (and maybe others) not assigned during call to
Check in your function/ file the output which you are seeking is not present. a = myfunc(2,3) ; function out = myfunc(b,c) ...

5 years ago | 1

| accepted

Answered
Array processing operation and summation
To achieve this you need to read about input and for loop. Use input and enter the value of N. Initialize the required sum ...

5 years ago | 0

Answered
Extract data between thresholds
A = load('test.txt') ; A = A' ; ii = zeros(size(A)); jj = A > 0; ii(strfind([0,jj(:)'],[0 1])) = 1; idx = cumsum(ii).*jj; ...

5 years ago | 0

| accepted

Answered
Skipping a NaN in a loop
A = rand(5) ; % data for demo A(:,2) = NaN ; % replace a column with NaN for i = 1:5 if any(isnan(A(:,i))) ...

5 years ago | 0

Answered
How can I add angular noise to my vector?
Read about rand. X = X+rand(size(X)) ;

5 years ago | 0

Answered
How Can I solve this problem?
USe .^ instead of ^. H = 3; P = 100; ls = atan(P/H); fun = @(x) (2*(H/P)^2)*(x + (4/3)*x.^3 + (17/15)*x.^5 + (248/315)*x.^7...

5 years ago | 0

Answered
Trying to save a Matlab file with a timestamp
for i = 1:10 data = rand(100,1) ; fname = strcat('projjectile',string(datetime('now','Format',"yyyy-MM-dd-HH-mm-ss"))...

5 years ago | 0

| accepted

Answered
Add xyz arrows in plot
% points x = rand(50,1) ; y = rand(50,1) ; z = rand(50,1) ; % vectors u = rand(50,1)/10 ; v = rand(50,1)/10 ; w = r...

5 years ago | 2

| accepted

Answered
How do I plot the equipotential lines in matlab?
L = 1 ; x = linspace(-0.5,+0.5) ; lambda = sin(pi*x/L) ; plot(x,lambda)

5 years ago | 0

Answered
How to merge different data collected at different times?
Read all the files and save time of each file. Get the minimum and maximum of time out of the three files. Create date time a...

5 years ago | 0

| accepted

Answered
Unable to convert expression into double array
This line: subs(diff) You have to substitute some value right? I guess you need to input value of t here......

5 years ago | 0

Answered
Machine learning for images dataset
If you have images to train the best you have imageDatastore. https://in.mathworks.com/help/matlab/ref/matlab.io.datastore.ima...

5 years ago | 0

Answered
Take average of multiple matrices
load data.mat ; A = cat(3,phi_BFD_v_sum{:}) ; iwant = mean(A,3) ;

5 years ago | 1

Answered
Plot data in map with LAT LONG
Refer this: https://www.eoas.ubc.ca/~rich/map.html You may see the below example for plotting. x = LON ; y = LAT ; z = power ...

5 years ago | 0

Load more