답변 있음
Find minimum in matrice
Let A be your matrix. A(A==0) = NaN ; % replace 0's with NaNs [val,idx] = min(A) Or, use: val = min(A(A>0))

거의 4년 전 | 0

답변 있음
I want the plot the bar graph touching the y axis
Read about xlim, axis

거의 4년 전 | 0

| 수락됨

답변 있음
i am getting error in the plot function it says array indices must be +ve int or logical value
t= 0:0.1:5; nt = length(t) ; v1 = zeros(size(t)) ; v2 = zeros(size(t)) ; v3 = zeros(size(t)) ; v1(1)=2; v2(1)=4; v3(1)=...

거의 4년 전 | 1

| 수락됨

답변 있음
Why the following code is not generating plot for W?
I remember you asking the similiar question earlier. What have you learned from the previous question? You are keep on asking sa...

거의 4년 전 | 0

| 수락됨

답변 있음
I need output this statement
a1=1:10 % generate numbers between 1 and 10 with increment of 1 a2 = 75:-1:50 ; % generate numbers between 75 and 50 with diff...

거의 4년 전 | 0

| 수락됨

답변 있음
Colour depending on the radius of a cylinder.
Try: pxI = pxS(:,:,i); pyI = pyS(:,:,i); R = sqrt(pxI.^2+pyI.^2) ; surf(pxI,pyI,pz,R);

거의 4년 전 | 1

| 수락됨

답변 있음
Assigning values from one array to string values of another array
ideanumber = ["idea1", "idea2","idea3", "idea4","idea5", "idea6","idea7", "idea8", "idea9"] ; scorevector = [5.7065, 3.2885,...

거의 4년 전 | 0

답변 있음
How to compose more than 2images in a folder ?
imgFiles = dir('*jpg') ; N = length(imgFiles) ; I1 = imread(imgFiles(1).name) ; I2 = imread(imgFiles(2).name) ; If = imfuse(...

거의 4년 전 | 0

| 수락됨

답변 있음
how to increment an exponential in a diagonal
A = exp(-1./(1:19)) ; iwant = diag(A)

거의 4년 전 | 1

답변 있음
For loop to save all the files
Thanks is accepting the answer.. :)

거의 4년 전 | 0

답변 있음
Calculate difference between two columns but skip if column has NaN
You simply subtract the two columns....if any of the column has NaN, your difference will be NaN. A = [NaN 24 ...

거의 4년 전 | 0

| 수락됨

답변 있음
double surface using scatteredInterpolant
T = readtable('https://in.mathworks.com/matlabcentral/answers/uploaded_files/1065115/zoccolo.txt') ; zoccolo = table2array(T) ;...

거의 4년 전 | 0

| 수락됨

답변 있음
creating folder in matlab
Read about mkdir

거의 4년 전 | 0

답변 있음
For loop to save all the files
for i = 1:10 plot(rand(1,10)) figName = ['plot_',num2str(i),'.png'] ; % you can give path, your desired string here ...

거의 4년 전 | 1

답변 있음
Getting error while trying to access the data of the following plot.
You are plotting the data using fplot. This will give you the function, which you have used to plot when you try to extract the ...

거의 4년 전 | 0

| 수락됨

답변 있음
Evaluating and plotting a kernel function
% Evaluating kernal functions, kernal 2 Fs = 33600 ; n = 1:1:Fs; a = floor(n-(Fs/2)); c = (1200*pi)/Fs; % c is greek le...

거의 4년 전 | 0

답변 있음
To find n number of histcounts in a loop
z = cell2mat(N) ; Or z = [N{:}] ;

거의 4년 전 | 0

| 수락됨

답변 있음
I want to give a condition to the values of the x vector , i tried to dosomething but i didnt have teh results i wanted. helpp please
w = 0.1; h = 0.1; L = 8.0; E = 210.0E9; F = 3000.0; a = L/4; x = linspace(0,8,100) ; I = (w*h^3)/12;%Calculate variable I...

거의 4년 전 | 0

| 수락됨

답변 있음
Dimensions of arrays being concatenated are not consistent.
This line: TimeM = [AA(:,1) BB(:,1) CC(:,1) DD(:,1)] ; will throw error. Note that BB, CC and DD are of size 20x2 and AA(:,1)...

거의 4년 전 | 0

답변 있음
Division of numbers and arrange??
% With loop A=[2 8 14 20 22 26 32 38 44 45] Divisible=[] ; NotDivisible=[] for index=1:length(A) b=A(index) ; if...

거의 4년 전 | 0

답변 있음
How can i input this on MATLAB?
b = [3, 7, -4]' ; u1=[1, 2, 3]; u2 =[2, 3, 7]; u3 =[3, 5, 6] ; A = [u1' u2' u3'] ; x = A\b ; % check [A*x b]

거의 4년 전 | 0

답변 있음
I want to use contourf function to plot 2d velocity data
Let u,v be your velcity matrices. w = sqrt(u.^2+v.^2) ; figure(1) pcolor(x,y,w) ; % if throws error, transpose w colorbar...

거의 4년 전 | 0

| 수락됨

답변 있음
How to put different seed in a multidimensional matrix
n = 10; k = 3 ; R = zeros(n,k,n) ; for i = 1:n rng(i) % i can be a positive integer R(:,:,i) = rand(n,k) ; end

거의 4년 전 | 0

| 수락됨

답변 있음
To find histogram of two variables
x = rand(1000,1); y = rand(1500,1); [N{1},edges{1}] = histcounts(x); [N{2},edges{2}] = histcounts(y);

거의 4년 전 | 0

| 수락됨

답변 있음
can you please give me the answers
a)Also, create an empty vector called prime_numbers Read about initializng the arrays. Hint: zeros, ones b)In the while loop,...

거의 4년 전 | 0

답변 있음
Matlab Plot can't work.
clc clear clc f = @(x,y,z) 1/y*(y+z); %where k = 1 for y'' g = @(x,y,z) z ; %for y' h = 0.1; x= 0; z= 1; y= ...

거의 4년 전 | 0

| 수락됨

답변 있음
How can I extract data from the following Matlab figure, there are multiple lines.
Already you have them in xdata and ydata. They are cell arrays, you can access them by: xdata{1} xdata{2} ydata{1} ydata{2...

거의 4년 전 | 1

답변 있음
Error using plot Data
clear clc %%INPUT / DATA %a = input('Value of a:') %b = input('Value of b:') %c = input('Value of c:') a=1; b=1; c=1; ...

거의 4년 전 | 1

| 수락됨

답변 있음
How to convert images folder to .mat
thepath = 'C:\Users\hp\Desktop\testing\abood' ; imgFiles = dir([thepath,'\*jpg']) ; % give your image extension N = length(im...

거의 4년 전 | 0

더 보기