plot the equation graph
Hi, It is not neccessary to solve this equation x = 0:0.00001:1; f = @(x,m,a)(m*pi+atan((x)/(1-x))+atan((a+x)/(1-x)))./sqrt(1...

5 maanden ago | 0

How to plot mean with respect to bins?
Hi friend, Use histcounts and histogram, then the work is done clc;clear value = rand(100,1) + 0.1; % lack of your data, i ge...

5 maanden ago | 0

hot to plot horizontal Histogram??
Try to do this counts = [0 664 320 316 664 664 664 664 320 320 664 664 664 664 664 240 664 229 664 664]; Substances = 'abcdefg...

5 maanden ago | 0

| accepted

Array indices must be positive integers or logical values
You can do this by Iout = double(Io)

5 maanden ago | 0

how to solve a second-order differential equation set with parameter using Euler's method?
Actually, dy is the derivative of y with respect to t. The code you give is absolutely right. So you see Euler's Method If y...

5 maanden ago | 0

I want the same randomly split dataset for all the network so that i can compare the results.
You can save imdsTrain, imdsValidation for the first run And then use load to get imdsTrain, imdsValidation for three different...

5 maanden ago | 0

| accepted

How to order a set of unordered points
Use boundary(x,y) function load('pts.mat'); x=X_pts(:,1); y = X_pts(:,2); k = boundary(x,y,1); plot(x(k),y(k)) set(gca,'Y...

5 maanden ago | 0

| accepted

How to solve system of first order ODE's by forming matrix
Do not use syms, because without syms, the code runs faster A = [2 5 1; 7 9 0; 4 1 3]; odefun = @(t,Y)A*Y; tspan = ...

5 maanden ago | 0

| accepted

Calculating number in a string
Then do following code for i = 1:1:nLines fprintf('%d: %s\n',i,fileStr{i}) end fprintf('This file has %d lines', nLines)

5 maanden ago | 0

| accepted

I want to throw the error that comes with entering a non number in a numeric only input
n = str2num(input('Please enter a number:\n','s')); if(isempty(n)) error('You are entering a non number in a numeric only inpu...

5 maanden ago | 0

| accepted

How do I only display the 5 answers in the command window once?
s = [1 2 3 4 5]; h = [1 2 3 4 5]; SA = zeros(size(s)); for i = 1:5 s1 = s(i); h1 = h(i); SA(i) = equTriPris...

5 maanden ago | 0

| accepted

I want to find out vector subtraction of co-ordinates of 2 adjacent nodes of an element. How to proceed?
% if you have nodes and elements % nodes n-by-3 % elements m-by-8 % Then node1 = 1; node2 = 3; xrelative = abs(nodes(node1...

5 maanden ago | 0

| accepted

How to fix: Index Exceeds Matrix Dimensions
Hi, friend ode45 function outputs a struct with size 1x1 when only one argument is for output data. If you want to output x sol...

5 maanden ago | 0

| accepted

Why do I receive Not enough input arguments?
I just give a minor correction to your code function [SA]=equTriPrismSurfArea(s,h) SA=((sqrt(3)/2)*(s^2))+(3*s*h); end Save...

5 maanden ago | 0

| accepted

One Dimensional Laplace Equation with Source term.
Hi, friend I have found your boudary conditions are applied at the centre of control volumes of both ends rather than on the b...

5 maanden ago | 0

| accepted

Creating a matrix of logical arrays using an exsiting matrix
Use eye num_labels = 10; Y = [1;2;3;4;3;2;4;5;3;3;5;7;8]; % example Y E =eye(num_labels)==1; Your_matrix = E(Y,:) Then You...

5 maanden ago | 0

| accepted

How can I use '\$...\$' Environment in xticklabel with matlab2tikz?
Just use xticklabels({'\\$1\\$','','\\$2\\$','','\\$3\\$','','\\$4\\$','','\\$5\\$',''}); rather than xticklabels({'\$1\$','','\$2\$','','\$...

5 maanden ago | 0

| accepted

Adding constraints to function plots in 2-D and 3-D
Hi, I have translated the Cartesian to polar system so as to satisfy your requirement f = @ (x , y ) x .* sin( x .* y ); min...

5 maanden ago | 0

what happened to my install ?how to solve this proplem?

5 maanden ago | 0

symbolic calculation for series
Hi friend, Just define U as a symbolic array, it works in my matlab syms x t syms U [5,1] % I think what you need is 5-by-1 m...

5 maanden ago | 0

| accepted

How can I count number of dates over 100 degree F?

5 maanden ago | 0

| accepted

How to remove indexed set of rows from a cell array
Try this logical_indices = arrayfun(@(i)corb{i,1}(1)>100000&corb{i,1}(1)<300000,(1:1:size(corb))'); row_indices = find(logical...

5 maanden ago | 0

write a 'for' loop numbers in a single row matrix
Hi, MOzhdeh Salimi Here I donot know your tiff file but I have written code for you! VF = rand(100,100); Tnormal = rand(100,1...

5 maanden ago | 0

| accepted

Creating a mxn matrix that is all zeros except for the middle row and middle column which are 1s
M = [0,0,0,1,0,0,0; 0,0,0,1,0,0,0; 1,1,1,1,1,1,1; 0,0,0,1,0,0,0; 0,0,0,1,0,0,0]; Once for all Or you can do a = zeros(5,7); ...

5 maanden ago | 0

| accepted

How to plot multiple box plots on same graph with same size vector?
Hi, just change line 1 vol = [D1(:,1);C1(:,1)]; to vol = [D1(:,1), C1(:,1)];

5 maanden ago | 0

| accepted

Setting 3D plot's centre at origin
try this set(gca, 'XAxisLocation', 'origin', 'YAxisLocation', 'origin','ZAxisLocation', 'origin')

5 maanden ago | 0

Squeezing NaN's out of a square matrix to make a smaller square matrix
[p,q] = size(M); M(isnan(M))=[]; M = reshape(M,p-1,q) Then M = 2 1 1 1 1 3 3 2 ...

5 maanden ago | 0

| accepted

Number of Bacteria.
Here you can use symbolic solution syms N(t) t eq = diff(N)==log(3.32)*N N = dsolve(eq,N(0)==100) N_1dot5_hour = eval(subs(N...

5 maanden ago | 0

| accepted