Beantwortet
How to reference previous value in an array without a for loop?
use i=2:size(data,1); data.Var3(i)=interp1(ref_data.x,ref_data.y,data.Var2(i))-interp1(ref_data.x,ref_data.y,data.Var2(i-1...

etwa 3 Jahre vor | 1

| akzeptiert

Beantwortet
how to find the find the different rows in 2 matrices based on 2 conditions?
% I just try my best to catch your idea by looking at your words, my engish % is not so good but I want to help you with this p...

etwa 3 Jahre vor | 0

Beantwortet
How to sort a 3D matrix according to the value of each element?
I think you want make something gif to show how the numbers are sorted? % sort show % show bubbling clc;clear % load('Number...

etwa 3 Jahre vor | 0

Beantwortet
How to display the output as table shown below?
You can use a table to achieve the output Node = reshape(permute(z,[1,3,2]),numel(z)/size(z,2), size(z,2)); Nodenumber = char ...

etwa 3 Jahre vor | 0

Beantwortet
Read in numbers as text from excel
IF in excel, a number with high precision is not stored with text format, it cannot be read by readcell with string format for h...

etwa 3 Jahre vor | 0

Beantwortet
Plotting 4D function
In the finite element analysis, you have the coordinates of nodes and elements for node order. Also, to each node, the attached ...

mehr als 3 Jahre vor | 0

| akzeptiert

Beantwortet
High dimension matrix summation: a + b != b + a
It is a problem of machine error. If you have learned numerical analysis lessons, you will notice that big number will 'eat' sma...

mehr als 3 Jahre vor | 0

| akzeptiert

Beantwortet
how to process the data in a file and repeat the procedure for different folders?
Here is an example for reading files and changing its content q = 0.1:0.1:2; folder = arrayfun(@(i)['surface\',num2str(q(i)),'...

mehr als 3 Jahre vor | 0

| akzeptiert

Beantwortet
About the use of find
Find is not at all faster than logical inices. IF you know how to use logical indices to get elements from matrix. I believe yo...

mehr als 3 Jahre vor | 0

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

mehr als 3 Jahre vor | 0

| akzeptiert

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

mehr als 3 Jahre vor | 0

| akzeptiert

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

mehr als 3 Jahre vor | 0

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

mehr als 3 Jahre vor | 0

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

mehr als 3 Jahre vor | 0

| akzeptiert

Beantwortet
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(:))); ...

mehr als 3 Jahre vor | 0

| akzeptiert

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

mehr als 3 Jahre vor | 0

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

mehr als 3 Jahre vor | 0

| akzeptiert

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

mehr als 3 Jahre vor | 0

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

mehr als 3 Jahre vor | 0

| akzeptiert

Beantwortet
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));

mehr als 3 Jahre vor | 0

Gesendet


Rotate 3d object by local coordinate axis of two vectors
This function is for rotating an object by two perpendicular vectors. I rotate the x-axis to e1 vector direction and y-axis to e...

mehr als 3 Jahre vor | 1 Download |

Thumbnail

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

mehr als 3 Jahre vor | 0

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

mehr als 3 Jahre vor | 0

| akzeptiert

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

mehr als 3 Jahre vor | 0

| akzeptiert

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

mehr als 3 Jahre vor | 0

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

mehr als 3 Jahre vor | 0

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

mehr als 3 Jahre vor | 1

| akzeptiert

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

mehr als 3 Jahre vor | 0

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

mehr als 3 Jahre vor | 0

| akzeptiert

Mehr laden