답변 있음
I need to add color shapes to dose distribution images
Read about patch, area.

대략 4년 전 | 0

답변 있음
How to compare lat lon from text file with netcdf file?
REad about interp2. You can do the interpolation and extract your required data. data2 = interp2(X1,Y1,data1,X2,Y2) ; % wher...

대략 4년 전 | 0

답변 있음
Issue with plot when using 2 FOR loops
X = zeros([],1) ; Y = zeros([],1) ; Z = zeros([],1) ; count = 0 ; for k=1:3 for j=1:3 % the main code ...

대략 4년 전 | 0

답변 있음
Creating empty cell array with function
It seems you are straight away running the function. You need to provide the inputs to the function and then call the function. ...

대략 4년 전 | 0

답변 있음
How to Append all values in single array in MATLAB
iwant = [out1 out2 out3 out4];

대략 4년 전 | 0

| 수락됨

답변 있음
How to solve a system of two equations of three variable?
If you have the points in hand already and you want to find the points of intersection, you can try this fileexchnage function: ...

대략 4년 전 | 1

답변 있음
Exponential Function Plotting From Reverse
clear all close all t = 0:1:150; x = log(1004*t); figure plot(t,x,'Color','r') grid minor set(gca,'XDir','reverse')

대략 4년 전 | 0

답변 있음
Plotting values by defining a function plotter
Your inputs to the function are not correct. The function: plotter( Interval,k,b ) Interval should be an array/ vector. Exam...

대략 4년 전 | 0

| 수락됨

답변 있음
How Can I randomly select 10% of my array values and replace it with N/A or zero
Let A be your 250x1000 array. N = numel(A) ; % total number of elements idx = randsample(N,round(10/100*N)) ; % select 10% ...

대략 4년 전 | 1

| 수락됨

답변 있음
Multiplying two vectors to form a matrix
x = rand(601,1) ; y = rand(601,1) ; iwant = sqrt(x.^2+y'.^2) ; size(iwant)

대략 4년 전 | 1

답변 있음
What is the way to create and save files?
You have to use imwrite. Read about it.

대략 4년 전 | 0

답변 있음
Find array row element in another index array
iwant = P(reshape(dx_of_pt',[],1),:) ;

대략 4년 전 | 0

| 수락됨

답변 있음
Why points inside a polygon can't be found completely by using "Inpolygon"
load('data.mat') idx = boundary(xloc,yloc) ; % pick the boundary points which form a polygon ind=inpolygon(source_xtheta,sour...

대략 4년 전 | 1

| 수락됨

답변 있음
There is an error where i have noted. anyone know how I could fix it?
Your A and b are going to be a 3D matrix. Check the below code. %% Model parameters m=1500; I=2500; lf=1.1; lr=1.6; l=lf+l...

대략 4년 전 | 0

답변 있음
I am not able to fix the error(s) in this command script. Can anyone help me?
clear; close all; clc; xmin = 0; xmax = 1; n = 100; dx = (xmax - xmin)/n; dt = 0.001; C = 10; L = 10; r = C*dt/dx; c = ...

대략 4년 전 | 0

| 수락됨

답변 있음
How can I sort intersections points given from polyxpoly according to order of appearence?
I would suggest to use this. https://in.mathworks.com/matlabcentral/fileexchange/22441-curve-intersections

대략 4년 전 | 0

답변 있음
How to plot inset in a subplot defined by axesand position?
figure('position',[100 100 800 900]) % subplot('position',[100 100 800 300]) x=linspace(1,10); y=linspace(1,10); plot(x,y) ...

대략 4년 전 | 0

답변 있음
How do I input multiple values in an array/matrix multiple times?
Save them into a cell. d = cell(cnt-1, 1); for i = 1:1:cnt-1 a = Value(IdxStart(i):IdxStart(i+1)-1); b = Time(IdxSta...

대략 4년 전 | 0

| 수락됨

답변 있음
Why I am getting this error message?
It looks like r3 is not an integer, it has decimals. Try: r3 = round(r3) ; % round r3 to the nearest integer d3x3 = wind...

대략 4년 전 | 0

| 수락됨

답변 있음
A(I): index out of bounds; value 6 out of bound 5. How to fix this error?
a = [2:2:10]; b = zeros(1,length(a)-1); for i = 1:length(a)-1 b(i) = a(i+1) - a(i); end Or Simply: b = diff(a)

대략 4년 전 | 0

답변 있음
Find the extremum of the surface
Read this: https://in.mathworks.com/help/matlab/ref/surf.html To get the extremum, read this: https://in.mathworks.com/help/ma...

대략 4년 전 | 0

답변 있음
Iterating through Matlab Table
LEt T be your table. With first column as dates. % First make the dates daily thedates = T.(1) ; % existing dates of the ta...

대략 4년 전 | 0

| 수락됨

답변 있음
How can I remove the line for nan in my ploting
% remove that line idx = x>11.3 ; y3_km(idx) = NaN ; y4_km(idx) = NaN ;

대략 4년 전 | 0

답변 있음
Finding intersection point of two vectors
You can use this file exchange function. https://in.mathworks.com/matlabcentral/fileexchange/22441-curve-intersections

대략 4년 전 | 0

답변 있음
How can I select a cell containing a specific text from a nx1 cell array and store it in a variable?
Read about contains, strcmp, strcmpi, strfind. All these functions give you index where theres is a match with the given input s...

대략 4년 전 | 0

| 수락됨

답변 있음
Trying to count number of occurrences that exceed a threshold over a certain amount of time.
if T is your temperature array. dT = diff(T) ; nnz(dT<5)

대략 4년 전 | 0

| 수락됨

답변 있음
How to find an eigenvector
Read about the function eig. A = magic(5) ; [V,D] = eig(A) ; vec = V val = diag(D)

대략 4년 전 | 0

| 수락됨

답변 있음
length(find((XM(2:end)>126.5 & XM(1:end-1)<126.5)| (XM(2:end)<126.5 & XM(1:end-1)>126.5)));
They represent second to last and first to last but one elements respectively. % Example a = rand(5,1) ; a [a(2:end) a(1:en...

대략 4년 전 | 0

답변 있음
How do I get rid of certain values with the same X-axis value in a certain range?
Put a logical conditioning, get indices and remove those points. Simple. Example: y = rand(1,10) ; % random data for demo ...

대략 4년 전 | 0

답변 있음
Output argument <XX> (and possibly others) not assigned a value in the execution with <YY> function
The error is simple. In the given function: function [h]=getColorHist(im, color_table, opt) im = rgb2hsv(im); [ht...

대략 4년 전 | 0

| 수락됨

더 보기