MATLAB Answers


How can i correct the error in the code?

Asked by Pooja
on 23 Apr 2013
if true
  % q=[q(2*qk)(2*qk)(4*qk)]

I am getting the following error

()-indexing must appear last in an index expression.

in the editor its showing Cannot call or access into a temporary array.

how to correct the error

  1 Comment

That will not give an error because it's commented out. Please post the actual code, and all of the actual error message - all the red text displayed in the command window.



2 Answers

Answer by per isakson
on 23 Apr 2013

What is your intension? I guess



on 23 Apr 2013

In the text book its given as a space.I tried from the file exchange but not getting output.

One can use either space or comma as delimiter. I prefer comma because is more visible.

Does the code of the text book run after you made the correction?

Answer by Pooja
on 23 Apr 2013

I gave a comma and that error got corrected but its showing more errors.Any way to make it running or is there any running JPEG 2000 available?


Experiment with replacing




There is no C in the code you posted, nor is there a wavework(). Should I ask a fourth time for you to post ALL of your error text that appears in the command window in red (not just part of it like you did)? Nah, I think I'll just give up - besides, I don't have the Wavelet Toolbox anyway. If you want to post your code, check out this link:

on 23 Apr 2013

Sorry.I have submitted the entire file in the file exchange.Its under review.Under the name jpeg2000.

Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

MATLAB Academy

New to MATLAB?

Learn MATLAB today!