Réponse apportée
Colour code to find how big a function is
x = linspace(-1,1) ; y = linspace(-1,1) ; [X,Y] = meshgrid(x,y) ; F = (Y-X)./(1+X.^2) ; surf(X,Y,F)

presque 4 ans il y a | 0

Réponse apportée
I wanted to import csv files in a specific folder and wanted to plot graphs of them from the data of secound column and third column in the file can you please help me
thepath = 'D:\APDL\Cylinder\CSV Files\'; files = dir([thepath,'\*.csv']) N = length(files) ; for i = 1:N fi...

presque 4 ans il y a | 0

Réponse apportée
Have latex (bold) and variable in legend of a figure
plot(rand(1,10)) ; hold on plot(rand(1,10)) ; legend( 'Error','$[\frac{tv_p}{r_{well}}](\Pi_1=)$','Interpreter','latex', ...

presque 4 ans il y a | 0

| A accepté

Réponse apportée
how to merge centroids?
You have the coordinates of centroid, you can use knnsearch to get the nearest neighbors.

presque 4 ans il y a | 0

Réponse apportée
How to make Motor Power Loss Map from efficiency map ?
load('Motor_Map.mat') ; figure h1 = pcolor(Motor_RPM,Motor_Trq,Eff') ; % Plot Motor Efficiency Map h1.EdgeColor = 'none' ; ...

presque 4 ans il y a | 0

Réponse apportée
In a 6x6 square matrix A, how to select elements in i-th row with A(i,j) ruled out
A = [0 0 -1 1 1 1 0 0 0 0 1 0 1 -1 0 1] ; B = zeros(size(A)...

presque 4 ans il y a | 0

| A accepté

Réponse apportée
How to replace duplicate element to 0 in matrix for every rows
A = [1 1 1 2 2 2 3 3 4 4 5 5 5 1 2 2 3 3 3 4 4 4 5 5 6 6 1 1 1 1 2 2 3 4 5 5 5 6 6] ; B = zeros(size(A)) ; for i = 1:size...

presque 4 ans il y a | 0

| A accepté

Réponse apportée
save index of find- loop in a table
C = cell(143,1) ; for i=1:143 [row,col]=find(HQ10000_WH(i,[1:10498])>0,1,'first') C{i} = col ; end

presque 4 ans il y a | 0

| A accepté

Réponse apportée
Order Points for plotting
load('A.mat') ; x = A(:,1) ; y = A(:,2) ; n = length(x) ; iwant = zeros(n,2) ; i = 1 ; iwant(i,:) = [x(i) y(i)] ; x(...

presque 4 ans il y a | 0

Réponse apportée
How to plot a stem 3d plot with base map
REad about stem3, plot, legend

presque 4 ans il y a | 0

Réponse apportée
Why wont my loop populate pre-allocated matrix?
clc clear all close all syms V Z T=[277.15 287.15 297.15 307.15 317.15 327.15 337.15 347.15 357.15 367.15 381.15 401.15 421....

presque 4 ans il y a | 0

| A accepté

Réponse apportée
3 vector to surface 3d plot?
Refer this link: https://in.mathworks.com/matlabcentral/answers/412639-creating-surface-plot-from-a-matrix-with-3-columns?s_tid=...

presque 4 ans il y a | 0

Réponse apportée
Divide a column of a datafile through a constant value
txtFiles = dir('*.txt') ; % you are in the folder of text files N = length(txtFiles) ; % total files % loop for each file ...

presque 4 ans il y a | 1

Réponse apportée
how to use quiver3 plot vectors at zero points(i want to set the start point of the vectors all at zero points)
Simple, make x,y,z matrices as zeros matrix. [x,y,z]=meshgrid(-3:1:3,-3:1:3,-3:1:3); dx=x; dy=y; dz=z; r=(dx.^2+dy.^2+dz.^...

presque 4 ans il y a | 1

| A accepté

Réponse apportée
How to perform the following operation ( M(:,c)=M(:,c)+thr*M(:,c).*(N*2-1); )in each column in matrix M?
thr=.05 ; M = rand(14,128) ; N = rand(14,1) ; for c=1:128 M(:,c) = M(:,c)+thr*M(:,c).*(N*2-1); end

presque 4 ans il y a | 0

| A accepté

Réponse apportée
find data with same name
You can get the deaths of each country using: T1 = readtable('https://in.mathworks.com/matlabcentral/answers/uploaded_files/100...

presque 4 ans il y a | 0

| A accepté

Réponse apportée
how to use read variable
T = readtable('https://in.mathworks.com/matlabcentral/answers/uploaded_files/1005205/Population_data.xlsx') ; T.Population_mill...

presque 4 ans il y a | 0

| A accepté

Réponse apportée
Multiple color bar graph in Matlab
x=[1 2 3] ; y=[10 20 30] ; c = {'r','g','b'} ; figure hold on for i = 1:3 bar(x(i),y(i),c{i}) end

presque 4 ans il y a | 1

| A accepté

Réponse apportée
plotting a 2D truss
Refer this: https://in.mathworks.com/matlabcentral/fileexchange/86548-matlab-truss-finite-element-analysis If not attach your ...

presque 4 ans il y a | 0

Réponse apportée
Index in position 2 exceeds array bounds. Index must not exceed 1. Error in FYP2 (line 154) h = plot (f ,Range(:,c));
Your RANGE is a array of size 991x1 and you are trying to extract more number of elements from it. May be you need to replace Ra...

presque 4 ans il y a | 0

Réponse apportée
Addition of two different sized arrays
You may resize them to same size using imresize.

presque 4 ans il y a | 1

| A accepté

Réponse apportée
How to calculate differential equation with trigonometric function?
f = @(x,y) -1./((2./y).*x+x.^2*y.^2.*cos(y)) ; xspan = [0.1 2] ; x0 = 1 ; [x,y] = ode45(f, xspan, x0); plot(x,y)

presque 4 ans il y a | 1

| A accepté

Réponse apportée
Use a for-loop for multiply colums of two arrays
A = rand(4,8) ; B = rand(4,1) ; iwant = A.*B ;

presque 4 ans il y a | 1

Réponse apportée
Three columns (x,y,z) in table, Loop through table for each X plot Y vs Z
Let data be your three column matrix. x = data(:,1) ; y = data(:,2) ; z = data(:,3) ; xi = unique(x) ; yi = unique(y)...

presque 4 ans il y a | 0

Réponse apportée
How to interpolate pressure
load('matlab_Pressure.mat') L = linspace(5,700,length(PP)) ; Li = min(L):max(L) ; PPi = interp1(L,PP,Li) ; plot(L,PP,'....

presque 4 ans il y a | 0

| A accepté

Réponse apportée
Using arrays, x and y coordinates, to calculate values for each pair of x and y
What I can understand is, you can make use of knnsearch, rangesearch

presque 4 ans il y a | 0

Réponse apportée
What does .Metric do?
These lines: matchedPoints1 = valid_points1(indexPairs(:,1),:); matchedPoints2 = valid_points2(indexPairs(:,2),:); The result...

presque 4 ans il y a | 0

| A accepté

Réponse apportée
Selecting data points from a plot
A rough idea would be to use boundary.

presque 4 ans il y a | 0

Réponse apportée
Image file saving location
thepath = 'C:\Users\leehj\Desktop\aaa\' ; for i = 1:5 h = imagesc(X, Y, Z(:,:,i)); xlim([-2 2]); ylim([-1 1]); fnam...

presque 4 ans il y a | 0

Réponse apportée
Is there a way to add a global subtitle over a group of subplots?
figure subplot(221) title('First Subplot') subplot(222) title('Second Subplot') subplot(223) title('Third Subplot') subpl...

presque 4 ans il y a | 1

| A accepté

Charger plus