已回答
Finding certain numbers in vectors
any(ismember(v1, nmbr)) any(ismember(v2, nmbr)) any(ismember(v3, nmbr)) If true, then the vector has any of these numbers [2 ...

3 years 前 | 0

| 已接受

已回答
Hello all! I have some ambiguity with MATLAB. I saved my matrix as A(:,:,1) in workspace. Now I want to access column or some entries of my big matrix on command window.
Do by following code for i=1:4 A(:,:,i)=i*ones(4,4); end B = permute(A,[3,2,1]); B(:,:,2) The result is ans = ...

3 years 前 | 0

| 已接受

已回答
Specify nature/type of property
First define the food class Then define meals class Now run meals in the command window, we get empty class meals with two...

3 years 前 | 0

已回答
How to solve hyperbolic function ratio equation
you can solve it with symbolic expression syms z x y eq = y/z - tanh(x)/tanh(x/2); sol = solve(eq, x, 'ReturnConditions',true...

3 years 前 | 0

已回答
Remove contour line from unwanted region
%%Example from other user x = -100:100; y = -100:100; inputData = rand(201); inputData(abs(x)<=10,abs(y)<=10) = nan; contou...

3 years 前 | 0

| 已接受

已回答
i want to detecting bubble in the image and measuring the size
Use DCT transformation and with a critical bw value I=double(imread ('image.bmp')); I = -(I-min(I(:)))/(min(I(:))-max(I(:))); ...

3 years 前 | 0

| 已接受

已回答
How to make a new table from two different table with common value?
result has the same row number as T1 or T2? result = table(C,'variablenames',{'datetime'}); result.value1 = T1.value(1:(size(r...

3 years 前 | 0

已回答
How to export FEMesh?
The mesh is now the field of model you can get mesh by Mesh = model.Mesh; % nodes are obtained by Nodes = Mesh.Nodes; % d-b...

3 years 前 | 0

| 已接受

已回答
In solving ordinary differential equations of elasticity, I got the following hint“Unable to find symbolic solution”.How should I modify the solution
That means matlab can not find symbolic solution for the ode with the given boundary condintions (Given values at two ends). Ta...

3 years 前 | 0

已回答
Strings to variable names
Hi, try following code results{:,'X'} = results{:,'Sigma'}; results(:,'Sigma') = []; results{:,'Y'} = results{:,'LR'}; resul...

3 years 前 | 0

| 已接受

已回答
Euler's method
Hi, Use y(i+1)=y(i)+ h*(((sin(2*x(i)))/x(i)^2)-(2*y(i)/x(i))); instead of y(i+1)=y(i)+ h*(((sin(2*x))/x^2)-(2*y/x));

3 years 前 | 0

已回答
Please help me. I really need help with copula.
use corrcoef is ok, returns the matrix of correlation coefficients for A, where the columns of A represent random variables an...

3 years 前 | 0

已回答
how to loop a equation.
Why use symbol? R=8.314; T=[600:50:800]; D=0.27*(1.04/-0.22)*exp((-246)./(R*T)) The D array is good to use D = -1.2149...

3 years 前 | 0

| 已接受

已回答
Rotation of Ellipse to a specific vector
By following operator you will get what you want clc;clear blueLine = [-0.4, 0.8, 0]; % direction of blue line xc = 1; yc =...

3 years 前 | 0

| 已接受

已回答
Euler's Method
Euler forward? clc;clear odefun = @(x,y) x^(-2) *(sin(2*x)-2*x*y); % I have rewritten the ode function xspan = [1,2]; x0 = x...

3 years 前 | 0

已回答
Graph in tiff format : how to interchange X and Y axis ?
I usually use GetData software. while with matlab, I wrote code for this problem below % Extract data from image clc;clear fi...

3 years 前 | 0

已回答
linear interpolation in 3D space
Using point2segmentDistance function function [distance, nearestPointOnSeg ]= point2segmentDistance(point, segmentPoint1, segme...

3 years 前 | 1

| 已接受

已回答
Construct the statement on MATLAB: If a person has more than 10 apples then he will sell 8. But if he has less than 10 apples than he will sell 5 apples
apples_left = 20; % total apples at the beginning while true if(apples_left<5) break; end if(apples_left>10...

3 years 前 | 0

已回答
How do I calculate acceleration when I have instantaneous values of velocity?
Use pddiff function attached here, this is easy to use. t = linspace(0,3*pi,19)'; f = sin(t); % assume this is the velocity [...

3 years 前 | 0

| 已接受

已回答
Deleting Some Specific Entries from a vector
Just do with the following q = abs(yb); p = (q==0|q==1|q==0.6|q==0.8); xa = yb(~p) if it does not work, use a tolerance TO...

3 years 前 | 0

| 已接受

已回答
how to convert picoscope data to matlab
Why not save with csv extension. IF you can open with MS access, just use save as, and convert to csv file. matlab can read csv ...

3 years 前 | 0

已回答
how to convert explicit function to implicit?
If you feel bored solving it by hand, just use matlab! syms a y x b A eq = a*y - x*(a+1) - A*(x^2-b*a^2*(y-x)^2); y = solve(e...

3 years 前 | 1

| 已接受

已回答
How to concatenate two matrices?
A=[1 2;3 4]; B=[5 6;7 8]; C1 = [A,B]'; C = reshape(C1, size(A,2),numel(C1)/size(A,2))' Then C = 1 2 5 ...

3 years 前 | 1

| 已接受

已回答
Subgraph from selected edges
hi, friend, you can make EdgeNumber an array that contains all the edge numbers that you are interested in. and make the line ...

3 years 前 | 1

已回答
How to make the array automatic shift to next column after looping
Use following command total_five_output = zeros(8752,5); for i = 1:1:5 % .... % your body to generate output total_...

3 years 前 | 0

| 已接受

已回答
Rotate geometry at one specified point
Here I added the rotation method for you function Nano_Sphere_Dat_Generator clear clc clf %set value of geometric paramete...

3 years 前 | 1

已回答
Partitioning a number into sum of positive real numbers
Hi, friend! I have thought of a search method that saves much time. Firstly, the problem can be converted to V = 1:1:M, there ...

3 years 前 | 0

| 已接受

已回答
Subgraph from selected edges
Note that all the endnodes of some given edges may be repeated, as commented by @Sim. Unique is a good way to solve such problem...

3 years 前 | 1

| 已接受

已回答
Runge kutta method matlab
Use arrayfun to obtain your solutions and Plot them! x0y0 = [20x2] array? tspan = [0:dt:t_end]; [tsol, xysol] = arrayfun(@(i)...

3 years 前 | 0

加载更多