Beantwortet
With ischar usage - I get two different answers
"Why is that?" Because a character array (char) and a string array (string) are different. They are both different data types f...

mehr als 2 Jahre vor | 2

Beantwortet
while iam trying to execute my code iam getting error
Numeric arrays in MATLAB are homogenous. When you initialize h(1) as a double array, then any elements to be added to it are e...

mehr als 2 Jahre vor | 0

Beantwortet
How to write an exponent in an axis label when the matlab syntax doesn't work?
Try this - t = -5:.01:5; x = exp(t/10); figure(1) scatter(x,t,24,'filled') xlabel('t') ylabel('e^{(t/10)}')

mehr als 2 Jahre vor | 1

Beantwortet
how to change zero in series number
Assuming the last element is not zero - in = [0 2 3 5 1 6 0 0 3 4 7 2 0 6 2].'; idx = in==0; while any(idx) in(idx) =...

mehr als 2 Jahre vor | 1

Beantwortet
reverse operation to 'strsplit'
Use strjoin

mehr als 2 Jahre vor | 0

| akzeptiert

Beantwortet
Create Subparts in one problem on MATLAB grader
Yes, in addition to tests provided by the MATLAB Grader, you can include your custom assessments. See the documentation for > F...

mehr als 2 Jahre vor | 0

Beantwortet
calculate the perimeter of a polygon arranged in space
I am not sure what the idea behind that method is, but it does not give the correct result - load plane_new figure x = plane...

mehr als 2 Jahre vor | 0

| akzeptiert

Beantwortet
Code for Delay differential analytical Solution. Its showing error. Please correct it. Kindly do the Needful.
There is missing operator between k and the left parenthesis as shown below - Fix it and the code will work. t=linspace(0,120...

mehr als 2 Jahre vor | 0

Beantwortet
Setting a textbox returning error 'Unable to resolve the name'
The function does not know what "S" is. You need to pass it as an input. And the font name 'Comic Sans MS' does not have ellips...

mehr als 2 Jahre vor | 0

Beantwortet
Using "if" and "disp" in a comparison of two numbers
You need to use the elseif condition. Refer to the documentation for more info - if, elseif, else a=5;%input("Give a value f...

mehr als 2 Jahre vor | 0

| akzeptiert

Beantwortet
Grab 20 lines and make a graph
"Can anyone tell me?" I assume you wanted to ask why that happens. You have provided a matrix as the single input to plot. ...

mehr als 2 Jahre vor | 0

Beantwortet
Relative pose in 2D: problem 1
Given that the frame of reference is a cartesian co-ordinate system, the angle is supposed/expected to be calculated w.r.t x-axi...

mehr als 2 Jahre vor | 0

| akzeptiert

Beantwortet
Where is the month, day and year string stored in a plot with a datetime axis which shows hours and minutes in the xticklabel string?
The data is stored as the x-tick values. They can be edited, but not all properties can be changed. One option to specify form...

mehr als 2 Jahre vor | 0

Beantwortet
Error using fopen for obj file
You should try these functions instead of fopen - https://in.mathworks.com/matlabcentral/fileexchange/27982-wavefront-obj-tool...

mehr als 2 Jahre vor | 1

Beantwortet
How to plot these figures into a graph with tons of data
Assuming that you want to plot using the values in the 1st column as x-values - Firstly, you would need to convert the 1st colu...

mehr als 2 Jahre vor | 0

Beantwortet
Obtaining max value from cyclic data
For each cycle, finding the maximum of the temperatures corresponding to the step == 3; %Read the data T = readtable('Referenc...

mehr als 2 Jahre vor | 0

| akzeptiert

Beantwortet
Create a loop with doubling the previous number minus 1
Use a while loop and perform the operation in each iteration - %Starting value x = 2; %Run the loop till the value of x is...

mehr als 2 Jahre vor | 1

Beantwortet
How to create a long matrix rapidly
ones does exist, but using eye would be easier and faster here - n = 10; x = 1 - eye(n)

mehr als 2 Jahre vor | 1

Beantwortet
Square wave with randomly varying frequency
The increment in time vector too small to clearly resolve the output wave-form. You can either zoom into parts of wave form to ...

mehr als 2 Jahre vor | 0

Beantwortet
Meshgrid on inhomogeneous surface plot
To modify the lines on the surface, you will have to modify the underlying data. You might not be able to get the exact shape, ...

mehr als 2 Jahre vor | 0

Beantwortet
the size of picture show three data?
It does not result in 3 images. That is a single image only, which is stored as a 3D array. That is a RGB image, also referred...

mehr als 2 Jahre vor | 0

Beantwortet
Determining area considering nodes arranged in space in an almost circular shape
Directly use polyarea - load('plane_new.mat') x = plane_new(:,1); y = plane_new(:,2); plot(x,y,'.-r') A = polyarea(x...

mehr als 2 Jahre vor | 1

| akzeptiert

Beantwortet
I need to keep only specific columns from the .csv table
%Read the data tb = readtable('satellites-16-Jan-2024.csv', VariableNamingRule="preserve") %Compare the values from 2nd column...

mehr als 2 Jahre vor | 0

| akzeptiert

Beantwortet
Revert y-axis order in BarPlot
There are multiple ways to do that. One simple way is reverse the Y-axis direction (assuming the data is originally sorted des...

mehr als 2 Jahre vor | 0

| akzeptiert

Beantwortet
Adding and dividing elements in a 3D array
A = rand(15,5,120); B = (A(1:end-1,:,:) + A(2:end,:,:))/2 size(B)

mehr als 2 Jahre vor | 1

| akzeptiert

Beantwortet
How could I fix the parsing error on line 8
The most notable issue I can see is the un-supported character in the 8th line before the fix() call, which appears as a box. R...

mehr als 2 Jahre vor | 1

Beantwortet
How change only second number in a=ones(1,10)?
Simply use indexing to change the element - a = ones(1,10); a(2) = 2

mehr als 2 Jahre vor | 0

| akzeptiert

Beantwortet
一つの3次元座標軸内に複数の球面をプロットしたい
They are plotted in 3D, you just need to change the line of sight. Check view for more information. D = [4.8115220,1.5733090,1...

mehr als 2 Jahre vor | 0

| akzeptiert

Beantwortet
What hardware Matlab Online uses?
As MATLAB Online runs on a Linux OS, run this command and see the output - system('lscpu')

mehr als 2 Jahre vor | 2

| akzeptiert

Beantwortet
changing expression to function
You will have to define x and y as symbolic variables first - %Random values for example a = rand(1,10); b = rand(1,10); ...

mehr als 2 Jahre vor | 0

Mehr laden