Beantwortet
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))

fast 4 Jahre vor | 0

Beantwortet
I want the plot the bar graph touching the y axis
Read about xlim, axis

fast 4 Jahre vor | 0

| akzeptiert

Beantwortet
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)=...

fast 4 Jahre vor | 1

| akzeptiert

Beantwortet
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...

fast 4 Jahre vor | 0

| akzeptiert

Beantwortet
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...

fast 4 Jahre vor | 0

| akzeptiert

Beantwortet
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);

fast 4 Jahre vor | 1

| akzeptiert

Beantwortet
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,...

fast 4 Jahre vor | 0

Beantwortet
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(...

fast 4 Jahre vor | 0

| akzeptiert

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

fast 4 Jahre vor | 1

Beantwortet
For loop to save all the files
Thanks is accepting the answer.. :)

fast 4 Jahre vor | 0

Beantwortet
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 ...

fast 4 Jahre vor | 0

| akzeptiert

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

fast 4 Jahre vor | 0

| akzeptiert

Beantwortet
creating folder in matlab
Read about mkdir

fast 4 Jahre vor | 0

Beantwortet
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 ...

fast 4 Jahre vor | 1

Beantwortet
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 ...

fast 4 Jahre vor | 0

| akzeptiert

Beantwortet
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...

fast 4 Jahre vor | 0

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

fast 4 Jahre vor | 0

| akzeptiert

Beantwortet
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...

fast 4 Jahre vor | 0

| akzeptiert

Beantwortet
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)...

fast 4 Jahre vor | 0

Beantwortet
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...

fast 4 Jahre vor | 0

Beantwortet
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]

fast 4 Jahre vor | 0

Beantwortet
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...

fast 4 Jahre vor | 0

| akzeptiert

Beantwortet
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

fast 4 Jahre vor | 0

| akzeptiert

Beantwortet
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);

fast 4 Jahre vor | 0

| akzeptiert

Beantwortet
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,...

fast 4 Jahre vor | 0

Beantwortet
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= ...

fast 4 Jahre vor | 0

| akzeptiert

Beantwortet
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...

fast 4 Jahre vor | 1

Beantwortet
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; ...

fast 4 Jahre vor | 1

| akzeptiert

Beantwortet
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...

fast 4 Jahre vor | 0

Mehr laden