Beantwortet
Equally spaced points in a circle
Change the current_angle formula and use i instead of (i-1) %Random points with (x1,y1) - center point %and (x2,y2) - point on...

fast 3 Jahre vor | 0

| akzeptiert

Beantwortet
Is there a way to speed up the computation of a piecewise defined function?
Logical indexing would be my best bet - x_input=-2.12345; n = -10:10; %x is same as n %preallocate y y = zeros(size(n)...

fast 3 Jahre vor | 0

| akzeptiert

Beantwortet
my solve cant work again
You can use vpasolve to solve the equation numerically - format long s_length=0.125; m=0;n=0; a=-s_length/4+m %location of a...

fast 3 Jahre vor | 1

| akzeptiert

Beantwortet
xticks and yticks with decimal exponents
% My attempt %You can directly plot on log vs log scale via loglog() loglog(10^(0):10^(3),10^(-8):10^(3)) %set(gca, 'XScale...

fast 3 Jahre vor | 2

Beantwortet
Plot a region based on inequalities
That happens because the markers of the scatter plot are circle in shape with a finite/comparable size. You can see that by plot...

fast 3 Jahre vor | 0

| akzeptiert

Beantwortet
Partition line in a subplot
You can do this by turning clipping off and manually drawing lines - clc;close all; clear all; x=[1 2 5 4 6 7]; y=[5 6 2 5 8...

fast 3 Jahre vor | 0

| akzeptiert

Gelöst


Minimum number of crossings in a complete bipartite graph
This problem is related to problem 58389. A complete bipartite graph may be drawn in different ways, such that the number of li...

fast 3 Jahre vor

Beantwortet
Constants that cannot be delete with CLEAR
You can use this command clearvars -except VariblesNotToBeDeleted

fast 3 Jahre vor | 1

Beantwortet
gridmesh does not work for my case, why?
You need to use element-wise division as well in defining F u = rand(54,1); v = rand(61,1); [U,V]=meshgrid(u,v); % v F=...

fast 3 Jahre vor | 0

Beantwortet
Different results from directly using fsolve function and using the code within program in fsolve setting
Using global is generally not recommended, specially when it is not required. There are many errors in your code, I have edited...

fast 3 Jahre vor | 0

| akzeptiert

Beantwortet
How to surf plot and line plot together for the code?
Any particular reason why you are using subs() for Gamma_star instead of defining manually it and vpa() for defining I? The cod...

fast 3 Jahre vor | 0

| akzeptiert

Beantwortet
How to extract month-wise data from a single column?
Read the excel file via readmatrix and use indexing to get the data for February. Make sure that the excel is present in the cu...

fast 3 Jahre vor | 0

| akzeptiert

Beantwortet
A compact “if” statement using “or” operator
Yes there is - ismember vec = [1 2 7 8 10]; i = 4; %Checks if elements in i are present in vec or not ismember(i,vec) if is...

fast 3 Jahre vor | 1

| akzeptiert

Gelöst


Determine whether a number is prome
In discussing the unique factorization of numbers in Elementary Number Theory, Underwood Dudley devised a new number system: “C...

fast 3 Jahre vor

Beantwortet
Problem 44951. Verify Law of Large Numbers
Hi @belva, 1 - There is an unsupressed variable, y, in the code, which has 100 million elements. Since it is unsupressed, MATLA...

fast 3 Jahre vor | 1

Beantwortet
Create a plot of points on a circumference separated by radii
You can use a set of points and polarscatter to achieve this. What have you attempted yet?

fast 3 Jahre vor | 1

Beantwortet
Removing rows except containing certain numbers of "33"
You are trying to compare numeric data with character data. You will have to convert your initial data to do that comparison. I...

etwa 3 Jahre vor | 1

Beantwortet
Summation of a Gamma series
This requires Symbolic toolbox - %Defining symbolic variables syms x n %summation using symsum() out = symsum(ExpressionToBe...

etwa 3 Jahre vor | 0

| akzeptiert

Beantwortet
3D plot Between one known and two unknown parameter.
"In 2D, it will definitely give a circle." I assume you want to obtain all the circles corresponding to values in R in the same...

etwa 3 Jahre vor | 0

| akzeptiert

Gelöst


Draw '5' in Chinese.
Draw a x-by-x matrix '五' using 1s and 0s. Example: x=5 ans= [1 1 1 1 1 0 1 0 0 0 1 1 1 1 0 0 1 0 1 0 1 1 1 1 1] x=7...

etwa 3 Jahre vor

Beantwortet
Plotting in 3D
If you have already posted a question, add any related info to the same question. Do not post a new question with new informatio...

etwa 3 Jahre vor | 1

| akzeptiert

Beantwortet
how i can fix this error?
@Armina Petrean, keep in mind that posting the picture of the code is not helpful. Even if we suggest a solution, it is not guar...

etwa 3 Jahre vor | 0

Beantwortet
Is this the right way to use permute and bsxfun?
Yes, it is correct. You can verify it by comparing it to the result obtained via loops - %Random data A = rand(1000,200,500); ...

etwa 3 Jahre vor | 1

| akzeptiert

Beantwortet
Unrecognized function or variable 'a'.
You get an error because you have undefined variables in your code, that are a, b and c. If they have any numeric value, then a...

etwa 3 Jahre vor | 0

Beantwortet
How can I fix this "Error using / Matrix dimensions must agree."
I assume you want to do element-wise division, use "./" for that % Step 1: Define the parameters and initial conditions. B = ...

etwa 3 Jahre vor | 1

| akzeptiert

Beantwortet
Symbolic rewriting of trigonometric functions with a exponential function.
rewrite() does not produce the following conversion. You can do the following - syms t %Define expressions separately y1 = (...

etwa 3 Jahre vor | 0

| akzeptiert

Gelöst


Create an empty array
Suppose you need an empty array. e = [] will give you one, but it's a double array, which may not help if you need a differen...

etwa 3 Jahre vor

Gelöst


Find the circle inscribed in a triangle
Write a function that takes the x- and y-coordinates of three points describing the vertices of a triangle and returns the cente...

etwa 3 Jahre vor

Frage


Inconsisent(?) behaviour of str2num() with a particular usage
The task in hand for me was to generate an empty array corresponding to the class/datatype of the input. %Example 1 input = 's...

etwa 3 Jahre vor | 2 Antworten | 0

2

Antworten

Beantwortet
recreating mesh grid plot of polar formula
"Also i get my radian axis till 2000 instead of 6.28." Because your data spans from 2*pi to 2*pi*360 (~2262) instead of 0 to 2*...

etwa 3 Jahre vor | 0

| akzeptiert

Mehr laden