Réponse apportée
How to do Taylor expansion without commands?
Check the formula for exp(x), you made few mistakes.... n = input('ingrese valor de n '); x = input('ingrese valor de x '); ...

plus de 3 ans il y a | 1

| A accepté

Réponse apportée
how to write a code using while end loop for display of number from 10 to 1 descending order ?
n = 10 ; while n ~= 1 n = n-1 end

plus de 3 ans il y a | 0

| A accepté

Réponse apportée
How to combine the discrete bands of x-values to a continous plot?
load('X.mat') ; load('Y.mat') ; load('C.mat') ; X = T_mag3 ; Y = E3(1,:)' ; Z = FESA3 ; pcolor(X,Y,Z) shading interp

plus de 3 ans il y a | 0

| A accepté

Réponse apportée
generate pair numbers randomly
Say you want to pair numbers randomly between 1 to 20. n = 10 ; iwant = zeros(n,2) ; for i = 1:n iwant(i,:) = randper...

plus de 3 ans il y a | 0

Réponse apportée
how to remove arrows in streamslice plot?
clc, clear, close; X = linspace(0,1.5); Z = linspace(-3,3); [z,x] = meshgrid(Z,X); ui = -0.04545*x.^2.*z; vi = x.*(...

plus de 3 ans il y a | 0

| A accepté

Réponse apportée
How to mask a data using the contour closed line?
Read about inpolygon. Using this you can get the indices lying inside and outside the closed shape. Using tese indices you can m...

plus de 3 ans il y a | 0

Réponse apportée
How to plot the surface of the parabolic cylinder $y^2=8x$ in the first octant bounded by the planes $y=4$ and $z=6$?
y = linspace(0,4) ; z = linspace(0,6) ; [Y,Z] = meshgrid(y,z) ; X = Y.^2/8 ; surf(X,Y,Z)

plus de 3 ans il y a | 0

| A accepté

Réponse apportée
Plot x(t) by calling a function
You are entering t as single number into the function. Try this: clc clear close all m=input('Please enter mass : ') ; c=in...

plus de 3 ans il y a | 0

| A accepté

Réponse apportée
simplifying kinda-eye matrix of NxN, how?
A = rand(3) ; [m,n] = size(A) ; iwant = zeros(4*m,4*n) ; for i = 1:4 idx = (1:m)+(i-1)*3 ; iwant(idx,idx)=A; end...

plus de 3 ans il y a | 0

| A accepté

Réponse apportée
I just want to plot these two graphs on top of each other! When I run, I get one but not both. Thank you!
You are getting two plots, but your T_a abd T_b are exactly equal. Thats why they are lying one above the other. clear all; c...

plus de 3 ans il y a | 0

Réponse apportée
Plot an equation by calling a function
It looks like your e in the function is exp. Change the function to: function [y]=myfun(a,b,c,t) if (a*b/c>1) y = (exp(a)...

plus de 3 ans il y a | 0

Réponse apportée
I am just trying to plot the distance x v. Temp function below. I want it to take the x values from 0 to 0.15. Thank you!
Presently in your code x is a single number 0. You need to change that line. clc; clear all ; clear all; close all; clc; %...

plus de 3 ans il y a | 1

| A accepté

Réponse apportée
how to give value stress from excel give color in my mesh thin cylinder
You have extracted the stress at the mid point of the element. You need to extract the stress values at every node. warning of...

plus de 3 ans il y a | 0

Réponse apportée
Change only coordinates of a georeferenced tif file from utm to degree
You may use the following file exchange function to convert utm to degree. https://in.mathworks.com/matlabcentral/fileexchange...

plus de 3 ans il y a | 0

Réponse apportée
To find the maximum value column index of a cell array
[m,n] = size(A) ; val = cell(m,n) ; id = cell(m,n) ; for i = 1:m for j = 1:n [val{i,j},id{i,j}]=max(A{i,j}) ; ...

plus de 3 ans il y a | 0

| A accepté

Réponse apportée
Changing numbers summed together in for loop
t = 1:1:30; %increasing time intervals of interest up to Trw nt = 28594; Qt = 0 ; for a = 1:length(dt) Qtime = (Q_ots(a+1)-...

plus de 3 ans il y a | 0

| A accepté

Réponse apportée
Error in multiplication of arrays
Check this: nchoosek(m1-(2.*s2),j1) this is giving you an expty matrix. A = rand(1,5) ; B = zeros([],1) A*B Use nchoosek...

plus de 3 ans il y a | 0

Réponse apportée
I want to need (maxY(:,1)) for different value of k, how the for loop will help?
ti = 0; tf = 100E-4; tspan=[ti tf]; y0=[1;1;1;1;1].*10E-2; k =[0:0.1E-3 : 3E-3] ; iwant = zeros(length(k),1) ; for i = ...

plus de 3 ans il y a | 1

| A accepté

Réponse apportée
Why it is not making plot for different values of "M"?
You have to use hold on. syms x warning off alpha = -0.1; sigma = 0.1; eps = -0.1; e = 0.2; a = 2; lambda = 2; psi = ...

plus de 3 ans il y a | 0

| A accepté

Réponse apportée
How to get the neural network outputs after nftool in R2022a
After training and testing with your data, when you click on Next button, you will get option of Deploy Solution, at this stage ...

plus de 3 ans il y a | 0

Réponse apportée
Find intersection of points in a graph
You can consider using this: https://in.mathworks.com/matlabcentral/fileexchange/22441-curve-intersections?requestedDomain=

plus de 3 ans il y a | 0

Réponse apportée
How to plot a box onto an existing convex hull graph?
XData = rand(100,1) ; YData = rand(100,1) ; figure(1); scatter(XData,YData); hold on; Hull = convhull(XData,YDa...

plus de 3 ans il y a | 1

| A accepté

Réponse apportée
create a sparse multidimensional matrix
A = sparse(12,3) ; A(3,1) = 1 ; A(7,2) = 1 ; A(11,3) = 1 ; A full(A)

plus de 3 ans il y a | 0

Réponse apportée
mpower doesn't work with symbolic matrix
syms A 2 matrix syms n assume(n, {'integer', 'positive'}) A.^n

plus de 3 ans il y a | 0

Réponse apportée
How can I create a quadratic matrix with variables?
syms q [1 5] real iwant = q'*q

plus de 3 ans il y a | 1

Réponse apportée
Mean of an Array Containing some NAN Elements
Read the doc of mean, there is option of omitting nan. A = [1 2 NaN 3 4 NaN] ; mean(A,'omitnan') In older versions it is nanm...

plus de 3 ans il y a | 0

| A accepté

Réponse apportée
Find duplicate of first xx entries and average associated values
Read the file into MATLAB using readtable. See to it that your dates i.e. thirs column is in datetime class. For this read abou...

plus de 3 ans il y a | 0

Réponse apportée
To find the maximum value in each column of a cell array.
Let A be your cell array of size 3072*2 where each cell has a matrix of size 5x1295. [m,n] = size(A) ; iwant = cell(m,n) ; fo...

plus de 3 ans il y a | 2

| A accepté

Réponse apportée
Align signals of different length using Peak
According to the plot, the peak value which has longest id is third array. So, I would allign signals w.r.t to third array. ...

plus de 3 ans il y a | 0

Réponse apportée
for idx = 1 hold on plot(idx,density(idx),"*") hold off pause(0.2) end showing incorrect
density = density(:) ; idx = (1:length(density))' ; figure plot(idx,density) comet(idx,density)

plus de 3 ans il y a | 0

Charger plus