답변 있음
How to plot different y values for different x values, provided the x and y values are to be generated in a loop?
As you are plotting a point, you need to use marker. n=100; b=6.9; r=5; y=(r-1)+0.5; e=0;z=2; U=9000; figure hold on f...

4년 초과 전 | 0

답변 있음
How to use logical indexing to return parts of an array that matches the elements of another array?
Read about findpeaks. It will give you the indices and values of peaks; using the indices you can get yopur required values.

4년 초과 전 | 0

| 수락됨

답변 있음
How to generate random points in a 3d line, if two end points are known??
A = [ 0, 0, 405] ; B = [ 4.5, -5.5, 480] ; AB = B-A ; % vector t = sort(rand(1,100)) ; % random points % Parametri...

4년 초과 전 | 0

| 수락됨

답변 있음
Convert convexhull to stl file
p = [113.6466 111.8984 112.4205 108.7094 113.4748 111.4158 113.5684 ]; q =[ 17.7346 12.7025 16.5175 18.2938 17.43...

4년 초과 전 | 0

| 수락됨

답변 있음
Array indices must be positive integers or logical values
t=0:0.1:1; nt = length(t) ; xt = zeros(nt,1) ; for i = 1:length(t) xt(i) = (-0.05)*t(i)^5+0.25*t(i)^4+t(i)+2-exp(-t(i)...

4년 초과 전 | 0

| 수락됨

답변 있음
Index in position 2 exceeds array bounds. Index must not exceed 1. Error in metal6 (line 60) M4=[m411(1,j),m412(1,j);m421(1,j),m422(1,j)];
Few of your variables like m212, m312, m412 are scalars i.e. 1x1 size and you are treating them as vectors and extracting more n...

4년 초과 전 | 0

| 수락됨

답변 있음
How to make my quiver plot readable?
You have limited the axes to a large extent. Don't limit the axes. Remove these lines: xlim([0 360]); ylim([0 360]); Let MATL...

4년 초과 전 | 0

| 수락됨

답변 있음
Cell-Array operation in large Cell-Array (Vectorization?)
Read about erase. https://in.mathworks.com/help/matlab/ref/erase.html#:~:text=newStr%20%3D%20erase(%20str%20%2C%20match%20)%20...

4년 초과 전 | 1

답변 있음
How to select and plot the maximum point in several pixels
A = rand(4096,104,60) ; B = permute(A,[2 1 3]) ; B_max = max(B,[],3) ; imshow(B_max)

4년 초과 전 | 0

답변 있음
alignment issue in fprint
P=[65.44; 87.12; 67.46; 79.51]; words1={'Moisture';'Fixed carbon';'Volatile matter';'Ash'}; words2 = repmat({'wt%'},length(P),...

4년 초과 전 | 1

답변 있음
Trying to stack an image array, error "Unable to perform assignment because the size of the left side is 220-by-220 and the size of the right side is 256-by-256"
If you RHS image is 3D and if the dimensions of each image are different, then you cannot save them into a matrix. So save them ...

4년 초과 전 | 0

| 수락됨

답변 있음
How to plot several 3D funztions (Z_n=f_n(x,y) with arbitrary intervals for each of them in one coordinate system?
It is plotting both the surfaces, but they are in the same colormap and you are unable to differentiate them. Check this: figur...

4년 초과 전 | 1

답변 있음
How to calculate the area of specific path under the curve?
Read about trapz.

4년 초과 전 | 0

답변 있음
Create a Matrix from defined variables
c1=440 ; c2=250 ; r1= 50 ; r2=25 ; C=[c1*r1^2, c1*r1*r2, 0; c1*r2*r1, c2+c1*c2^2, -c2; 0, -c2, ...

4년 초과 전 | 0

| 수락됨

답변 있음
Can I use my CPU and GPU simultaneously for Numerical Simulation?
DEfault code runs in CPU unless you specify the code to run in GPU. To run code in GPU you need to convert the variable/ stage t...

4년 초과 전 | 0

답변 있음
How to plot mode shapes from eigen vectors of a cantilever beam.
Read about polyfit. Also have a look on this file exchange: https://in.mathworks.com/matlabcentral/fileexchange/30970-natural-...

4년 초과 전 | 0

| 수락됨

답변 있음
i am new to matlab and i want to learn, can anyone help me with this please!!!
https://in.mathworks.com/matlabcentral/answers/305169-what-is-the-code-for-lagrange-interpolating-polynomial-for-a-set-of-given-...

4년 초과 전 | 0

| 수락됨

답변 있음
Boundary/polygon around coastline of Greenland
You can get the coastline using the function contour. Read about it. [M,c] = contour(x,y,Z,[0 0]) ; % M has the coordinates yo...

4년 초과 전 | 0

| 수락됨

답변 있음
Renaming a Excel file from an array
All_values=values; for i =1:numel(All_values) values=All_values(i) T = table(a{1,i}.time, oo{1,i}.signals.values, pp{...

4년 초과 전 | 0

답변 있음
Symbolic Expression Error problem !
Proceed with loop. %% Numeric Value Code FFF = rand(8,2); TTT = rand(2,2); FFF = reshape(FFF, 4, 2, []); TTT = reshape(TT...

4년 초과 전 | 0

| 수락됨

답변 있음
can anyone help me with this function.. i'm new to matlab and i need this for my research
You have to provide the inputs to the function. It seems you are either calling the function without providing inputs or running...

4년 초과 전 | 0

답변 있음
function solve return 'Unable to perform assignment because the left and right sides have a different number of elements.'
hs_data = hs_Lderiv./1000; %meter t_data = t; %seconds dh = diff(hs_data); dt = diff(t_data); syms gamma dhdt = zeros(size(...

4년 초과 전 | 1

답변 있음
How can I make the loop operation to give only 1 answer for each iteration? Here's my program that i tried out but it keeps giving me more than 2 answer of each iteration.
f=0; while f<0.1 f=f+0.0000001; Re=10^((1/sqrt(f)+0.537)/1.930)/sqrt(f); count = 0 ; for x=25000:-5000:500...

4년 초과 전 | 0

답변 있음
Waves mode summation for a string
xs=8; v=3; L=20; ta=0.2; t=1; n=1:1:40; x=0:0.1:20; omga = zeros(1,length(n)) ; F = zeros(1,length(n)) ; u = zeros(le...

4년 초과 전 | 0

| 수락됨

답변 있음
Subs command substituting the values of variables that was earlier define symbolic but when I am using plot command error message came "Non numeric data"
Convert the symbolic class into double using the function double. Read about it.

4년 초과 전 | 0

| 수락됨

답변 있음
how can i make an axis logarithmic
Read about loglog.

4년 초과 전 | 0

답변 있음
Split a vector into 2 vector before and after a value is found
a=[0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8] ; val = 0.5 ; idx = find(a==val) ; a1 = a(1:idx-1) a2 = a(idx:end)

4년 초과 전 | 0

| 수락됨

답변 있음
How to add two different vectors?
x = 0:1:10000; y = 2*x; z = linspace(0.1,1,length(x)); % make z same size as x, so use linspace x_n = x + z; y_n = 2*...

4년 초과 전 | 0

더 보기