답변 있음
Ploting 3 D cube or graph with pressure
REad about slice. https://in.mathworks.com/help/matlab/ref/slice.html#:~:text=slice(%20V%20%2C%20xslice%20%2C%20yslice%20%2C%2...

대략 4년 전 | 0

답변 있음
Function returns scalar independent of input, but I need a matrix output
clc; clear all ; f = @(x1, x2)4.3206303272e-05.*x1.^2+2.39837699915e-05.*x2.^2 ; f(1,0) f([1:4]', [5:8]') f(rand(3,1),rand...

대략 4년 전 | 0

답변 있음
Can someone help me explain this code?
You can get it yourself, by reading the respective functions documentation. fs = 48000; % smapling frequency f0 = 2000; ...

대략 4년 전 | 0

답변 있음
How to Plot the smooth envelope of 3D scattered points
Read about griddata and/or scatteredInterpolant.

대략 4년 전 | 0

답변 있음
Contour3D temperature (xyz data) on a river bathymetry
You need to read about griddata or scatteredInterpolant. These are the function you are supposed to use.

대략 4년 전 | 0

답변 있음
How to concatenate first column of matrix A and first column of matrix B, then second column of matrix A and second column of matrix B and so on?
A = rand(128,4626); B = rand(128,4626); [m,n] = size(A) ; iwant = zeros(m,2*n) ; iwant(:,1:2:end) = A ; iwant(:,2:2:end)...

대략 4년 전 | 1

답변 있음
Spherical Patch in 3D
The shape is spherical and looks fine. You need to set the axis. Try axis equal at the end.

대략 4년 전 | 0

답변 있음
Plotting in 3D, based on beta and alpha.
I strictly advice you to check your formul for P_o1. %basic assumption/variables g = 9.81; %Gravity con...

대략 4년 전 | 1

답변 있음
Integral error in the function
func=@(t) (t.^((3/2)-1).*(exp(-t))); %<-- element by element operations Gamma=integral(func,0,Inf)

대략 4년 전 | 0

답변 있음
Plot a temperature matrix
REad about pcolor.

대략 4년 전 | 1

| 수락됨

답변 있음
Extracting strings in a cell array that contain certain characters
There woul dbe definitely better optimal way then this. str = [{'gamer'} {'macho'} {'mages'} {'grail'}] ; letters = {'a' '...

대략 4년 전 | 0

답변 있음
char(2713) and fprintf('\x2713\n') don't show a checkmark in the command window
How about using sprintf. s = sprintf('\x2713')

대략 4년 전 | 2

답변 있음
I want to make 4 clusters using k mean clustering and for each of the 4 clusters i want to set centroid initially and then accordingly make the cluster. how can I.
X3=[-6.189; -3.251; 2.926; 6.534; 10.79; 5.203; -4.465; 1.42; -8.66; -0.8748; 6.534 ; 11.251] ; Y3=[ 1.393; 10.42; 6.639; 5.8...

대략 4년 전 | 0

| 수락됨

답변 있음
Creating a Matrix of functions
You have to modify your code line hsown below: x=.49; y=3; f1=1/2*sin(x*y)-y/4/pi-x/2; f2=(1-1/4/pi)*(exp(2*x)-exp(1))+exp...

대략 4년 전 | 0

답변 있음
Reading a massive file but skipping several lines / rows at a fixed interval
id = 1:9 ; % line numbers V = 1990:2000:9990 ; % give the end wisely idx = id'+V ; % make indices idx = idx(:) ; % mak...

대략 4년 전 | 0

| 수락됨

답변 있음
group data every 10 days(decade)?
Convert your dates into datetime or datevec. From this you can get the year, month, day etc.....from day data array, use ismembe...

대략 4년 전 | 0

| 수락됨

답변 있음
Shade area under two lines
x = linspace(0,5) ; y1 = (4-x)/2 ; y2 = (6-3*x)/2 ; x = [x flip(x)] ; y = [y1 flip(y2)] ; patch(x,y,'r')

대략 4년 전 | 0

답변 있음
When i run the blow code, the loop gets stuck on the underline line and it says that the indices on the left are not compatible with the indices on the right.
clc clear all sigma1=0.002; sigma2=-0.003; tau_12=0.004; E1=181; E2=10.3; mu_12=0.28; G12=7.17; tetha=1:90; c=cosd(tet...

대략 4년 전 | 1

답변 있음
How to do distance formula
If(x1,y1) and (X2,y2) are two points. To get the distance use the formula: d = sqtrt((x2-x1)^2+(y2-y1)^2) ;

대략 4년 전 | 1

답변 있음
How do I make an array, (m,n), where the first row corresponds to the row number, where the first column corresponds to the column number, and the remaining elemnts by adding
m = 5; n = 4 ; A = zeros(m+1,n+1) ; A(1,2:n+1) = 1:n ; A(2:m+1,1) = 1:m ; for i = 1:m for j = 1:n A(i+1,j+1)...

대략 4년 전 | 0

| 수락됨

답변 있음
How to find a value in column 2 which corresponds to particular value in column 1?
A=[1 3 7 9 4 5 3 2 4; 2 3 1 3 4 5 9 2 4] ; idx = A(1,:)==9 iwant = A(2,idx)

대략 4년 전 | 0

답변 있음
How to plot this function?
What have you attempted for this simple question? Read about linspace or : Read about exp Read about plot Read about hold o...

대략 4년 전 | 0

답변 있음
User input changes circle radius and velocity
You are using the radius while calculating the coordinates of circle. v=input('Please provide a particle velocity: \n'); r=in...

대략 4년 전 | 1

답변 있음
The meaning of code on this program
clear, close all I = imread('pout.tif'); % this is to read the image pout.tif for i = 1:size(I,1) % this is loop from 1 to ...

대략 4년 전 | 1

| 수락됨

답변 있음
Can you have a if statement for even/odd?
n = 1 ; if ~mod(n,2) fprintf('Even\n') else fprintf('Odd\n') end

대략 4년 전 | 2

답변 있음
eroor in lstm training network
I think this line: numFeatures=2 shoule be numFeatures=1

대략 4년 전 | 0

답변 있음
remove duplicates from matrix and create a logic to index
REad about the function unique. time = [1 2 2 3 4 4 5 6 6 7 8 ]' ; [c,ia,ib] = unique(time) ; data = data(ia) ;

대략 4년 전 | 0

| 수락됨

답변 있음
How to Detect shape and number of shapes in image
I = imread('https://in.mathworks.com/matlabcentral/answers/uploaded_files/940849/im_005001%20(1).png') ; I1 = imbinarize(I) ; ...

대략 4년 전 | 0

답변 있음
Surface Plot in Sum Series
h=2; v=2; l=2; a = linspace(-5,5,100); b = linspace(-5,5,100); [x, t]=meshgrid(a,b); m = 1000 ; for i = 1:m f...

대략 4년 전 | 1

| 수락됨

답변 있음
Replace some values to NaN using a condition found in a second vector
idx = DOY >= 321 & DOY <= 330 ; H(idx) = NaN ;

대략 4년 전 | 0

더 보기