已回答
FEM post processing: How to plot strain field in MATLAB
Since the strain values to each node can be obtained by interpolate method with the values of the integration point of each ele...

3 years 前 | 0

已回答
How can I write a for loop to do algebra over multiple arrays?
Do loop with indices of t: a = linspace(3,28,28)'; b = linspace(4,28,28)'; c = linspace(5,28,28)'; d = linspace(6,28,28)'; ...

3 years 前 | 1

| 已接受

已回答
how to access element of map when I don't know unique keys?
You can get keys and values by keys = M.keys; values = M.values;

3 years 前 | 0

| 已接受

已回答
How to index match excel file in matlab
You can do with following code T = readtable('example.xlsx', ... 'ReadVariableNames', true,... 'PreserveVariableNames...

3 years 前 | 0

已回答
How to combine matrices
Hi, friend! You can achieve this by following command: bhu = reshape(permute(NETPLP,[2,1,3]), 3, size(NETPLP,1)*size(NETPLP,3))...

3 years 前 | 0

| 已接受

已回答
I am trying to find the displacement of this below 2nd order differential equation.
Hi, friend! The ode you provided is a 2nd order ode. Follow the code you will know how to solve this ode. But at first, since bo...

3 years 前 | 1

已回答
Error in symengine for symbolic integration
This is a bug in matlab. A good way to avoid this bug is just to predefine symbols rather than use constants in the symbolic pro...

3 years 前 | 0

| 已接受

已回答
I am trying to plot an stl file but it showing error
Use triplot FV = stlread('Part2.stl'); triplot(FV)

3 years 前 | 1

已回答
How to find points inside a region defined by a rotated ellipse
Here is an example of telling how to calculate whether a given point [x y] lie within the regoin defined by this ellipse. funct...

3 years 前 | 1

| 已接受

已回答
Filling area between lines with color
If your horizontal coordinates is t array, then patch or fill can help maxTime = max(t(:)); patch([0, maxTime, maxTime, 0], [-...

3 years 前 | 0

| 已接受

已回答
How to calculate the whole time that my signal values is more than zero?
If your signal array is A, and with a time array t the same size as A. The total time the signal is greater than zero will be ...

3 years 前 | 0

| 已接受

已回答
How can I figure out which element in the array is repeated and how many times?
Hi, friend, using histcounts, things will be simple A = {'A', 'B', 'C'; 'D', 'E', 'F'; 'A', 'G', 'H'; 'C', 'Y', 'C'}; A = cate...

3 years 前 | 1

| 已接受

已回答
changing values of RHS with each time step in ODE
Is F time dependent ? If so, just write a function named Force function F = Force(t) t_array = []; % This is t array from xls ...

3 years 前 | 0

已回答
Making a matrix of R*C size that takes the values randomly from an array- Y.
Hi, friend! randi is OK, it can help, look Y = [ 1 6 1 8 4 5]; R = 7; C = 8; indices = randi([1,numel(Y)], R, C); A = Y(indi...

3 years 前 | 1

| 已接受

已回答
How to extract points from a 3D plot that fall within a particular distance from the center coordinate?
If you have Coor is a n by 3 matrix as the coordinates of n points in 3d space and a fixed point (x,y,z). Then the points within...

3 years 前 | 1

| 已接受

已回答
memory shortage: Solve Stiff ODEs
你好!这个直接把 options = odeset('Vectorized','on','JPattern',jpattern(N)); 改写成 options = odeset('Vectorized','on'); 就可以了,因为你给出的ode...

3 years 前 | 0

| 已接受

已回答
find inverse of distribution function
See the help doc with icdf

3 years 前 | 0

已回答
How Can I solve this equation ?
syms r t m rp q = int(rp*sin(m*pi*r),rp,0,1); % the integral r prime from 0 to 1 V = symsum(exp(m*pi*t)*sin(m*pi*r)*q, m, 1, 1...

3 years 前 | 0

| 已接受

已回答
How can one create a timetable with one column (all 1) with beginning date and end date?
I have got your idea and write a code for you: startdate = datetime('2020-01-02'); enddate = datetime('2020-05-15'); dt = end...

3 years 前 | 0

| 已接受

已回答
Reshape a vector to a matrix
Just use reshape and transpose it! x=[1 2 3 4 5 6 7 8 9 10] ; A = reshape(x, 5, 2)' Then we get A = 1 2 3 ...

3 years 前 | 1

| 已接受

已回答
How to change the C values that matches a 3 coordinates position condition?
Hi, friend! Just use scatteredInterpolant % Here is how I process Ftop = scatteredInterpolant(top(:,1), top(:,2), top(:,3), 'l...

3 years 前 | 0

| 已接受

已回答
Solving coupled second-order ODEs using ode45 (equations of motion)
The odefun can be obtained using syms command syms M x z Y alpha V_0 l h_0 V = V_0 * ((exp(-alpha * z) - 1)^2 - 1) diff(V, z)...

3 years 前 | 0

| 已接受

已回答
Add up a certain number of consecutive values followed by the next values in a row
I'll write for you! function a = everynsum(arr, n) p = length(arr); a = sum(reshape(arr,n,p/n)); % in case mod(p,n)=0 end

3 years 前 | 0

已回答
How can I split a file at defined intervals into multiple files?
s = fileread('test.txt'); % read files to string s k = find(s==newline); % find newline position s = mat2cell(s,1, diff([0,k(4...

3 years 前 | 0

| 已接受

已回答
Can I specify the color of a graphics object by its index in the ColorOrder?
If you want different colors, you can use matlab build-in color series like jet, hsv, bone, copper. Eaxmples are n = 1:6; colo...

3 years 前 | 0

已回答
converting an excel formula into matlab
Hi, friend, I have translated your excel function to matlab command line. clc;clear a = readtable('C-RMSfluctuation.xlsx','Pr...

3 years 前 | 0

| 已接受

已回答
how to find out node coordinates for a simple quad element?
Hi, friend! It seems you are studying the finite element method. For fem analysis, two important things for preprocessing are n...

3 years 前 | 2

| 已接受

已回答
How can I create P-code for main script along with their sub-scripts?
You can make main file like this function main() % main file body end function fun1() % fun1 end function fun2() % f...

3 years 前 | 0

| 已接受

已回答
Translate python into matlab
We firstly make data a matrix. Each row is named grades, and the row number is a. Then python code can be tranlated to matlab on...

3 years 前 | 0

已回答
How I can combine this cell values in a single matrix?
If X{1} is 1x7 array, the simplest way is matrixOut = cell2mat(X')

3 years 前 | 0

加载更多