a)Also, create an empty vector called prime_numbers Read about initializng the arrays. Hint: zeros, ones b)In the while loop,...

ongeveer een maand ago | 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= ...

ongeveer een maand ago | 0

| accepted

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

ongeveer een maand ago | 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; ...

ongeveer een maand ago | 1

| accepted

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

ongeveer een maand ago | 0

I couldn't understand why this program is not working, is my all variable algorithm is correct?
You need to interchange the variables to the function rate_eq. Try this: ti = 0; tf = 10E-4; tspan=[ti tf]; y0=[9;9;1;1;0].*...

ongeveer een maand ago | 0

| accepted

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 '); ...

ongeveer een maand ago | 1

| accepted

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

ongeveer een maand ago | 0

| accepted

How to combine the discrete bands of x-values to a continous plot?

ongeveer een maand ago | 0

| accepted

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

ongeveer een maand ago | 0

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

ongeveer een maand ago | 0

| accepted

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

ongeveer een maand ago | 0

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)

ongeveer een maand ago | 0

| accepted

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

ongeveer een maand ago | 0

| accepted

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

ongeveer een maand ago | 0

| accepted

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

ongeveer een maand ago | 0

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

ongeveer een maand ago | 0

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

ongeveer een maand ago | 1

| accepted

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

ongeveer een maand ago | 0

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

ongeveer een maand ago | 0

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}) ; ...

ongeveer een maand ago | 0

| accepted

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

ongeveer een maand ago | 0

| accepted

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

ongeveer een maand ago | 0

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

ongeveer een maand ago | 1

| accepted

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

ongeveer een maand ago | 0

| accepted

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

ongeveer een maand ago | 0

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

ongeveer een maand ago | 0