# Aquatris

Last seen: 2 days ago Active since 2023

Followers: 2   Following: 0

All

#### Feeds

View by

Error in for loop: Index exceeds matrix dimensions.
You have essentially made two mistakes: matrix_f only has 6 rows. You setup up your for loop such that k is 1 2 3 4 5 6 . When ...

3 days ago | 0

| accepted

Friend Function implementation in MATLAB
You can use the Access List property. Here is more explanation. Here also.

3 days ago | 0

how to do rising and falling edge in single signal using signal builder..?
Click on Signal->ReplaceWith or New->Square and play with the points. Alternatively, click on Signal->Custom-> enter your time...

4 days ago | 1

| accepted

You can specify sample time of each block seperatly. Here is more information and how to do it for different blocks, subsystems ...

4 days ago | 0

How to loop through cell array and apply script to each double?
You can use the cellfun function, where you use your script as the function. Example: a = {1:3, 200:205, 10:12}; new_a = cell...

9 days ago | 0

Solved

Find MPG of Lightest Cars
The file cars.mat contains a table named cars with variables Model, MPG, Horsepower, Weight, and Acceleration for several classi...

10 days ago

Solved

Rescale Scores
Each column (except last) of matrix X contains students' scores in a course assignment or a test. The last column has a weighted...

12 days ago

Solved

Crop an Image
A grayscale image is represented as a matrix in MATLAB. Each matrix element represents a pixel in the image. An element value re...

12 days ago

Solved

Verify Law of Large Numbers
If a large number of fair N-sided dice are rolled, the average of the simulated rolls is likely to be close to the mean of 1,2,....

12 days ago

Unable to obtain double precision from symbolic value
You need the vpa function x = 2; a = sym(1/3); f = a*sin(2*pi*x) fVpa = vpa(f,10)

17 days ago | 1

| accepted

Help with contour plot
You actually do have 5 lines but they are on top of each other thats why you do not see them. So your Z matrix for k1(1) and k1(...

18 days ago | 0

| accepted

count number of elements for each slice of a vector
Here is one simple way: A = [2 1; 3 1; 4 2; 5 2; 6 2; 7 1; 8 1; 7 1; 5 2; 6 2]; ...

25 days ago | 0

| accepted

First cell in a string array is empty, how to replace this?
The issue is you are not initiating and filling the mode1_status matrix properly. Your initial mode1_status matrix is a 1x1 matr...

25 days ago | 0

| accepted

Which MATLAB license should I buy as a reseacher working in an NGO?
The best way to know is by contacting the sales directly, say it is a nonprofit NGO and for research. They might offer you eithe...

25 days ago | 2

Matlab optimization - variables to satisfy L1 norm
You create a nonlinear constraint functio and give it as an argument to the fmincon. [x,fval,exitflag,output]=fmincon(@(x)costF...

25 days ago | 1

Solved

Calculate area of sector
A=function(r,seta) r is radius of sector, seta is angle of sector, and A is its area. Area of sector A is defined as 0.5*(r^2...

26 days ago

Solved

Pizza!
Given a circular pizza with radius z and thickness a, return the pizza's volume. [ z is first input argument.] Non-scored bonus...

26 days ago

How to draw a Nyquist plot while avoiding the pole at the origin
I dont think the nyquist plots looks exactly like you draw by hand. You can set the axis limits to make the nyquist plot visib...

26 days ago | 0

How to draw a graph like the image attached below in MATLAB
You can also use countourf function; % random data from countour example x = linspace(-2*pi,2*pi); y = linspace(0,4*pi); [X,...

27 days ago | 0

Insufficient number of input parameters.
The calculate_gain_sfunc requires an input. You called it without any inputs. calculate_gain_sfunc % WRONG way to run the func...

27 days ago | 0

Hi All. Just wondering why answer to (i) is not 4.9e+4. an why answer to (iii) is not (9x)/2 or 4.5 x. Many thanks. Brian
Your value in (i) for f(1.2) is 49020.80113638172, so when you round to 1 decimal, it becomes 49020.8 which in engineering notat...

1 month ago | 1

How can I express all the variables Vcm1, Vcm2, Vcm3, Vcm4 in num2str without getting an error?
Dont know what exactly you are trying to do but here is an example using your variable names: dim = [0.2 .5 0.25 0.1];% normali...

1 month ago | 0

| accepted

Intersection condition between two ellipses
Here is one way where accuracy will depend on selecting the threshold correctly. You simply solve the equation for y given an x ...

1 month ago | 0

Index exceeds the number of array elements. Index must not exceed 1
You are overwriting the C_Y array in your for loop. You initialize C_Y as a 5x5 zeros matrix and in the first iteration of your ...

1 month ago | 0

| accepted

help with nested loop and plot
Here is one simple dirty way: n= 101; x = linspace(-100, 100, n); y = linspace(-100, 100, n); [X, Y] = meshgrid(x, y); Z = ...

1 month ago | 0

Accessing cell array entries using arrays
I think you want to use B columns as indeces to extract info from A, so: A=cell(2,2); B=[1 2 2 1 1; 2 1 2 1 2] A{1,1}=[4...

1 month ago | 0

what is the meaning of error "Index exceeds the number of array elements. Index must not exceed 8."
it means the size of y variable is 8 abd you are trying to get 9th 10th 11th index of the y vector. This is because your initial...

1 month ago | 0

Someone help me to plot Ids vs Vds for HEMT AlGaN/GaN
I think what you are trying to do is vary Vds and see what Ids becomes. So here is a simple some modification for it using for l...

1 month ago | 0

Generating triangle wave form
You can use the general equation for the triangle wave and implement it using simple simulink blocks t = 0:0.01:10; % time f =...

1 month ago | 0

| accepted