回答済み
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...

3年以上 前 | 1

| 採用済み

回答済み
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...

3年以上 前 | 0

回答済み
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...

3年以上 前 | 0

回答済み
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 ...

3年以上 前 | 0

回答済み
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...

3年以上 前 | 0

回答済み
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 ...

3年以上 前 | 0

| 採用済み

回答済み
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...

3年以上 前 | 0

| 採用済み

回答済み
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)),'...

3年以上 前 | 0

| 採用済み

回答済み
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...

3年以上 前 | 0

回答済み
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年以上 前 | 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年以上 前 | 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年以上 前 | 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年以上 前 | 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年以上 前 | 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年以上 前 | 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年以上 前 | 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年以上 前 | 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年以上 前 | 0

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

3年以上 前 | 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年以上 前 | 0

送信済み


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

3年以上 前 | ダウンロード 1 件 |

Thumbnail

回答済み
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年以上 前 | 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年以上 前 | 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年以上 前 | 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年以上 前 | 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年以上 前 | 0

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

3年以上 前 | 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年以上 前 | 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年以上 前 | 0

| 採用済み

さらに読み込む