Community Profile

photo

Rahul Kalampattel


Active since 2013

Followers: 0   Following: 0

Programming Languages:
Python, C++, MATLAB
Spoken Languages:
English

Statistics

All
  • Quiz Master
  • Knowledgeable Level 3
  • Knowledgeable Level 2
  • First Answer
  • Scavenger Finisher
  • CUP Challenge Master
  • Speed Demon
  • Creator
  • Commenter
  • Solver

View badges

Feeds

View by

Answered
I am running a for loop for my program. however, I want to run the for loop until i have 10 non-zero values in the matrix A.
The simplest solution would be to change the |for| loop to a |while| loop. Just calculate |c| at each iteration, and once |c==10...

ungefär 7 år ago | 0

Answered
how can i plot these dsp signals?
I think what you have is correct, except in the last command you should be plotting |q| rather than |S| and |x|. Also if you wan...

ungefär 7 år ago | 0

Answered
How do i solve this problem?
The syntax for a user prompt is |prompt = 'text'| rather than what you had. prompt = 'Please enter number of strips: '; ...

ungefär 7 år ago | 0

| accepted

Answered
Matlab simple loop for different function variables (Finite Difference)
Something like this? Or did you want all the error terms in one 3D matrix? clc clearvars close all hVec = [0.0...

ungefär 7 år ago | 3

| accepted

Answered
How do I subtract from specific elements in a vector?
function [income cnt] = tickets( price, numTickets ) cnt = sum(numTickets); numTickets = numTickets - (numTickets>5)...

ungefär 7 år ago | 0

| accepted

Answered
Problem plotting Möbius strip
Use |meshgrid| to generate matrices for both your parameters, rather than using vectors. u = linspace(0,2*pi,100); v =...

ungefär 7 år ago | 2

| accepted

Answered
display surface normal using quiver3
*1.* Use [U,V,W] = surfnorm(X,Y,Z); instead of [U,V,W] = surfnorm(Z); This will make sure that the |quiver3| v...

ungefär 7 år ago | 0

| accepted

Answered
Does anyone know why not all of my streamlines complete themselves?
If you check out the <http://au.mathworks.com/help/matlab/ref/streamline.html documentation> for the |streamline| function, you'...

ungefär 7 år ago | 5

| accepted

Answered
Either quiver3 or streamline work for me, but not both, for the same test data
Does this look like what you're expecting? <</matlabcentral/answers/uploaded_files/71280/quiver.jpg>> Edited code: qp...

ungefär 7 år ago | 1

| accepted

Answered
How to plot a bode graph
Have a look at the documentation for |<http://au.mathworks.com/help/matlab/ref/semilogx.html semilogx>| and see if it helps...

ungefär 7 år ago | 0

Answered
What's wrong in this code? why is this not displaying whole matrix?and how to sum whole matrix?
You're overwriting the matrix |Cmd| every iteration because of the line |Cmd=zeros(M:D)|. Take it outside of both |for| loops. ...

ungefär 7 år ago | 0

| accepted

Answered
Solving an equation on MATLAB
Can be solved using the symbolic toolbox, <https://au.mathworks.com/help/symbolic/solve.html>.

ungefär 7 år ago | 0

| accepted

Answered
Executing the while loop
When I run your code, after the first iteration |err=0.028062920372021|. Since this doesn't satisfy the condition |err<=0.00001|...

ungefär 7 år ago | 3

Answered
How to add values into Matlab matrix and not overwrite it
You're overwriting the contents of |B| twice in each iteration of your |for| loop: B = zeros(n,1); % preallocate, results ou...

ungefär 7 år ago | 1

| accepted

Answered
How to have matrix values as a function of another variable
|h| and |u| are vectors since |t| is also a vector, hence why you get the error when trying to put them into the matrix |P|. ...

ungefär 7 år ago | 0

| accepted

Answered
qickyly change 3D matrix to 2D matrix
For the example you gave, the following also works: a=squeeze(A(1,1,:));

ungefär 7 år ago | 0

Answered
Bisection Method Piecewise function
The function you have declared is called |bisection|, not |bisectionF|. When you want to call or use this function, you need to ...

ungefär 7 år ago | 0

Answered
how to use for loop
Type |help for| in your Matlab command window, or look at the relevant <http://au.mathworks.com/help/matlab/ref/for.html documen...

ungefär 7 år ago | 0

Answered
Assign different input using for loop
I edited three lines (the commented out ones), the code now allows you to enter a row vector of inputs and returns a row vector ...

ungefär 7 år ago | 0

Answered
Where is the 2 hour introduction to Matlab self paced online course?
I think you might be looking for the <https://matlabacademy.mathworks.com/ MATLAB Onramp> course?

ungefär 7 år ago | 1

Answered
I cant figure out why my function is giving me NaN and not an answer
The line |dsin=sum(terms)| isn't summing anything, since |terms| isn't a vector. You can either make it a vector, or initialise ...

ungefär 7 år ago | 1

| accepted