已回答
How to make the arrow smaller quiver
The arrow head looks wide because the scales of the axes are skewed. When you modify the axis, you can see that the arrowhead i...

8 months 前 | 0

| 已接受

已回答
Categorizing range of data
Because the for loop only iterates through the last element of phsangSE, thus the rest of the elements are undefined as that's h...

8 months 前 | 0

| 已接受

已回答
How can I convert cell array to an arrary matrix?
in = load('cell_array.mat') x = in.ans; out = vertcat(x{:}).'

8 months 前 | 0

| 已接受

已回答
Mysort script error issue
Remove the clear all, close all, clc line. You generally don't need to use those commands, specially not inside a function. ...

8 months 前 | 1

| 已接受

已回答
something wrong in fit function
You can use either a cell array of char vectors or string array for multiple coefficients (or dependent/independent variables fo...

8 months 前 | 0

| 已接受

已回答
Unrecognized function or variable 'importfile'.
readtable works on the text file - T = readtable('2_ISTA00TUR_R_...1D_30S_MO.txt', 'Delimiter', ' ', ... 'ConsecutiveDel...

8 months 前 | 0

| 已接受

已回答
How to solve this code error? (Diffusion_equation with pedpe)
Modify the function to provide D1, D2 and a as inputs and update the pdepe() call accordingly as well - % define the parameter...

8 months 前 | 0

| 已接受

已回答
Is this a correct way of 3D graphing an equation with summation
It is better to let the expression be defined as a symbolic expression through-out calculations, then convert it to an anonymous...

8 months 前 | 0

| 已接受

已回答
why matlab can't plot signals ?
Because there's a typo, semi-colon instead of colon in defining t. % v t=0: 0.0001;0.1; t t here is a scalar, whi...

8 months 前 | 0

| 已接受

已回答
Test the Chebyshev Function by plotting the 13th order Chebyshev polynomial but return with wrong graph
Given the recurrence definition used, you are trying to plot the 13th order Chebyshev polynomial of the 1st kind. In that parti...

8 months 前 | 0

已回答
How to place a global legend into an empty tile in a tiled layout?
Yes, you can place the legend in the empty tile by specifying the tile number. Here's a demo - %Plotting random data in the f...

8 months 前 | 0

| 已接受

已回答
I have a 64*64 block matrix, each block of size 4*4. I need to extract the diagonals of each block as a vector.
You can store them in an array, where each column represent the diagonal of each block. (I have assumed that the 64*64 blocks a...

8 months 前 | 0

| 已接受

已回答
using readtable on a csv file where some rows have partially missing data
Specify comma as the delimiter - T = readtable('climate_hourly_MB_5060600_2000_P1H.csv', 'delimiter', ',')

8 months 前 | 0

| 已接受

已解决


Create rectangular function.
Rectangular function - Wikipedia

8 months 前

已回答
How to use VARARGIN with two types of input?
You do not need to use varargin here. Store both set of values as a vectors of same dimension (i.e. both 1xN or Nx1) and define...

8 months 前 | 1

已回答
How to create a group summary of table such that it takes latest values ?
It is helpful to provide/attach data (or a sample of it) with the question, so it is easier for us to work with. Also, In gener...

8 months 前 | 1

| 已接受

已回答
Adding anonymous functions stored in a cell
Use symbolic integration - syms x a b f = {x x^2} c = [a b]; h = 0; for j=1:numel(f) h = c(j)*int(f{j}, x, 0, 1) +...

8 months 前 | 0

| 已接受

已回答
Evaluate Inverse Laplace transform of a rational function
Use subs to substitute in place of a symbolic variable (or function, expression, array) - syms u %Expression fun = ((42771...

8 months 前 | 0

| 已接受

已回答
Script of importing data not working with no warning or error
"The problem is when i run it in editor it does not do anything!" Because there is no output defined for the function. There a...

8 months 前 | 1

已回答
Matlab doesn't like my function, why?
The element-wise operators to be used here are ./ and .* (There is .^ in addition), see - Array vs Matrix Operations Also, whi...

8 months 前 | 1

已回答
Error ''Array indices must be positive integers or logical values.'' when putting interval of 0.01 in a for loop
The problem stems from the use of 0 and non-integer values as indices. As the error message states - Arrays indices in MATLAB ...

8 months 前 | 1

已回答
How to plot dynamic amount of contour plots within one figure
In that case, concatenate the extracted points and use min() - %Random data x = 0:0.01:5; y1 = sin(x); y2 = cos(x); y3 = ab...

8 months 前 | 2

已回答
Error using mupadmex Error in MuPAD command: symbolic:sym:isAlways:LiteralCompare|0 < root(z^20 - (555455*z^19)/28224 + (21279533*z^18)/112896 - (524070713*z^17)/451584 + (331
solve() is unable to find an explicit solution to the given equation, which is expected given the degree of the polynomial - on ...

8 months 前 | 1

| 已接受

已回答
What is my syntax lacking to achieve an accumulative-progressing animation of the plot?
I assume you want to add a point to the graph iteration wise. In that case, try this - %Sample values density = rand(1,10); ...

8 months 前 | 1

| 已接受

已回答
calculate the volume of a patch object
You can use convhulln which returns the volume of the convex hull as the 2nd output.

8 months 前 | 0

已回答
How to plot biggest positive and negative difference as a lines?
Hint - When you calculate the difference using diff(), the result is an array with an element less than the original array. So...

8 months 前 | 0

已回答
Combining several sets of data in an array into one numeric array to make a histogram
Use vertcat to get the data into a column vector and then use histogram - %Sample data X = {rand(22,1); (1:22).'; primes(75).'...

8 months 前 | 0

| 已接受

已回答
I have a problem with 2D plot.
%Random data x1 = 0:0.1:40; y1 = 4.*cos(x1)./(x1+2); x2 = 1:0.2:20; y2 = x2.^2./x2.^3; %Define an axes and plot on it ax...

8 months 前 | 0

已回答
Cant assign an input in a function with an elseif condition
The line where dt is defined in the script hw4_b is commented out, thus the variable is not defined, which when used to define o...

8 months 前 | 0

已回答
Non-repeating selection from sets
%Random data A = 1:3; B = 1:4; C = 1:5; D = {A, B, C} n = numel(D); %Preallocate out = cell(1, n); %Reverse orde...

8 months 前 | 0

| 已接受

加载更多